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

相关推荐

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

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

  • 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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

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

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

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

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Lists Tailwind CSS classes in monospaced font

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

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

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

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

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

    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.