MCP cover image
See in Github
2025-04-02

在Azure MCP服务器上的SAP用于打字稿

1

Github Watches

0

Github Forks

0

Github Stars

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

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • open-webui
  • 用户友好的AI接口(支持Ollama,OpenAi API,...)

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

    Reviews

    1 (1)
    Avatar
    user_gWD1hEmy
    2025-04-16

    As a dedicated user of the azsap-mcp-typescript by ArchitectRavi, I must say this product is outstanding. It has streamlined our TypeScript development with Azure SAP, making our processes much smoother. The documentation is thorough and the support from ArchitectRavi is exceptional. Highly recommended for anyone in need of a reliable MCP tool! Check it out here: https://github.com/ArchitectRavi/azsap-mcp-typescript.