Enterprise ERP OData MCP Server
Provides a deny-by-default OData v4 gateway for SAP S/4HANA, exposing Clean-Core entity sets such as A_PurchaseOrder, A_SalesOrder, A_JournalEntryItem (ACDOCA) and A_MaterialStock. Validates every $select/$filter/$orderby/$expand/$top against released CSDL metadata, enforces CompanyCode (BUKRS) row-level authorization, masks PII fields like VendorIBAN and CustomerTaxId, and gates mutating actions such as purchase order release behind human approval tokens plus PO/GR/IR three-way-match invariants, recording all calls in a tamper-evident audit ledger. Can be pointed at a live SAP BTP / S/4HANA Cloud endpoint by swapping the row-fetch adapter.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Enterprise ERP OData MCP Server (v1.0.0)
SAP S/4HANA & Enterprise ERP OData v4 Model Context Protocol (MCP) Server with Clean-Core Schema Validation, C++20 $filter / BUKRS Row-Level Guardrails, PII Masking & Tamper-Evident Audit Logging (CLI · FastAPI :8270 · MCP stdio · React 18 Workbench)
Executive Business Impact & Enterprise ROI (20-Second Scan)
Enterprise Failure Mode Eliminated: Connecting AI agents directly to SAP S/4HANA or enterprise ERP APIs without deterministic boundary controls causes four severe production failures: (1) hallucinated legacy
Z-*fields and raw table queries (BSEG/EKKO) that violate SAP Clean Core, (2) prompt-injected$filtertautologies (or 1 eq 1) and$batchsmuggling, (3) cross-entity CompanyCode (BUKRS) financial data leakage or unredacted IBAN/Tax-ID exposure, and (4) unapproved autonomous Purchase Order / ledger mutations.What
enterprise-erp-odata-mcp-serverDelivers: A deny-by-default OData v4 MCP gateway that validates every$select,$filter,$orderby,$expand, and$topparameter against typed EDM (CSDL) metadata outside the LLM prompt, enforces vectorized C++20BUKRSrow-level authorization and automatic PII masking, gates mutating ERP actions behind fresh human approval tokens (APR-...) + 3-way match (PO == GR == IR) invariants, and records every allowed or blocked call in a SHA-256 + C++20 SplitMix64 hash-chained audit ledger.Measured Systems Proof (Apple Silicon / Clang
-O3 -std=c++20& Ubuntu Python3.13):
67.03xNative C++20 Guardrail Speedup:0.101 ms(clang++ -O3 -std=c++20via zero-copyarraybuffers) vs6.783 ms(pure-Python reference twin) across a20,000-rowBUKRSauthorization pass +$filtersecurity scan +25,000-record SplitMix64 audit-chain verification.Strict Engineering Hygiene:
mypy --strict(0errors),ruff(0warnings),98.05%pytest branch coverage (including Hypothesis property-based C++20/Python parity suites),Apache-2.0license, and a React 18 + TypeScript Clean-Core Workbench UI.
60-Second Quickstart
git clone https://github.com/nagarjunak-pixel/enterprise-erp-odata-mcp-server.git
cd enterprise-erp-odata-mcp-server
uv sync --python 3.13 --all-extras
# 1. Run 6 SAP S/4HANA Clean-Core OData guardrail scenarios + C++20 benchmark
uv run erp-odata-mcp demo
# 2. Benchmark C++20 $filter scanner, 20K-row BUKRS RBAC & 25K-entry audit chain
uv run erp-odata-mcp bench --rows 20000 --audit-len 25000
# 3. Execute a governed OData v4 query from CLI, FastAPI (:8270), or stdio MCP
uv run erp-odata-mcp query A_PurchaseOrder -f "GrossAmount ge 25000" -c "1000"
uv run erp-odata-mcp serve --port 8270
uv run erp-odata-mcp mcpRelated MCP server: SAP S/4HANA MCP Server
Architecture & Guardrail Pipeline
flowchart LR
AGENT["AI Agent / Claude Code / Copilot<br/>(MCP JSON-RPC 2.0 or REST)"] --> GW["ODataGuardrailGateway<br/>(Out-of-Prompt Policy Boundary)"]
GW --> CSDL["1. Clean-Core EDM Schema Gate<br/>(A_PurchaseOrder · A_SalesOrder ·<br/>A_JournalEntryItem · A_MaterialStock)"]
CSDL --> SCAN["2. C++20 $filter Security Scanner<br/>(Blocks '1 eq 1', ';--', '$batch',<br/>unbalanced parens & cost DoS)"]
SCAN --> AST["3. Recursive-Descent $filter AST<br/>(Zero-eval() EDM Literal Typecheck)"]
AST --> RBAC["4. C++20 BUKRS Row-Level RBAC<br/>+ Automatic IBAN / Tax-ID Redaction"]
RBAC --> MUT["5. Action Gate (Human Token APR-...<br/>+ MM 3-Way Match Invariant)"]
MUT --> AUDIT["6. Tamper-Evident Audit Ledger<br/>(SHA-256 + C++20 SplitMix64 Chain)"]Released SAP S/4HANA Clean-Core EntitySets Included
OData v4 EntitySet | SAP Module | Clean-Core CDS Projection | Enforced Guardrails |
|
|
|
|
|
|
|
|
|
|
| Strict |
|
|
| Plant & |
6 Built-In Enterprise Verification Scenarios (uv run erp-odata-mcp demo)
Authorized Clean-Core Query (
ALLOWED): QueriesA_PurchaseOrder(GrossAmount ge 25000) forCompanyCode=1000(Dubai HQ)—returns2authorized rows, filters2cross-company (2000/3000) rows in C++20, and masksVendorIBAN(AE07***REDACTED***456).Hallucinated Legacy Z-Field (
BLOCKED): RejectsZZ_DIRTY_REBATE_CODE(UNKNOWN_SELECT_FIELD,UNKNOWN_FILTER_FIELD) with exact releasedI_PurchaseOrderAPI01field remediation.Prompt-Injected OData Tautology (
BLOCKED): C++20 lexical scanner catchesCompanyCode eq '1000' or 1 eq 1(FILTER_INJECTION_BLOCKED) before execution.Silent Autonomous ERP Write (
BLOCKED): Blocksodata_simulate_po_releasewhenhuman_approval_tokenis missing (MISSING_HUMAN_APPROVAL).Goods-Receipt / Invoice Variance Hold (
BLOCKED): Blocks PO4500010902release even with a valid human token becauseThreeWayMatchStatus == 'VARIANCE_HOLD'(THREE_WAY_MATCH_FAILED).Human-Approved + 3-Way-Matched Release (
ALLOWED): Releases PO4500010901(MATCHED+APR-2026-DXB-8820) and verifies cryptographic hash-chain integrity across all6audit entries.
Measured Benchmarks
Workload | Native C++20 ( | Pure-Python Reference | Speedup |
|
|
|
|
Scope Boundaries & Production Deployment Notes
Deterministic Clean-Core Sandbox Out of the Box: Ships with an in-memory multi-company (
1000AED,2000SAR,3000GBP) SAP S/4HANA sandbox so CI, demos, and interviews run offline in<1second with zero SAP credentials required. Connecting to a live SAP BTP / S/4HANA Cloud OData v4 endpoint replaces the row-fetch adapter behindODataGuardrailGatewaywhile keeping the exact same pre-execution validation,BUKRSfiltering, PII redaction, and audit chain.Subset OData v4 Grammar by Design: Intentionally supports auditable Clean-Core predicates (
eq,ne,gt,ge,lt,le,and,or,not,startswith,endswith,contains) and blocks$batch,any()/all()collection lambdas, and unbounded$expandtrees to prevent ERP database DoS.
Verification & CI Quality Gates
uv run ruff format --check src tests
uv run ruff check src tests
uv run mypy src tests
uv run pytest --cov=erp_odata_mcp --cov-report=term-missing --cov-fail-under=95
cd ui && npm ci && npm run buildAuthor & License
Engineered by Nagarjuna Kamireddy (Website · GitHub · LinkedIn). Released under the Apache-2.0 License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI agent security, MCP 2026 schema & graph audits, <250ms guardrails, and compliance dossiers
Runtime AI governance: decision gates, human approval, hash-chained audit, compliance mapping.
Governance copilot for AI-assisted coding. 72 packs, 532 rules, proof bundles.
Governed access to sensitive data, secrets and APIs for AI agents. A signed proof for each decision.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.1113MIT
- FlicenseAqualityDmaintenanceEnables interaction with SAP S/4HANA systems via OData, allowing service discovery, metadata exploration, field value retrieval, and CRUD operations through natural language.45-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to safely discover and validate SAP Business Data Cloud contracts (ORD, CSN, share plans) with enterprise guardrails like redaction and read-only defaults.4MIT
- AlicenseAqualityBmaintenanceEnables AI agents to securely read and write SAP ABAP development objects via the ADT REST API, enforcing policy-based guardrails such as package/namespace allow-lists, read-only mode, human approvals, and audit logging.82MIT