sap-mcp-server
Reads SAP ECC and S/4HANA for an agent over Gateway OData and RFC, with a Node bridge that speaks the RFC protocol without the proprietary SAP NetWeaver RFC SDK.
Tools over stdio in three groups: Gateway OData reads — a connection ping, a service list, a generic odata_query over any entity set, and three convenience readers for material, production orders and purchase orders — RFC reads with read_table, table_fields and a bapi_call restricted to a read-only allowlist in the source, and one write, create_purchase_requisition, which returns a proposal unless it is called again with confirm=True and whose SAP write is not implemented yet. The RFC half is what sets it apart: a small Node bridge on open-rfc, an Apache-2.0 package that implements the RFC protocol, so nothing here needs the licensed SAP NetWeaver RFC SDK, which is why the OData tools run on Python alone and the RFC tools want Node 22.14. sap-security-mcpsap-security-mcpAn entirely read-only security analysis surface: nineteen tools, five resources and eight prompts for audits, SOX and segregation-of-duties review, behind OAuth 2.0 with PKCE. The vendor hosts an endpoint, and the README documents running it yourself.independent, abap reads one subject, a system's security posture, and MarkWuRY168/SAP_MCPMarkWuRY168/SAP_MCPPublishes SAP system functions as MCP tools from configuration tables held inside the SAP system, so adding a tool is a configuration change rather than a code change.independent, abap lets a configuration table inside the system decide what is published; this one ships a fixed set of business reads and leaves the governance to SAP authorisations, the allowlist in rfc_tools.py and a denylist of credential and personnel tables. Two of its tools have nothing to do with SAP: ted_search and ted_notice query the EU's Tenders Electronic Daily and need no SAP connection.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1@romankorimmaintainer
Before choosing this
Conditions
PracticalFunctional boundary
On ECC the S/4HANA API_* services that the three convenience readers default to do not exist, so each one has to be pointed at a Z service of your own or replaced by the RFC tools. read_table inherits RFC_READ_TABLE's 512-byte row, so a wide table needs an explicit field list and some fields cannot be selected at all, and the bridge starts a Node process and a fresh logon per call, with no pooling. The audit log is one line per call that includes the call arguments, so every filter and WHERE clause sent to SAP is written to a file that then has to be handled as sensitive.
PolicySAP API Policy 4.2026a§ 1.1, 1.2, 2.2.2from Agent access to your systemsAn MCP server uses SAP APIs to supply tools, resources or data to an agent.
- § 1.1 Published APIs. Published APIs are made available for the documented purposes identified by SAP, including integration, extensions and data exchange.
- § 1.2 Non-Published APIs. Customer and third-party applications must not access non-published APIs except where documentation permits it or SAP otherwise authorizes it.
- § 2.2.2 AI call sequences and data extraction. Outside SAP-endorsed architectures, data services or expressly identified pathways, the policy prohibits specified agentic API use and systematic or large-scale extraction.
MCP does not replace the API's documented-use boundary. Check that every endpoint is published for the intended use and whether the policy's AI-call or extraction provisions apply to the design.
SAP API Policy 4.2026a →What it declares
Every artifact
- Type
- MCP server
- Origin
- Independently maintained
As an MCP server
- Runs as
- local process
- Transport
- stdio
- Authentication
- user and password
- Read-only
- nostates it is not
- Guardrails
7 quoted from README, Security model show all
Read-only by default. All OData tools use GET. All RFC tools call read-only function modules.
bapi_callaccepts only names in theREAD_BAPISset inrfc_tools.py. Extending the list is a code change, not a runtime option.read_tablereads whatever the RFC user is authorized to read, except tables that hold credentials, secrets or personal data:USR*,USH*,RSEC*,SEC*,PA0*,PA9*,HRP*,T77*,RFCDES,USRBAPI,SECSTOREand theSSF_PSEtables are refused unlessSAP_ALLOW_SENSITIVE_TABLES=1is set for an audited admin session.Writes are two-step.
create_purchase_requisitionreturns a proposal unlessconfirm=Trueis passed; the intended flow is that a person reviews the proposal and the client calls again withconfirm=True. The SAP write itself is not implemented yet.Credentials come from
.envor the environment; the server never logs them. The audit record stores the SAP user name, not the password.TLS certificate verification is on by default.
Treat the file as sensitive: it contains every query sent to SAP.
Connections
Giving an AI agent access to the systems you run over MCP
SAP's earlier ERP suite, ECC 6.0, run on-premise on the ABAP platform and succeeded by SAP S/4HANA. For the things here it is the system a tool reads from or writes to.
SAP's ERP suite, run on-premise or as a private cloud edition, with its business data and processes reached over OData, RFC and the ABAP platform. For the things here it is the system a tool reads from or writes to. The public cloud edition is its own entry.
SDK-free TypeScript client for SAP synchronous RFC on Node.js
A cross-platform JavaScript runtime that servers, command line tools and scripts written in JavaScript are run with. For the things here, the prerequisite a repository names when its build is a set of npm scripts.
Download
Architecture
Download
server.py on stdio”README
quoted from romankorim/sap-mcp-server under MIT, readsap-mcp-server
An MCP server that gives Claude (Desktop, Code, API) read access and approval-gated write access to SAP ECC and S/4HANA through OData and RFC/BAPI, without the proprietary SAP NetWeaver RFC SDK. The OData side talks to the SAP Gateway over HTTP. The RFC side runs through a small Node bridge on open-rfc, an Apache-2.0 licensed package that implements the RFC protocol without the SAP SDK. Every call is written to an audit log.
Why
SAP Joule ships with S/4HANA Cloud and with recent S/4HANA on-premise releases connected to BTP. ECC 6.0 has no Joule, and the only supported route to one is a migration. This server is the sidecar pattern: SAP stays as it is, the model runs where you choose (Claude Desktop, Claude Code, the Claude API, Amazon Bedrock), and the only thing between them is this process. It uses the two interfaces most SAP systems already expose, OData on the Gateway and RFC on the application server, and writes every call to an audit log.
Tools
| Tool | Path | What it does |
|---|---|---|
sap_ping() | OData | Reads the Gateway service catalog; connection test |
list_services(filter_text) | OData | Lists OData services registered on the Gateway, optionally filtered by substring |
odata_query(service, entity_set, filter, select, top, orderby) | OData | Reads any entity set ($filter, $select, $top capped at 200, $orderby) |
get_material(material) | OData | Material master. S/4HANA API_PRODUCT_SRV by default; on ECC point SAP_SVC_MATERIAL to a Z service |
list_production_orders(plant, top) | OData | Production orders. S/4HANA API_PRODUCTION_ORDER_2_SRV by default; on ECC a Z service |
list_purchase_orders(supplier, top) | OData | Purchase orders. S/4HANA API_PURCHASEORDER_PROCESS_SRV by default; on ECC a Z service |
create_purchase_requisition(material, quantity, plant, confirm) | write | Without confirm=True returns a proposal only. The SAP write itself (BAPI_PR_CREATE) is not implemented yet |
rfc_ping() | RFC | RFC_SYSTEM_INFO: SID, host, release, database |
read_table(table, fields, where, max_rows, skip_rows) | RFC | RFC_READ_TABLE on any table the RFC user is authorized to read. One row is limited to 512 bytes, so pass a field list on wide tables |
table_fields(table) | RFC | DDIF_FIELDINFO_GET: field names, types, lengths, descriptions |
bapi_call(name, params) | RFC | Calls a BAPI or function module from the read-only allowlist in rfc_tools.py (GETLIST, GETDETAIL, GETOPENITEMS and similar). The server rejects names outside the list |
ted_search(preset, cpv, days, country, only_open, limit) | TED | Searches EU public tenders on Tenders Electronic Daily by CPV code. Needs no SAP connection |
ted_notice(publication_number) | TED | Details of one TED notice: lots, deadlines, estimated values, CPV codes, place of performance |
Requirements
- Python 3.10 or newer
- Node.js 22.14 or newer for the RFC tools (open-rfc requires it). The OData and TED tools work without Node
- An SAP user with the authorizations you intend to grant: Gateway service access for OData;
S_RFCplusS_TABU_DISorS_TABU_NAMforread_table - Network access from the machine running this server to the Gateway HTTP(S) port and to the application server RFC port (
33NN, whereNNis the system number)
Install
Clone the repository (git clone https://github.com/romankorim/sap-mcp-server.git), then:
cd sap-mcp-server
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
cd rfc-bridge && npm install && cd ..
chmod +x run.sh
Configure
cp .env.example .env
Edit .env:
| Variable | Meaning |
|---|---|
SAP_BASE_URL | OData root on the Gateway, usually https://<host>:<port>/sap/opu/odata/sap |
SAP_CLIENT | SAP client number |
SAP_USER, SAP_PASSWORD | SAP user for OData and, unless SAP_RFC_USER is set, for RFC |
SAP_VERIFY_TLS | 1 (default) verifies the server certificate; 0 only for test systems with self-signed certificates |
SAP_ASHOST, SAP_SYSNR | Application server host and system number for RFC |
SAP_LANG | RFC logon language, default EN |
SAP_RFC_CLIENT, SAP_RFC_USER, SAP_RFC_PASSWORD | Optional separate technical user for RFC |
AUDIT_LOG_PATH | Audit log file; a relative path is resolved next to server.py. Default audit.jsonl |
NODE_BIN | Path to the node binary when it is not on PATH. Claude Desktop starts servers with a minimal PATH, so on macOS this is usually needed |
TED_LANG | Preferred language of multilingual TED fields, default eng |
SAP_ALLOW_SENSITIVE_TABLES | 1 disables the sensitive-table denylist in read_table; leave unset in production |
SAP_SVC_*, SAP_ES_* | OData service and entity set names behind the three convenience tools; see .env.example |
.env is re-read on every tool call, so a changed host or password takes effect without restarting the client. Values in .env take precedence over the process environment. Single-quote values that contain spaces or shell characters.
Run
./run.sh
run.sh loads .env, picks .venv/bin/python when it exists (otherwise $PYTHON or python3) and starts server.py on stdio. MCP clients start it the same way; you only run it by hand to see startup errors. On Windows call the venv interpreter directly with server.py as the argument; the server reads .env itself.
Claude Desktop
Quit Claude Desktop completely before editing the config file. The app rewrites claude_desktop_config.json from memory when it quits, so it overwrites any edit made while it is running.
File location: macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json.
{
"mcpServers": {
"sap": {
"command": "/absolute/path/to/sap-mcp-server/run.sh",
"args": []
}
}
}
Start the app again. The sap tools appear in the tools list; sap_ping and rfc_ping are the first calls to try.
Claude Code
claude mcp add sap -- /absolute/path/to/sap-mcp-server/run.sh
Security model
- Read-only by default. All OData tools use GET. All RFC tools call read-only function modules.
bapi_callaccepts only names in theREAD_BAPISset inrfc_tools.py. Extending the list is a code change, not a runtime option.read_tablereads whatever the RFC user is authorized to read, except tables that hold credentials, secrets or personal data:USR*,USH*,RSEC*,SEC*,PA0*,PA9*,HRP*,T77*,RFCDES,USRBAPI,SECSTOREand theSSF_PSEtables are refused unlessSAP_ALLOW_SENSITIVE_TABLES=1is set for an audited admin session. Restrict the user withS_TABU_DISorS_TABU_NAMon the SAP side as well.- Writes are two-step.
create_purchase_requisitionreturns a proposal unlessconfirm=Trueis passed; the intended flow is that a person reviews the proposal and the client calls again withconfirm=True. The SAP write itself is not implemented yet. - Credentials come from
.envor the environment; the server never logs them. The audit record stores the SAP user name, not the password. - TLS certificate verification is on by default.
- The audit log is one JSON line per call, appended to
AUDIT_LOG_PATH:
{"ts": "2026-10-01T09:12:44+00:00", "user": "SAPUSER", "tool": "read_table", "args": {"table": "MARA", "fields": "MATNR,MTART,MATKL", "where": "MTART = 'FERT'", "max_rows": 20, "skip_rows": 0}, "status": "ok", "ms": 412, "note": "rfc_user=SAPUSER"}
Fields: ts (UTC), user (SAP_USER), tool, args (the call arguments, so filters and WHERE clauses end up in the log), status (ok, error, proposed, not_implemented, or http_<code> for failed OData requests), ms, note. Treat the file as sensitive: it contains every query sent to SAP.
Known limits
RFC_READ_TABLEreturns each row as one character line of at most 512 bytes. Wide tables need an explicit field list. SelectingRPRCTRfromFAGLFLEXTfails on the systems we tested.- The
whereargument is split into 72-characterOPTIONSlines on whitespace. A single token longer than 72 characters is rejected. odata_querycapstopat 200.- On ECC the S/4HANA
API_*OData services do not exist. PointSAP_SVC_*andSAP_ES_*to your own Z services, or use the RFC tools. create_purchase_requisitiondoes not write to SAP yet.- The TED API answers with HTTP 429 above roughly 10 requests per minute.
- OData V2 only.
- The RFC bridge starts a Node process per call, with no connection pooling. Each call opens a new logon, which adds latency.
Roadmap
BAPI_PR_CREATEwrite path behind the existingconfirm=Truegate- S/4HANA
API_*style read services on ECC through Z Gateway services - OData V4
Pinned install and SBOM
requirements.txt states the ranges; requirements.lock is the exact set the maintainers tested (Python 3.12, pip install -r requirements.lock). sbom.cdx.json is the CycloneDX 1.6 software bill of materials for that lock, regenerated with every tagged release. The Node bridge pins its dependencies in rfc-bridge/package-lock.json.
Further reading
- Claude on SAP through MCP: the service and the pilot
- Claude through MCP vs SAP Joule on ECC (2026): conditions, hosting, cost
- Connect Claude Code to SAP ECC 6.0 with sap-mcp-server in 20 minutes
- Security and data handling: identity, masking, audit, writes, SNC/TLS
- AI operating system: scheduled agents with gates and an audit trail
Maintainer
Maintained by iteractive.ai, AI implementation for SAP and enterprise systems, remote and end to end for companies in Europe and North America. Commercial support and production deployments: https://iteractive.ai/services/claude-sap-mcp
License
MIT, see LICENSE.
History
Other 5
Notes
First tagged release of sap-mcp-server.
- Read-only MCP server for SAP ECC 6.0 and S/4HANA: OData, RFC/BAPI (allowlisted read BAPIs), RFC_READ_TABLE with a sensitive-table denylist, one JSON audit line per call.
- Pinned dependencies: requirements.lock (Python 3.12, mcp 1.30.0, httpx 0.28.1) and rfc-bridge/package-lock.json.
- CycloneDX 1.6 SBOM: sbom.cdx.json (29 components).
- Known limits are listed in the README (512-byte rows in RFC_READ_TABLE, OData V2 only, no connection pooling, open-rfc is not supported by SAP).
- No write path in this release; create_purchase_requisition returns a proposal only.
Others providing
Compare all 12 on the Agent access to your systems page →- @abap2ui5/mcp-server@abap2ui5/mcp-serverAn MCP server that puts the abap2UI5 development loop on the machine an agent runs on: check the view the ABAP builds, photograph it, deploy the class into a sandbox, boot the app headless and read the errors.community org, abapMCP server for the abap2UI5 check, deploy and run loop
- abap2UI5 for VS Codeabap2UI5 for VS CodeA VS Code extension for abap2UI5 apps: F9 starts the app class in a preview beside the source, Ctrl+F3 activates the class and reloads it, and the abap2UI5 linter runs in the editor while you type.community org, abapVS Code extension to preview, activate and lint abap2UI5 apps
- abapsmithabapsmithAn MCP server that lets an LLM develop in ABAP on a live system over ADT, with writes off by default and every mutation recorded in a local journal that can undo it.independent, abapABAP MCP server over ADT with a local journal that can undo writes
- btp-sap-odata-to-mcp-serverbtp-sap-odata-to-mcp-serverExposes every OData service on an S/4HANA or ECC system as MCP tools, in three discovery levels so a large catalogue does not have to be loaded at once.independent, btpExposes S/4HANA or ECC OData services as MCP tools
- midasol/sap-mcp-servermidasol/sap-mcp-serverA Python MCP server for SAP Gateway with four read-only tools that authenticate, query, fetch one entity and list services, and one of the few here that publishes its test results.independent, btpPython MCP server for SAP Gateway OData operations
- odata_mcp_goodata_mcp_goA Go binary that bridges any OData v2 or v4 service to MCP — and can collapse the whole service into one tool when the generated tool list is too large to be usable.independent, btpGo binary bridging any OData v2 or v4 service to MCP
- odata_mcpodata_mcpThe Python original: reads an OData v2 service's metadata and generates MCP tools from it, with the SAP-specific conversions the raw protocol leaves to you.independent, btpPython bridge generating MCP tools from OData v2 metadata
- Skybuffer AI MCP serverSkybuffer AI MCP serverAn ABAP add-on that serves SAP business data, transactions and development context as MCP tools from an ICF node inside SAP ECC and S/4HANA, each call running as the signed-in user under PFCG authorization checks.independent, abapABAP add-on serving business data and transactions as MCP tools
- sap-security-mcpsap-security-mcpAn entirely read-only security analysis surface: nineteen tools, five resources and eight prompts for audits, SOX and segregation-of-duties review, behind OAuth 2.0 with PKCE. The vendor hosts an endpoint, and the README documents running it yourself.independent, abapRead-only security analysis MCP server for SAP audits and SoD review
- KlystronKlystronAn MCP server written in ABAP that runs inside the application server behind an ICF service and exposes typed tools for ABAP development, quality, transports, customizing, roles, Basis operations and integration, with a client-side plugin of SAP skills.independent, abapMCP server in ABAP inside the application server, with agent skills
- pyrfc-mcppyrfc-mcpAn MCP server for calling an SAP system's RFC-enabled function modules from an agent, built so that discovering a function does not authorise calling it: a read or a write is denied unless the function name matches an allowlist the server is configured with.independent, abapMCP server calling RFC-enabled function modules behind an allowlist
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
History in the atlas
- Handed over in a chat as one address and written from the repository's own README, read raw. Placed on the ABAP door and on agent access to your systems, the concern split out of MCP servers on 2026-10-09: it reaches into a system you run from outside, as the door's two existing providers of that capability do. The README never says ABAP, so the placement rests on the system it reaches and the protocols it names — Gateway OData services, RFC/BAPI, RFC_READ_TABLE and DDIF_FIELDINFO_GET — rather than on a development model it states. Not umbrella: it names ECC and S/4HANA and reaches them through one stack's own protocols, so a door holds it. No tool_count: the README lists its tools in a table and states no count. No flavors: nothing read states standard ABAP or ABAP Cloud. No compat.runtimes: the server is Python with an optional Node bridge, which that enum cannot say.
- First seen.
For your agent
- Ref
artifact:romankorim-sap-mcp-server- JSON
- /artifacts/romankorim-sap-mcp-server.json
- MCP
- Connecting an agent