w1ccc/sap-data-mcp
Three read-only MCP servers for querying SAP S/4HANA via RFC/BAPI, OData, or Released APIs
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
SAP Data MCP splits S/4HANA access across three Python MCP servers: private_cloud/rfc, private_cloud/odata, and public_cloud/api. An MCP client launches the selected server.py and invokes a named tool, which dispatches to an SAP function or a predefined HTTP endpoint. Each server keeps its configuration, credentials, and logs separate. The base manifest pins mcp[cli]==2.2.0, httpx==0.28.1, and python-dotenv==1.2.3; the RFC route additionally needs PyRFC and the SAP NW RFC SDK.
The protocol boundary is deliberately narrow. The RFC connector rejects functions outside READ_ONLY_FUNCTIONS. The HTTP routes use fixed GET requests for data, reserve POST for OAuth token acquisition, keep TLS verification enabled, and do not accept credentials, arbitrary URLs, or raw OData queries as tool inputs. Each call is written to logs/tool_calls_YYYY-MM-DD.jsonl with its arguments, status, duration, and SAP function or API path. Credential values are redacted in errors and logs.
Key Capabilities & Differentiators
The three routes register 95 RFC tools, 159 private-cloud OData tools, and 158 public-cloud API tools. The 412 total counts registrations, not distinct operations: equivalent tools can appear on more than one route. Coverage spans MM/IM, PP, SD, WM/EWM, FI, CO, master data/MDG, and QM. RFC also adds Basis and interface monitoring, including short dumps, background jobs, IDocs, and RFC queues, as well as read-only table and source inspection and reviewed display-only reports.
A purchase-order payment inquiry can combine the order and its history with supplier invoices and open items. The result contract preserves SAP field names, identifiers, amounts, units, currencies, zero values, and false. Lists paginate via max_results and offset; ok, not_found, partial, and error give the assistant a basis for distinguishing missing, incomplete, and failed reads. Those signals do not establish a business conclusion: an empty list does not prove a zero balance, and a clearing reference does not prove payment.
Trade-offs & Limitations
Compared with navigating SAP GUI transactions, the MCP layer is most useful for investigations that cross business objects. It also avoids the per-workflow authentication and pagination code of a bespoke RFC or OData script. The trade-off is a narrower interface: the assistant cannot submit arbitrary OData queries or invoke arbitrary RFC functions. A direct integration is a better fit for a stable report that needs deterministic processing, and SAP GUI or an authorized workflow is still required to create, post, or approve documents.
Actual coverage depends on activated services and the SAP account’s authorizations. Use least-privilege credentials and review the RFC inspection tools separately from ordinary business lookups. Local secrets and credential redaction do not prevent returned business data from reaching the MCP client and potentially its model provider. Audit records also contain arguments, so restrict access and set retention deliberately. The MIT license covers the project code; the server is independent of SAP and is not an official SAP product.
Hardware & Deployment Guide
The quickstart uses Python 3.12 in a virtual environment. For an HTTP route, copy .env.example into private_cloud/odata or public_cloud/api as .env, then set SAP_API_BASE_URL and configure Basic authentication or OAuth client credentials. Register the virtual environment interpreter and the route’s server.py by absolute path in Claude Desktop, Claude Code, Cursor, or another compatible MCP client. Run health_check first, then validate a representative SAP service with the intended account.
RFC adds the SAP NW RFC SDK and PyRFC setup described in private_cloud/rfc/docs/GOLDEN_PATH.md. The MCP server is self-hosted, but live queries still need network access to SAP; offline regression tests in tests/ use SAP-shaped fixtures and do not validate tenant configuration or permissions. The RFC tests import PyRFC. v0.2.0 is the first public release and includes all three routes, so validate the selected route in a representative environment before relying on its tool count as a measure of usable coverage.
ok, not_found, partial, and error distinguish query outcomes, while max_results and offset support pagination.get_tool_call_log.SAP operations and business teams that need conversational, auditable cross-object lookups against an authorized S/4HANA system, such as tracing purchase orders through invoices and supplier open items.
You need transactions that write or approve records, arbitrary query construction, deterministic scheduled reporting, or a deployment where SAP results cannot be exposed to the chosen assistant.
Quick Start & Installation
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
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| sap-data-mcp ★ | 203 | +16 | Python | MIT | Three read-only MCP servers for querying SAP S/4HANA via RFC/BAPI, OData, or Rel |
| chrome-devtools-mcp | 60.4k | +801 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| context7 | 65.9k | +324 | TypeScript | MIT | A hosted documentation index with MCP and CLI access for coding agents |
| agents | 43.2k | +221 | Python | MIT | One Markdown plugin catalog adapted to seven AI coding tools |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/w1ccc/sap-data-mcp.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about sap-data-mcp
How does an MCP client connect, and how do I verify the SAP integration?
server.py with an MCP client using the virtual environment’s Python executable and absolute paths. Each server loads its own .env and uses its own config/ and logs/ directories. Start with health_check, then verify a service your workflow actually needs; the public API route provides test_sap_api_connection(service="material").Does the server need a GPU, and what drives resource usage?
Can we self-host it commercially, and what compliance checks remain?
When is this a better fit than SAP GUI or a direct RFC/OData script?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy