w1ccc/sap-data-mcp
AI EngineeringRead-only MCP servers that let AI assistants query SAP S/4HANA via RFC/BAPI, OData and public-cloud APIs.
What it is
SAP Data MCP exposes SAP S/4HANA data to MCP-capable AI assistants as read-only tools. It ships three independent servers: RFC/BAPI for on-premise or private-edition systems (PyRFC plus SAP NW RFC SDK), private-cloud OData V2/V4 over HTTPS, and S/4HANA Cloud public-edition Released APIs. Together they register 412 read-only tools across MM/IM, PP, SD, WM/EWM, FI, CO, master data/MDG and QM, with some overlap between servers.
The design keeps write access out of reach: RFC calls must pass a whitelist of standard read-only functions, and HTTP traffic is limited to GET requests except for the OAuth token request. Credentials live in local .env files and are redacted from logs and error messages. Every tool call is appended to a daily JSONL audit log and can be reviewed with get_tool_call_log. Results carry an ok/not_found/partial/error status so empty results are not confused with zero balances or missing permissions.
Quick start
The public-cloud API server is the shortest path. You need Python 3.12 and an MCP client such as Claude Desktop, Claude Code or Cursor.
git clone https://github.com/w1ccc/sap-data-mcp.git
cd sap-data-mcp
py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
Copy-Item .env.example public_cloud\api\.env
Edit public_cloud\api\.env: set SAP_API_BASE_URL, then either Basic auth (SAP_API_USERNAME, SAP_API_PASSWORD) or OAuth client credentials (SAP_API_AUTH=oauth, SAP_API_TOKEN_URL, SAP_API_CLIENT_ID, SAP_API_CLIENT_SECRET). For private-cloud OData, use the private_cloud\odata directory instead.
Register the server with absolute paths, since each server reads .env, config/ and logs/ from its own directory:
{
"mcpServers": {
"sap_public_api": {
"command": "C:\\sap-data-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\sap-data-mcp\\public_cloud\\api\\server.py"]
}
}
}
In Claude Code the equivalent is claude mcp add sap_public_api -- C:\sap-data-mcp\.venv\Scripts\python.exe C:\sap-data-mcp\public_cloud\api\server.py. Then ask the assistant to call health_check and test_sap_api_connection(service="material") to confirm connectivity before posing questions such as why payment for PO 4500000417 has not arrived.
Constraints
- Only what the target system activates and the login user is authorized to see is queryable; this is not an SAP official product.
- RFC/BAPI mode additionally requires the SAP NW RFC SDK and PyRFC, configured as described in the RFC golden path.
- There is no create, change, post or approve capability, and the project does not drive SAP GUI or Fiori screens.
- Monitoring timestamps are SAP application-server local time, matching SAP GUI display.
- Tool lists accept
max_resultsandoffsetfor paging.
Testing and extension
Offline regression tests in tests/ use SAP-shaped sample data and do not log in to SAP; run them with .venv\Scripts\python.exe -m unittest discover -s tests. To add an RFC function, first confirm it is a standard read-only function, then add it to READ_ONLY_FUNCTIONS, otherwise the connector rejects it. The code is MIT licensed.
HotRepo's take
The repository appears in the HotRepo new-project list for the Python list on 2026-11-24, with 107 stars and 7 net new stars over the recorded roughly three-hour window. That is a single small snapshot from an early-stage project, not evidence of broader adoption. The substantive point for readers is the explicit read-only boundary: a function whitelist on RFC, GET-only HTTP, local credentials and per-call audit logs, plus statuses that separate empty results from permission gaps. Those are design choices visible in the documentation and are more useful than the star count when judging whether it fits an SAP reporting workflow.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- phone-harness/mcpA hosted MCP server that lets AI agents control real iPhones and Android emulators in the cloud.
- JosssphZhou/pokiLet Claude Code, Codex, or other MCP clients drive a real iPhone from a Mac, without jailbreak or extra hardware.
- mcpjungle/MCPJungleSelf-hosted gateway that registers MCP servers once and exposes their tools through a single endpoint to AI clients and agents.
- hridaya423/phonedriverMCP server and CLI that let AI agents read and control Android phones and iPhones with a confirmation step before payments.