GS

gutjahrai/sap-odata-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

13 stars 6 forks Качество 55 Тренд 9

Yet Another SAP MCP Server

Обзор

A Model Context Protocol (MCP) server for integrating SAP systems with AI assistants like Claude using OData REST APIs. This server provides tools for connecting to SAP OData services, querying entity sets, executing CRUD operations, and calling OData functions. - : Connect to SAP systems via OData REST APIs - : Properly handles SAP OData URL structures and 404 responses - : Automatically discover available OData services via catalog or common service testing - : Query any OData entity set with filtering, sorting, and pagination - : Create, Read, Update, and Delete operations on OData entities - : Execute OData function imports and custom functions - : Automatic CSRF token management for secure operations - : Clean, maintainable TypeScript codebase with separation of concerns ⚠️ : No SAP RFC SDK installation required! Uses standard HTTP/REST APIs. 2. from the artifacts to your src/ directory: - src/index.ts - Entry point - src/server.ts - MCP server setup - src/handlers.

README

Показан фрагмент оригинального README. Открыть оригинал.

SAP OData MCP Server

A Model Context Protocol (MCP) server for integrating SAP systems with AI assistants like Claude using OData REST APIs. This server provides tools for connecting to SAP OData services, querying entity sets, executing CRUD operations, and calling OData functions.

Features

  • SAP OData Connectivity: Connect to SAP systems via OData REST APIs
  • Smart Connection Handling: Properly handles SAP OData URL structures and 404 responses
  • Service Discovery: Automatically discover available OData services via catalog or common service testing
  • Entity Set Queries: Query any OData entity set with filtering, sorting, and pagination
  • CRUD Operations: Create, Read, Update, and Delete operations on OData entities
  • Function Imports: Execute OData function imports and custom functions
  • CSRF Token Handling: Automatic CSRF token management for secure operations
  • Modular Architecture: Clean, maintainable TypeScript codebase with separation of concerns

Prerequisites

  • Node.js 18+
  • SAP system with OData services enabled
  • Network access to SAP OData endpoints
  • SAP user credentials with appropriate authorizations

⚠️ Advantage: No SAP RFC SDK installation required! Uses standard HTTP/REST APIs.

Installation

Quick Setup

  1. Create the project:
mkdir sap-odata-mcp-server
cd sap-odata-mcp-server
mkdir src
  1. Copy the source files from the artifacts to your src/ directory:

    • src/index.ts - Entry point
    • src/server.ts - MCP server setup
    • src/handlers.ts - Request handlers
    • src/odata-client.ts - SAP OData client
    • src/tool-definitions.ts - Tool definitions
    • src/types.ts - TypeScript types
  2. Copy configuration files:

    • package.json - Dependencies and scripts
    • tsconfig.json - TypeScript configuration
    • .env.example - Environment variables template
  3. Install dependencies:

npm install
  1. Configure environment:
cp .env.example .env
# Edit .env with your SAP details
  1. Build the project:
npm run build

Configuration

Environment Variables

Create a .env file with your SAP system details:

# Required SAP OData Configuration
SAP_ODATA_BASE_URL=https://your-sap-host:8000/sap/opu/odata/sap/
SAP_USERNAME=your-sap-username
SAP_PASSWORD=your-sap-password

# Optional Configuration
SAP_CLIENT=100
SAP_TIMEOUT=30000
SAP_VALIDATE_SSL=false  # for development with self-signed certificates
SAP_ENABLE_CSRF=true

Claude Desktop Integration

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "sap-odata": {
      "command": "node",
      "args": ["/full/path/to/your/sap-odata-mcp-server/dist/index.js"],
      "env": {
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "sap-odata": { "command": "node", "args": ["/full/path/to/your/sap-odata-mcp-server/dist/index.js"], "env": { "SAP_ODATA_BASE_URL": "https://your-sap-host:8000/sap/opu/odata/sap/", "SAP_USERNAME": "your-username", "SAP_PASSWORD": "your-password", "SAP_CLIENT": "100", "SAP_VALIDATE_SSL": "false" } } } }