Connect SAP (OData) to Claude, ChatGPT & Cursor — via MCP
Your sales data lives in S/4HANA. Your agent lives in Claude. Between them sits OData — a protocol AI tooling pretends doesn't exist. PlugMCP translates: point it at the service root, and every entity set becomes governed MCP tools. No BTP deployment, no RFC SDK, no code.
Why the usual approaches hurt
The community workarounds for "SAP to AI agent" today are hand-written MCP servers per OData service — Node.js projects you deploy on SAP BTP, maintain per service, and secure yourself — or commercial per-seat driver products. Both reinvent the same translation, badly: OData is metadata-described and machine-readable, which is precisely why a gateway can do this generically.
Step 1 — Run PlugMCP
./plugmcp # single ~17 MB binary, admin UI on :8080 — or Docker
Step 2 — Add the OData connector
In the UI: Connectors → Add connector → OData. Paste the service root — for SAP Gateway typically:
https://<host>/sap/opu/odata/sap/API_SALES_ORDER_SRV
PlugMCP fetches /$metadata itself, using the connector's credentials (Basic auth is the SAP default; bearer and custom headers work too). Or via API:
curl -X POST localhost:8080/api/connectors \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-d '{"name":"s4-sales","type":"odata",
"baseUrl":"https://my-sap/sap/opu/odata/sap/API_SALES_ORDER_SRV",
"auth":{"type":"basic","user":"…","pass":"…"}}'
Every entity set becomes tools: salesorders_list (with $filter, $select, $orderby, $top, $skip) and salesorders_get by key — with correctly typed OData key syntax. Writes (_create/_update) are generated only if you tick "allow writes", and can be gated behind human approval.
Step 3 — Scope a key
Mint an API key that sees only this connector, read-only, optionally with a daily call budget. Least privilege is the default — an agent that only needs sales orders never sees HR data.
Step 4 — Connect the agent
Claude Desktop, Claude Code and Cursor connect with the key as a bearer header. claude.ai and ChatGPT add PlugMCP as a remote connector via the built-in OAuth flow. Then ask:
"List the ten largest open sales orders for customer ACME and summarize what's blocking them."
The agent calls salesorders_list with $filter=Customer eq 'ACME' and $top=10 — governed, logged, and without ever holding SAP credentials (those stay AES-256-GCM-encrypted in the gateway).
Governance that ERP data demands
- Read-only by default — write tools exist only if you enable them.
- Human-in-the-loop — writes can wait for an admin click before executing.
- Scoped keys & budgets — per-connector access, daily call limits, expiry dates.
- Full audit — every call, caller, duration; CSV export; OpenTelemetry traces.
Also works with
Microsoft Dynamics 365, SharePoint, Business Central, Teamcenter — anything speaking OData v2/v4. And when a system doesn't have OData: PlugMCP imports SOAP/WSDL, OpenAPI, GraphQL, connects SQL databases (Postgres, MySQL, SQLite, SQL Server) and even directories of CSV exports.