sap
MCP Server for SAP
claude mcp add --transport stdio midasol-sap-mcp-server sap-mcp-server-stdio
How to use
This SAP MCP server provides a production-ready Model Context Protocol (MCP) interface for SAP Gateway integration. It exposes four modular tools that AI agents can dispatch to for OData operations: sap_authenticate for authentication against SAP, sap_query for executing OData queries, sap_get_entity for retrieving single entities, and sap_list_services for discovering available SAP services. The server is designed to run over a standard stdio transport, enabling clients to send tool invocations and receive structured responses in a robust, production-ready pipeline. Typical usage involves starting the server in a local or containerized environment and then issuing tool calls via the MCP client or Gemini CLI, depending on your setup. Security and input validation are built into the core, with structured logging to help you monitor requests and performance.
To use the tools, you’ll first authenticate with the SAP system using sap_authenticate (providing credentials or token exchange as configured). Once authenticated, you can perform OData queries with sap_query, retrieve specific entities with sap_get_entity, or discover available services with sap_list_services. Each tool follows the MCP contract and returns standardized response payloads, including status, data, and error details when applicable. This setup is ideal for AI-driven automation flows that need reliable SAP Gateway access with clear separation of concerns across authentication, data access, and service discovery.
How to install
Prerequisites:
- Python 3.11+ installed on the host (recommended virtual environment)
- Git installed
- Access to install Python packages (pip)
Installation steps:
- Clone the repository and navigate to the project root:
git clone <repository-url>
cd sap-mcp
- Create and activate a virtual environment:
- Unix/macOS:
python3 -m venv .venv
source .venv/bin/activate
- Windows:
python -m venv .venv\Scripts\activate
- Install the MCP server package in editable mode:
pip install -e .
- Configure SAP connection and services:
# Copy example env/config files and edit with your SAP credentials
cp .env.server.example .env.server
# Edit .env.server with your SAP credentials and connection details
cp packages/server/config/services.yaml.example packages/server/config/services.yaml
# Edit services.yaml with your SAP services
- Run the SAP MCP server (stdio transport):
sap-mcp-server-stdio
Notes:
- Ensure your environment variables (or .env.server) include SAP connection details as required by the server configuration.
- If you prefer to run via a Python module, ensure the entrypoints are installed and available in PATH.
Additional notes
Tips and common considerations:
- Environment variables: Provide SAP credentials, endpoints, and any TLS settings as required by your SAP gateway integration (e.g., SAP_USERNAME, SAP_PASSWORD, SAP_HOST, SAP_CLIENT).
- Logging: The server emits structured JSON logs; configure log destinations and log level as needed for production monitoring.
- Tool registry: The server exposes four core tools (sap_authenticate, sap_query, sap_get_entity, sap_list_services). You can extend the registry with additional tools following the existing base class implementation pattern.
- Validation: Inputs are validated for OData correctness and security; ensure your downstream agents supply correctly shaped payloads to avoid extra round-trips.
- Running in production: Consider deploying behind a reverse proxy with TLS termination and enabling proper authentication guards for the MCP entry point.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP