This bridges SAP OData services with Claude through a Cloud Foundry native MCP server that handles authentication via IAS, OAuth2, JWT, or Basic Auth with XSUAA integration. It exposes 17+ tools organized in layers: core OData operations like query and create, smart query routing that converts natural language to OData, and UI generation tools for Fiori forms, data grids, and dashboards. The pattern based discovery system lets you filter services by include/exclude rules or business domains like sales and finance. Reach for this when you need Claude to read from or write to SAP systems with proper principal propagation and role based access control, especially in enterprise BTP environments where you're already running on Cloud Foundry.
This repository is an enterprise-ready MCP (Model Context Protocol) server that bridges SAP OData services with AI capabilities. Based on the original project btp-sap-odata-to-mcp-server by @lemaiwo, this optimized version features enhanced security, simplified configuration, modular authentication, and comprehensive Cloud Foundry integration.
ui-form-generator: Dynamic SAP Fiori forms with validationui-data-grid: Interactive tables with sorting and filteringui-dashboard-composer: Real-time KPI dashboardsui-workflow-builder: Visual workflow creationui-report-builder: Analytical reports with drill-downgit clone <this-repo>
cd btp-sap-odata-to-mcp-server-optimized
npm install
Configure the application using environment variables. See the Configuration Guide for detailed documentation.
cp .env.example .env
# Edit .env with your configuration
# Authentication
SAP_IAS_URL=https://your-tenant.accounts.ondemand.com
SAP_IAS_CLIENT_ID=your-client-id
SAP_IAS_CLIENT_SECRET=your-secret
# OData Discovery (Simplified)
ODATA_DISCOVERY_MODE=pattern
ODATA_INCLUDE_PATTERNS=*API*,Z*
ODATA_EXCLUDE_PATTERNS=*_TEST*,*_TEMP*
ODATA_MAX_SERVICES=50
# Destinations
SAP_DESTINATION_NAME=SAP_S4HANA
# Build the TypeScript source code for BTP
npm run build:btp
# Deploy to SAP BTP, Cloud Foundry
npm run deploy:btp
Complete documentation is available with structured navigation for all aspects of the project.
Main navigation center with use-case-based guidance and complete file index.
| Category | Document | Description |
|---|---|---|
| Getting Started | Configuration Guide | Environment setup, OData discovery, CF deployment |
| Architecture | Architecture Overview | System design, security model, tool hierarchy |
| 🎨 Modern Diagrams | Modern Architecture Diagrams | NEW! Interactive visual architecture |
| Usage | User Guide | Authentication, tool usage, workflow examples |
| Reference | Tool Reference | Complete tool documentation with parameters |
| Deployment | Deployment Guide | SAP BTP and local development setup |
| Development | Testing Guide | Test suite and development guidelines |
| Changes | Changelog | Version history and feature updates |
README.md → docs/README.md → All Documentation
↓ ↓
Quick Start → Structured Navigation → Complete Coverage
SAP_IAS_URL*URL of the SAP Identity Authentication Service tenant
SAP_IAS_CLIENT_ID*Client ID for the OAuth application in IAS
SAP_IAS_CLIENT_SECRET*secretClient Secret for the OAuth application in IAS
SAP_DESTINATION_NAME*Name of the BTP destination used for service discovery
ODATA_DISCOVERY_MODEOData discovery mode: pattern, business, whitelist, or all
ODATA_INCLUDE_PATTERNSComma-separated patterns to include (pattern mode)
ODATA_EXCLUDE_PATTERNSComma-separated patterns to exclude (pattern mode)
PORTThe port on which the Express server will listen
NODE_ENVThe application's operating environment