Sponsored by Deepsite.site

SAP on Azure MCP Server (TypeScript Implementation)

Created By
ArchitectRavi8 months ago
SAP On Azure MCP Server for TypeScript
Content

SAP on Azure MCP Server (TypeScript Implementation)

A TypeScript implementation of the Model Context Protocol (MCP) server for SAP on Azure, providing tools for SAP HANA database management and Azure resource management.

Features

  • Multiple Transport Options: Supports STDIO, HTTP, and SSE transports
  • SAP HANA Integration: Tools for querying and managing SAP HANA databases
  • Azure VM Management: Tools for managing Azure VMs (start, stop, status)
  • Azure NSG Operations: Tools for Network Security Group management
  • Resource Monitoring: Tools for tracking system resources
  • TypeScript Implementation: Fully typed implementation with modern ECMAScript features

Installation

# Clone the repository
git clone <repository-url>
cd azsap-mcp-typescript

# Install dependencies
npm install

# Configure your environment
cp .env.example .env
# Edit .env with your SAP HANA and Azure credentials

# Build the project
npm run build

Running the Server

STDIO Transport (for Claude Desktop)

npm start

HTTP Transport (for web clients)

npm run start:http

Or with custom host/port:

node dist/server-cli.js --transport http --host localhost --port 3000

Using the Client

The package includes a client implementation that can connect to the MCP server:

# Connect to a local STDIO server
npm run client -- --transport stdio --command "node" --args "dist/server-cli.js"

# Connect to an HTTP server
npm run client -- --transport http --host localhost --port 3000

# Execute a specific tool
npm run client -- --transport http --host localhost --port 3000 --tool get_system_overview

Using as a Library

You can also use this package as a library in your own projects:

import { createServer, connectServer, AzureMCPClient } from 'azsap-mcp-typescript';

// Create and start a server
const server = createServer();
await connectServer(server, 'stdio');

// Or use the client
const client = new AzureMCPClient({
  transport: 'http',
  host: 'localhost',
  port: 3000
});

await client.connect();
const status = await client.getVmStatus('SID001', 'db', 'myResourceGroup');
console.log(status);

Docker Support

A Dockerfile is included for containerized deployment:

# Build the Docker image
docker build -t azsap-mcp-typescript .

# Run with environment variables
docker run -p 3000:3000 \
  -e HANA_HOST=your-hana-host \
  -e HANA_PORT=30215 \
  -e HANA_USER=your-user \
  -e HANA_PASSWORD=your-password \
  -e HANA_SCHEMA=your-schema \
  azsap-mcp-typescript

Claude Desktop Integration

To integrate with Claude Desktop, configure your claude_desktop_config.json file:

{
  "mcpServers": {
    "sap-hana-ts": {
      "command": "node",
      "args": ["/path/to/azsap-mcp-typescript/dist/server-cli.js"],
      "env": {
        "HANA_HOST": "your-hana-host",
        "HANA_PORT": "30215",
        "HANA_USER": "your-user",
        "HANA_PASSWORD": "your-password"
      }
    }
  }
}

Project Structure

The project follows a standard Node.js/TypeScript package structure:

├── src/                  # Source code
│   ├── index.ts          # Main entry point and library exports
│   ├── server-cli.ts     # CLI for running the server
│   ├── client-cli.ts     # CLI for running the client
│   ├── client.ts         # MCP client implementation
│   ├── hana-connection.ts # SAP HANA connection utilities
│   ├── tools/            # Tool implementations
│   │   ├── system-overview.ts
│   │   ├── disk-usage.ts
│   │   └── azure-tools/   # Azure-specific tools
│   │       └── vm-operations.ts
│   └── utils/            # Utility functions
│       ├── format.ts     # Formatting utilities
│       ├── logger.ts     # Logging configuration
│       └── types.ts      # TypeScript type definitions
├── test/                 # Test files
├── dist/                 # Compiled output (generated)
└── logs/                 # Log files (generated)

Available Tools

The server currently provides these tools:

SAP HANA Tools

  • get_system_overview: Get system status, host info, service status, and memory usage
  • get_disk_usage: Check disk space usage across volumes, data files, and log files

Azure VM Tools

  • get_vm_status: Get the current status of an Azure VM
  • start_vm: Start an Azure VM
  • stop_vm: Stop an Azure VM (with optional deallocation)
  • restart_vm: Restart an Azure VM
  • list_vms: List all VMs in a resource group or subscription

Documentation

For more information on available tools and their parameters, refer to the source code and JSDoc comments.

Testing

# Run all tests
npm test

# Run specific tests
npm test -- -t "system overview"

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Tavily Mcp
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors