Skip to main content
Glama
SAP Data MCP

SAP Data MCP

SAP Data MCP

SAP Data MCP is organized first by deployment and then by integration route. Each provider has independent configuration, credentials, MCP registration and audit logs. The two HTTP providers share the standard business-domain implementations; neither loads PyRFC.

Provider

Target

Integration

Status

private_cloud/rfc/

S/4HANA Private Edition or On-Premise systems with RFC enabled; ECC / NetWeaver

RFC/BAPI via PyRFC + SAP NW RFC SDK

95 read-only Tools / 98 fixed RFC functions (table display, source display and a runner for reviewed display-only reports added 2026-11-10)

private_cloud/odata/

Private Edition or On-Premise systems exposing the selected standard services

Explicit OData V2/V4 over HTTPS

155 business Tools + 4 local/connection Tools

public_cloud/api/

S/4HANA Cloud Public Edition

Released OData V4/V2 APIs over HTTPS

154 business + 4 local/connection Tools

GUI / Fiori are orientation labels: RFC/BAPI covers classic backend integration, and OData/API covers Fiori-related API integration. These routes do not automate SAP GUI or Fiori pages. Standard read coverage now includes MM/IM, PP, SD, WM/EWM, FI, CO, activated master data and QM. Route-specific interface gaps are listed below; no business writes or Agent are implemented.

sap-data-mcp/
├── .venv/                  Python 3.12 virtual environment (create locally, not committed)
├── private_cloud/
│   ├── rfc/                Existing read-only RFC MCP Server and all current Tools
│   └── odata/              Private API entry point, local .env and audit logs
├── public_cloud/
│   └── api/                Public API entry point, local .env and audit logs
├── shared/                 Fixed OData client and shared tools registered by business module
├── tests/                  MM and standard-module offline regressions; no SAP login
├── requirements.txt        Shared HTTP/MCP dependencies; RFC adds PyRFC separately
├── .env.example            HTTP configuration template; copy into the selected provider
├── .gitignore
├── README.md

Each integration route runs as one MCP Server. Use client labels sap_private_rfc, sap_private_odata and sap_public_api. The RFC protocol name remains sap-data-mcp; the API protocol names are sap_private_odata and sap_public_api. All currently use version 0.2.0. Tool names can overlap between servers; clients distinguish them by server.

RFC Tool source is grouped under platform, master_data, mm, pp, sd, basis and integration, with actual WM/FI/CO/QM read modules. MCP clients receive a flat Tool list. check_odata_services stays in RFC Integration because it reads Gateway registration over RFC; the legacy HTTPS connection test also remains available under its existing Tool name.

The Python virtual environment lives at the repository root and is shared by all providers. Start the current provider from private_cloud/rfc/README.md:

cd private_cloud/rfc
..\..\.venv\Scripts\python.exe server.py

Standard modules: current delivery

Module / standard objects

RFC implementation

Private OData / Public Released API

Official scope and interface sources

PP: production/process orders and confirmations, planned orders, BOM, routing, work center, production version, PIR, master recipe

Existing production-order search/detail enriched; 6 added reads for planned/process orders and production/process confirmations

22 tools. Production/process/confirmation/BOM/routing/recipe/PIR V2; planned order, work center and production version V4. Public routing uses version 3

Manufacturing APIs, SAP-published SDK service paths/entities/keys

SD: customer and sales areas; inquiry, quotation, sales order, contract, scheduling agreement, outbound delivery, billing, return, credit/debit request

Search/detail verify SAP category C; original status items retained, full data in details; customer master read included

22 tools. API_BUSINESS_PARTNER, API_SALES_*, outbound delivery, billing, customer return and memo-request V2 APIs

Sales APIs, standard interfaces

Classic WM: stock quants and transfer orders

4 wm_* tools through BAPI_WHSE_STOCK_GET_LIST/DETAIL, BAPI_WHSE_TO_GET_LIST/DETAIL

Classic WM is not represented by the EWM APIs

Classic warehouse structure, WM BAPI reads

