Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the SAP S/4HANA (OData) in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
Let your AI read SAP S/4HANA on-premise or Private Cloud through its OData services: find services in the SAP Gateway catalog, read their fields with SAP's labels, and query journal entries, billing documents, sales orders, business partners, stock and products. Read-only, with a technical SAP user.
Try asking
Example prompts for SAP S/4HANA (OData)
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → SAP S/4HANA (OData), paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
SAP S/4HANA OData + Cursor
Let your AI read SAP S/4HANA on-premise or Private Cloud through its OData services: find services in the SAP Gateway catalog, read their fields with SAP's labels, and query journal entries, billing documents, sales orders, business partners, stock and products. Read-only, with a technical SAP user.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
SAP_ODATA_BASE_URL, SAP_CLIENT, SAP_LANGUAGE, SAP_ODATA_USER, SAP_ODATA_PASSWORD
Step 1 — Get credentials
- With transaction
SU01, create a technical user of type System (not Dialog) in the client the AI should read, and give it a productive password. - Give it a role (
PFCG) withS_SERVICEfor the OData services the AI may use and display-only business authorizations (activity 03). To let the AI browse the catalog, also allow the V2 catalog service/IWFND/CATALOGSERVICEand the V4 service catalog. - Make sure the services are active:
/IWFND/MAINT_SERVICEfor V2,/IWFND/V4_ADMINfor V4. The ready tools use SAP's released APIsAPI_JOURNALENTRYITEMBASIC_SRV,API_BILLING_DOCUMENT_SRV,API_SALES_ORDER_SRV,API_BUSINESS_PARTNER,API_MATERIAL_STOCK_SRVandAPI_PRODUCT_SRV. - Set
SAP_ODATA_BASE_URLto the Gateway host with its HTTPS port and no path, e.g.https://s4.example.com:44300. Put the three-digit client intoSAP_CLIENT(e.g.100), the logon language intoSAP_LANGUAGE(e.g.EN; field labels come back in this language), and the technical user's name and password intoSAP_ODATA_USERandSAP_ODATA_PASSWORD. - Install the connector. There is no Authorize with Provider step: the connector signs in with Basic auth as the technical user and sends the client and language with every call.
- Call
s4_guidefirst (it costs nothing and does not reach SAP), thens4_list_serviceswith a business term such asbillingto check that the user reaches the catalog.
Network: the Gateway's HTTPS port is usually reachable only inside the company network. Self-host AnythingMCP in that network or connect it through a VPN, and add the Gateway host to SSRF_ALLOWED_HOSTS, because AnythingMCP refuses private addresses otherwise. AnythingMCP Cloud works only if the Gateway is reachable from the internet.
How the AI finds the data: s4_list_services searches SAP's catalog (V2 and V4) for a business term, s4_describe_service lists a service's entity sets and flags the analytical and parameterised ones, s4_describe_entity gives each field with its SAP label, the currency or unit field of every amount and the filters a set requires, and s4_query and s4_get_entity read rows. Field names are checked against the service's $metadata before the call goes out. For the common cases, s4_journal_entry_items, s4_billing_documents, s4_sales_orders, s4_business_partners, s4_material_stock and s4_products call the released APIs directly with filter, select, orderby, top and skip. The catalog tools also work on ECC or BW with SAP Gateway; the ready tools need S/4HANA.
Permissions and read-only setup: all 12 tools only read. SAP checks the technical user's authorizations on every call, so they are the real boundary: give the role display authorizations only, and only for the company codes, sales organizations and plants the AI may see. To narrow it further, list the service paths the AI may call under Allowed services in the connector's OData settings (* works as a wildcard); other services are refused. Single tools can be disabled on the connector page.
SAP API policy: SAP expects third-party integrations to use its published APIs (the API_* services on the SAP Business Accelerator Hub) or services you built yourself. Prefer those over the internal services behind Fiori apps, and set Allowed services to match.
Basic auth or OAuth: the connector installs with Basic auth. If your Gateway is set up for OAuth 2.0, you can switch the connector's authentication to OAuth 2.0 on the connector page.
Limits: a query returns at most 1,000 rows, the ready tools 100 by default (top). For totals, the AI aggregates on analytical services, or filters by company code, sales organization or plant and by a date or fiscal period, instead of paging through everything. Amounts come with their currency and quantities with their unit; decimals come back as strings so they stay exact.
Common errors: 401 means a wrong user or password, or a user that is locked in that client. 403 Forbidden on a service means the technical user lacks the authorization for it (S_SERVICE or the business role), and 404 means the service is not active in this system. A refused private address means the host is missing from SSRF_ALLOWED_HOSTS. If the rows look like demo data, SAP_CLIENT points to the wrong client.
HANA SQL instead: if the AI should read S/4HANA's tables and CDS views directly with SQL, through a read-only database user instead of SAP's application authorizations, use the SAP S/4HANA (HANA SQL) connector. For any other OData V2 or V4 service, see the OData connector type.
The connector does not write to SAP: it posts nothing and does not create or change orders, documents or master data.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Cursor
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Cursor reads MCP servers from ~/.cursor/mcp.json. Add this entry:
{
"mcpServers": {
"anythingmcp": {
"url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart Cursor.
- Open Cursor → Settings → MCP and check that
anythingmcpis listed and connected. - Start chatting: the agent can now call the
SAP S/4HANA ODatatools.
Available tools
| Tool | What it does |
|---|---|
s4_guide | How to read SAP S/4HANA through OData: the workflow (overview), filter syntax, analytical services and KPIs, finance, sales, inventory and… |
s4_journal_entry_items | Journal entry line items from the general ledger (API_JOURNALENTRYITEMBASIC_SRV / A_JournalEntryItemBasic): company code, fiscal year, G/L… |
s4_billing_documents | Billing documents (API_BILLING_DOCUMENT_SRV / A_BillingDocument): invoices, credit memos and cancellations with date, sales organization… |
s4_sales_orders | Sales orders (API_SALES_ORDER_SRV / A_SalesOrder) with type, sales organization, sold-to party, creation date, net amount, currency and… |
s4_business_partners | Business partners (API_BUSINESS_PARTNER / A_BusinessPartner): customers, suppliers and contacts with name, category and grouping |
s4_material_stock | Material stock (API_MATERIAL_STOCK_SRV / A_MatlStkInAcctMod) per material, plant, storage location, batch and stock type, in the material's… |
s4_products | Products (API_PRODUCT_SRV / A_Product) with type, group and base unit |
s4_list_services | List the OData services published by SAP S/4HANA (OData) (SAP Gateway catalog, V2 and V4), filtered by words in their name, title or… |
s4_describe_service | The entity sets of a SAP S/4HANA (OData) OData service with their business labels, keys and whether they are analytical (the server… |
s4_describe_entity | The fields of one entity set: labels, types, keys, the currency or unit field of each amount, the text field of each code, dimensions and… |
s4_query | Read rows from an entity set of SAP S/4HANA (OData) |
s4_get_entity | Read one entity of SAP S/4HANA (OData) by its key, optionally with related entities |
Example prompts
- "Which OData services in our SAP catalog deal with billing documents, and which of them are released APIs?"
- "Show last month's net billed sales per sales organization from the billing documents, without cancelled documents, with the currency."
- "How much stock of material FG-100 do we have in plant 1000, per storage location?"
- "List the 20 largest journal entry items posted in company code 1000 last month, with G/L account, amount and currency."
FAQ
Does Cursor support custom MCP servers on the free tier? Yes, MCP is available on Hobby, Pro and Business plans.
Next steps
Was this guide helpful?