SAP MCP Servers (OData + Business One)
Provides structured AI-agent access to SAP data through OData and SAP Business One Service Layer APIs, including read/query tools for business partners, products, sales orders, purchase orders, suppliers, items, and invoices, plus gated write tools for creating and updating business partners with dry-run support and independent read-back verification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SAP MCP Servers (OData + Business One)list the most recent sales orders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sap-mcp — SAP MCP servers (OData + Business One)
Two MCP servers that give an AI agent structured access to SAP data:
server | target | tools | transport | doc |
| SAP OData ( | 9 × | stdio or HTTP | |
| SAP Business One Service Layer ( | 11 × | stdio or HTTP |
Both follow the same rules, because handing an agent a write path into an ERP needs more than a "trust me":
read-first — the read surface is complete before any write tool exists;
writes are gated — every write tool is blocked unless
SAP_WRITE_ENABLED=1(OData) /SAP_B1_WRITE_ENABLED=1(Business One) is set in the server's own env;writes are proven, not asserted — a create/update is followed by an independent read-back and the result is reported as
read-back_ok;dry_runfirst — write tools acceptdry_run=Trueand return the exact payload they would send;credentials never travel through tool arguments — they come from the env/config file, and
*_healthreports the target without ever echoing the password;no SAP account needed to believe any of this — a local mock of each API ships in the repo and the test suite runs the whole stack against it.
Prove it in two commands
pip install -r requirements.txt
python3 tests/verify_stack.py # OData server, mock SAP sandbox
python3 tests/verify_b1.py # Business One server, mock B1 service layerVerified output on this repo (aarch64 Linux, Python 3.12, no SAP system involved):
OData -> 12/12 checks passed
PASS mcp: tools/list exposes the full surface -- 9 tools exposed
PASS mcp: tools/call write tool + read-back -- dry-run OK; real create via MCP
verified by independent read-back
B1 -> 16/16 checks passed
PASS MCP: tools/list exposes the B1 toolset -- 11 tools exposed
PASS MCP: health tool reports the company without leaking the password
-- company=SBODEMO, password never returnedThe tests bind free ports automatically, so they can run next to a live server instead of silently talking to whatever already holds port 8791/8795.
Related MCP server: SAP S/4HANA MCP Server
Run the servers
# OData over streamable HTTP (endpoint: http://127.0.0.1:8791/mcp)
python3 mcp_server.py --http --host 127.0.0.1 --port 8791
# Business One over streamable HTTP (endpoint: http://127.0.0.1:8793/mcp)
python3 mcp_server_b1.py --http --host 127.0.0.1 --port 8793
# or stdio, for clients that spawn a process (Claude Code, Codex, OpenCode, Cursor)
python3 mcp_server.py --stdioClient entries:
// HTTP client (Hermes, n8n, anything that speaks streamable HTTP)
{ "mcpServers": { "sap-odata": { "url": "http://127.0.0.1:8791/mcp" } } }
// stdio client - command + args + the SAP_* env vars from .env.example
{ "mcpServers": { "sap-b1": { "command": "/path/to/venv/bin/python",
"args": ["/path/to/sap-mcp/mcp_server_b1.py", "--stdio"],
"env": { "SAP_B1_COMPANY_DB": "SBODEMO" } } } }Tools
OData (sap_*) — sap_health, sap_list_business_partners,
sap_get_business_partner, sap_list_products, sap_list_sales_orders,
sap_list_purchase_orders, sap_list_suppliers, sap_odata_query,
sap_create_business_partner.
Business One (b1_*) — b1_health, b1_count, b1_query,
b1_list_business_partners, b1_get_business_partner, b1_list_items,
b1_list_orders, b1_list_invoices, b1_list_purchase_orders,
b1_create_business_partner, b1_update_business_partner.
*_query takes an OData query string and returns JSON-safe dicts (never raw HTTP
objects), so the caller can reason over the result directly.
Governance
behaviour | detail |
default posture | read + query; every write tool refuses with |
enabling writes | set |
dry run |
|
proof | after a real write the server re-reads the record and returns |
secrets | read from env or |
Layout
mcp_server.py OData MCP server (9 tools)
mcp_server_b1.py Business One MCP server (11 tools)
sap_odata/ OData client, config, tool layer
sap_b1/ B1 client, config, tool layer
mock_sap/ local OData mock (FastAPI)
mock_b1/ local B1 Service Layer mock (FastAPI)
tests/verify_stack.py 12 end-to-end checks against the OData mock
tests/verify_b1.py 16 end-to-end checks against the B1 mockLimits (deliberate, documented)
OData/Service-Layer transport only. RFC/BAPI/JCo is not supported: SAP's NetWeaver RFC SDK ships for
linuxx86_64andppc64leonly, so a pure-Python stack on ARM Linux cannot load it. Legacy RFC needs a separate x86_64 node.The mocks cover the shapes the tests exercise, not every SAP edge case — point
SAP_BASE_URL/SAP_B1_BASE_URLat a real system (or the SAP sandbox with an API key) for the real thing.sap_*writes are limited to what the sample services expose (e.g. create a business partner); extendsap_odata/tools.pyrather than relaxing the gate.
License
MIT — see LICENSE.
Part of my always-on agent stack · Awesome Agent Infrastructure (135 live-checked building blocks).
This server cannot be deployed
Maintenance
Related MCP Connectors
Any REST/SOAP/GraphQL/OData/SQL API as MCP tools for Claude & ChatGPT. 299 connectors: SAP, ERP.
- odooOAuthcom.odooconsole
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Global B2B intelligence for AI agents: 35M+ companies, 1.6M sanctions, KYB pack. 78 tools.
Sandbox workspace tools: search, file read, DB queries, integrations. Returns synthetic data.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI assistants to integrate with SAP systems via OData REST APIs for querying entity sets, performing CRUD operations, and executing function imports. It features automatic service discovery, CSRF token management, and smart connection handling without requiring the SAP RFC SDK.1112-
- FlicenseAqualityDmaintenanceEnables interaction with SAP S/4HANA systems via OData, allowing service discovery, metadata exploration, field value retrieval, and CRUD operations through natural language.45-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with SAP Business One via Service Layer REST API to retrieve and create business data such as partners, orders, invoices, items, and stock levels through natural language.1-
- FlicenseNot gradedqualityDmaintenanceSimulates and intermediates integrations with SAP via OData, exposing automated tools for AI agents and assistants.-