EWM: warehouse/types, product, bin, available stock, HU, tasks/orders, inbound/outbound delivery, inventory item/count

No unverified EWM RFC functions added

20 ewm_* tools. Warehouse/bin/HU/task/order/delivery/inventory V2; available stock and Product warehouse master V4

Orders/tasks, warehouse product

FI: company, chart, GL account, operational journal items, Universal Journal items, customer/supplier open/cleared items, GL balances, asset master/selected values, bank

14 tools: previous 11 plus asset-value search/detail and GL fiscal-period balances

18 tools. Master/entry-view/trial-balance V2; Bank and Fixed Asset master V4. Universal Journal uses SAP's documented API_GLACCOUNTLINEITEM/GLAccountLineItem request path

GL APIs, Universal Journal keys, asset master reads

CO: controlling area, cost/profit centers, activity types, statistical figures, internal order, groups, actual costs and plan/actual amounts

12 tools: previous 6 plus controlling-area list/detail, internal-order search/group detail, profit-center search and cost-center-group search

13 tools. Master V2, financial plan/actual amount views and Universal Journal cost items; cost elements reuse GL account reads

Finance APIs, master-data services

MDG: activated master data; authenticated user's request metadata on private MDG

Reuse existing master tools

3 shared master-data tools; private OData adds 1 Track My Requests tool. No private Fiori governance service is registered in the public provider

MDG Governance API, Track My Requests read collection; local ABAP classes are not remote interfaces

QM: plan, MIC, method, quality info, lot/operation/characteristic, inspection points/sample results, results/usage decision, notification, catalog/code/selected set

3 tools for lot search/detail and notification detail; selecting an operation adds its requirements/sample/results to lot detail

20 tools. Inspection/characteristic-selected-set V2; quality notification, catalog/code groups and usage-decision-selected-set V4

Lot structure, notification API, catalog reads

get_server_info returns the exact service catalog with protocol, versioned path and entities; test_sap_api_connection(service=...) accepts every catalog entry. Each business API must be available and authorized in the target release. A configured origin is not evidence that all listed APIs are installed.

Searches require business scope. Details preserve complete composite keys, native amounts/quantities/units/currencies, zero/false values and validity dates. Child views page independently with the requested offset; empty results, permission failures and partial reads remain distinct. Routing/recipe child-version collections retain their own validity instead of claiming a historical snapshot. EWM available stock is not total physical stock. FI clearing references do not establish actual payment; asset valuation master data is not a posted book value. MDG activated data is marked active and is never returned as staging data.

Follow-up tools reuse the existing modules and read helpers:

Standard object / tools

Interface and route

Official basis

Asset values: search_fixed_asset_values, get_fixed_asset_values

RFC BAPI_FIXEDASSET_GETLIST, REQUESTEDTABLESX-DEPRECIATIONAREAVALS; detail filters the complete asset/subnumber key

SAP-published BAPI SDK sources: BAPI1022_VALUES retains area/year/currency, year-end APC/NBV and planned depreciation separately

GL periods: get_gl_account_period_balances

RFC BAPI_GL_GETGLACCPERIODBALANCES; company/account/year/currency type

SAP Community original call example. No ledger, daily or business-area breakdown is claimed

Controlling areas: search_controlling_areas, get_controlling_area

RFC BAPI_CONTROLLINGAREA_GETLIST/GETDETAIL

Standard BAPI objects, detail call and authorization

Internal orders/groups: search_internal_orders, get_internal_order_group

RFC BAPI_INTERNALORDER_GETLIST, BAPI_INTERNALORDRGRP_GETDETAIL

SAP internal-order BAPI guidance, standard interface catalog

Profit centers: search_profit_centers

RFC BAPI_PROFITCENTER_GETLIST, explicit controlling area and key date

Original parameter example

Cost-center groups: search_cost_center_groups

RFC BAPI_COSTCENTERGROUP_GETLIST, exact controlling-area mask

Original group-list example. Existing detail returns SET nodes and intervals

My MDG requests: search_mdg_my_change_requests

Private OData only: MDG_MYCR_SRV/ChangeRequests; current authenticated user

SAP service catalog, read collection, service authorization. Returns metadata, not staging data

Remaining boundaries and reasons:

  • Classic WM warehouse/storage type/bin/transfer requirement: no complete remotely callable read contract was verified. SAP's WMTREQ interface creates requirements; it is not a read interface. EWM warehouse/bin APIs have different objects and keys. The four existing WM quant/transfer-order tools remain; no table-reader or custom wrapper is added.

  • FI: Use the actual asset/company depreciation area: depreciation areas differ by chart of depreciation; do not assume area 01. A master record can exist without returned value records; empty values are not zero balances. These tools do not supply arbitrary-day posted balances by ledger. The Fixed Asset OData API contains master/valuation terms. A remote amount contract and enterprise bank-account contract remain unverified. Transactional Banking accounts have industry-specific contract semantics, and trial-balance bank-account value-help IDs/texts are not full bank-account master data.

  • CO: RFC internal-order search/detail and classic group reads are available. SAP documents API_INTERNALORDER_SRV, C_COSTCENTERHIERARCHYNODE_SRV, C_PROFITCENTERHIERNODE_SRV and API_COSTCENTER_HIERARCHY; their complete remote entity/key/version contracts are still unverified here, so HTTP tools are not registered. SET groups and global hierarchies differ; the group hierarchy replication API writes data and is excluded.

  • MDG: the private request list is implemented; all-user request searches, standalone type/status catalogs, steps/objects, staging, change history, existing validation messages, key mapping and replication status remain unimplemented because their read entities/keys are not verified. MDG_APPROVE_CR exists, but its approval workflow is not treated as a generic read API. Internal Governance API classes cannot be called remotely without an SAP wrapper. No Released Public Cloud governance contract was verified, so the public provider retains master-data tools only. A configured MDG component, service and authorization are needed for live acceptance.

  • Other existing limits: the selected QM notification V4 has no activity collection; use RFC notification detail for activities. Physical sample-management master records beyond inspection-point/sample-result data are not claimed.

Unverified contracts are research gaps, not claims that SAP has no standard interface in every release. No placeholder tools are registered for them.

Related MCP server: mcp-epicor

Standard MM and IM queries

Object

RFC

Private OData / Public API

Material master

search_materials, get_material

search_materials, get_material

Supplier

search_business_partners, get_supplier

search_suppliers, get_supplier

Purchase requisition

search_purchase_requisitions, get_purchase_requisition

Same names

Purchase order

search_purchase_orders, get_purchase_order

Same names

IM material documents

search_material_documents, get_material_document

Same names

IM stock by plant/storage location

search_material_stock

get_material_stock

MM supplier invoices

search_supplier_invoices, get_supplier_invoice

Same names

IM physical inventory documents

search_physical_inventory_documents, get_physical_inventory_document

Same names

Reservations

search_reservations, get_reservation

Same names

Batch master

get_batch; batch stock via search_material_stock

search_batches, get_batch

Purchasing info records

search_purchasing_info_records, get_purchasing_info_record

Same names

Purchasing source lists

Use API route; no generic table reader

search_source_lists, get_source_list

Quota arrangements

Use API route

search_quota_arrangements, get_quota_arrangement

Purchase contracts

get_purchase_contract

search_purchase_contracts, get_purchase_contract

Purchase scheduling agreements

get_scheduling_agreement

search_scheduling_agreements, get_scheduling_agreement

Requests for quotation / supplier quotations

Use API route

search_requests_for_quotation, get_request_for_quotation, search_supplier_quotations, get_supplier_quotation

Service entry sheets

search_service_entry_sheets, get_service_entry_sheet (classic MM services)

Same names (lean services)

PO follow-on document references

get_purchase_order_history (SAP history categories, signs and years)

Same name (material-document and invoice-reference views, separately paged)

The existing RFC get_material_stock keeps its MD04/MRP view and optional storage-location detail. The RFC stock search and the API stock Tool read IM stock. Field names and stock-type codes are returned as supplied by SAP, with zero quantities preserved. API document reads return the header and paged items. Invoice reads also return G/L account items and tax views, scheduling agreements add delivery schedules, and RFQs add bidders. Each extra view pages separately; failed views produce partial results. The API PO history Tool reads material documents and MM invoice items referencing the PO; it does not reproduce every EKBE history category or infer FI payments. RFC and API parameters differ where standard interfaces differ; the Tool descriptions specify those limits.

This coverage was assessed against SAP's standard sourcing, purchasing, inventory, batch and invoice objects. It provides their basic reads, not every MM field or configuration transaction. API PO/PR account and condition expansions, separate purchasing pricing-condition records, batch classification and valuation reports are not implemented by MM tools. Separate FI tools now read accounting and clearing references; they do not establish actual payment. Source lists, quotas and RFQs use the API routes; no unsupported RFC wrappers or generic table tools were added. Batch detail uses the full Material/Batch/BatchIdentifyingPlant key in OData (empty identifying plant is meaningful); the RFC batch Tool uses the classic 18-character material input.

Added interface references: SAP's released info-record BAPI, purchasing info-record API operations, source-list API, quota reads, contract API version 2, scheduling agreements, RFQs, supplier quotations, and service-entry reads. No create/change operations from these API specifications are exposed.

Invoice search requires a supplier and both document dates (at most 366 days apart). Physical inventory search requires a plant and fiscal year; reservation search requires a plant. Invoice and physical inventory detail reads require the document number and fiscal year. Count quantities, zero amounts and API false flags are preserved; the reservation item key RecordType is retained even when empty. No payment/clearing status is inferred, and no count, recount, difference-posting or reservation-change operation is exposed. RFC reservation search uses the standard BAPI movement/final-issue selection defaults and accepts classic material numbers up to 18 characters.

The added shared API mappings use the standard V2 services in both providers: Supplier Invoice, Physical Inventory Document, Reservation Document.

Start an API provider

Create a Python 3.12 virtual environment at .venv and install requirements.txt; API providers do not require PyRFC or the SAP RFC SDK.

Copy the root .env.example into the chosen API provider as .env, and fill in its HTTPS origin and Basic or OAuth client-credentials settings. Each provider reads only its own .env plus explicit SAP_API_* environment overrides. Keep TLS verification enabled; SAP_API_CA_BUNDLE accepts a PEM CA bundle relative to that provider. No business Tool accepts credentials, arbitrary URLs or raw OData queries.

From the repository root, select one provider:

cd private_cloud/odata   # or: cd public_cloud/api
..\..\.venv\Scripts\python.exe server.py

Connect an MCP client to that process, then call health_check, get_server_info, and test_sap_api_connection(service="material"). The connection Tool checks one service's metadata and reports missing entities; it does not prove all services are available. No additional project-specific Agent is required to invoke the Tools.

API searches require business filters. max_results (1-500) and offset page the results in SAP; server-driven paging is followed only within the same origin and entity. next_offset is returned when more results exist. A missing service/permission is an error; a successful empty collection is not_found. After HTTP 401, the process does not retry credentials; correct the configuration and restart it. The only POST is OAuth token acquisition; all business calls are fixed GET reads.

API Tool calls are logged under the selected provider's logs/tool_calls_YYYY-MM-DD.jsonl. Logs contain Tool arguments, status, duration and API paths, with configured credentials and tokens redacted. Read them with get_tool_call_log.

Verification and remaining prerequisites

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for SAP S/4HANA via the ADT API, enabling querying and reading SAP systems with production write protection.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables read-only access to Epicor Kinetic ERP data, including sales orders, customers, parts, and shipments, through secure MCP tools.
      4
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Turns any OData V2 or V4 service, SAP Gateway included, into MCP tools that AI clients such as Claude, ChatGPT, Copilot, and Cursor can call without code by reading $metadata. It lets models discover entity sets and fields, then query services through built-in read-only tools.
      AGPL 3.0