Btp Sap Odata To Mcp Server Optimized

io.github.Raistlin82Published by GitHub account Raistlin82v1.0.1Updated Oct 24, 2026

Enterprise SAP OData to MCP Server with AI capabilities and Cloud Foundry integration

Overview

AI-generated overview

Bridges SAP OData services to an AI assistant, letting it discover services, translate natural-language requests into OData queries, and build SAP Fiori-style U

What you can do
Discover and filter SAP OData services by pattern, business domain, or whitelist, with test and debug services excluded by default. Translate natural-language requests into OData queries through a smart query router. Run hierarchical tools that chain and orchestrate SAP workflows automatically. Generate interactive UI pieces such as Fiori forms, data grids, KPI dashboards, workflow builders and analytical reports. Monitor KPIs and trends, with health checks and performance metrics.
When to use it
Useful when an assistant needs to work with SAP BTP and S/4HANA OData services, especially for querying business data in natural language or assembling SAP-style forms, grids and dashboards. It suits teams already running SAP BTP with Cloud Foundry, XSUAA, Identity, Connectivity and Destination services.
Requirements
Runs locally as an npm package (Node.js 18 or later) over stdio. Needs access to an SAP BTP Cloud Foundry environment with XSUAA, Identity, Connectivity and Destination services. Required environment variables: SAP_DESTINATION_NAME, SAP_IAS_URL, SAP_IAS_CLIENT_ID and SAP_IAS_CLIENT_SECRET; optional ones include ODATA_DISCOVERY_MODE, include/exclude patterns, PORT and NODE_ENV.
Before you install
Requires an OAuth client secret in SAP_IAS_CLIENT_SECRET and SAP BTP credentials; keep them out of logs and shared configuration. Discovery settings can expose many services at once, so use whitelist mode in production. The server can query and act on live SAP business data, so review which services are included before connecting it to production systems.

Installation

In SourceWeft

  1. Open Btp Sap Odata To Mcp Server Optimized in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

SAP OData to AI-Powered MCP Server (Optimized)

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.

✨ Key Features

🔐 Enhanced Security Architecture

  • Modular Authentication System: Factory pattern supporting IAS, OAuth2, JWT, Basic Auth, and API Keys
  • Secure Session Management: Thread-safe session bridging with proper locking mechanisms
  • Role-Based Access Control: Granular permissions with XSUAA integration
  • Principal Propagation: Maintains user context throughout the request lifecycle
  • Security Best Practices: No sensitive data logging, secure error handling, JWT validation

🎯 Simplified OData Discovery

  • Pattern-Based Filtering: Simple include/exclude patterns for service discovery
  • Business Domain Mode: Pre-configured domains (sales, finance, HR, etc.)
  • Whitelist Mode: Explicit service control for production environments
  • Smart Defaults: Automatic exclusion of test/debug services

🧠 AI-Powered Capabilities

  • Smart Query Router: Natural language to OData conversion
  • Hierarchical Tool Architecture: 17+ tools organized in logical layers
  • Intelligent Workflow Orchestration: Automatic tool chaining and optimization
  • Real-time Analytics: KPI monitoring and trend analysis

🎨 Interactive UI Tools Suite

  • ui-form-generator: Dynamic SAP Fiori forms with validation
  • ui-data-grid: Interactive tables with sorting and filtering
  • ui-dashboard-composer: Real-time KPI dashboards
  • ui-workflow-builder: Visual workflow creation
  • ui-report-builder: Analytical reports with drill-down

☁️ Cloud-Native Features

  • Cloud Foundry Optimized: Native integration with CF services
  • Structured Logging: SAP Cloud Logging with fallback support
  • Health Monitoring: Comprehensive health check endpoints
  • Performance Metrics: Built-in performance tracking
  • Graceful Shutdown: Proper resource cleanup

🚀 Quick Start

Prerequisites

  • Access to an SAP BTP, Cloud Foundry environment.
  • Required BTP services: XSUAA, Identity, Connectivity, Destination.
  • Node.js >= 18.

1. Installation

bash
git clone <this-repo>cd btp-sap-odata-to-mcp-server-optimizednpm install

2. Configuration

Configure the application using environment variables. See the Configuration Guide for detailed documentation.

bash
cp .env.example .env# Edit .env with your configuration
Quick Configuration Example
bash
# AuthenticationSAP_IAS_URL=https://your-tenant.accounts.ondemand.comSAP_IAS_CLIENT_ID=your-client-idSAP_IAS_CLIENT_SECRET=your-secret
# OData Discovery (Simplified)ODATA_DISCOVERY_MODE=patternODATA_INCLUDE_PATTERNS=*API*,Z*ODATA_EXCLUDE_PATTERNS=*_TEST*,*_TEMP*ODATA_MAX_SERVICES=50
# DestinationsSAP_DESTINATION_NAME=SAP_S4HANA

3. Build and Deploy

bash
# Build the TypeScript source code for BTPnpm run build:btp
# Deploy to SAP BTP, Cloud Foundrynpm run deploy:btp

📚 Documentation

Complete documentation is available with structured navigation for all aspects of the project.

🏠 Documentation Hub

Main navigation center with use-case-based guidance and complete file index.

🚀 Quick Links

CategoryDocumentDescription
Getting StartedConfiguration GuideEnvironment setup, OData discovery, CF deployment
ArchitectureArchitecture OverviewSystem design, security model, tool hierarchy
🎨 Modern DiagramsModern Architecture DiagramsNEW! Interactive visual architecture
UsageUser GuideAuthentication, tool usage, workflow examples
ReferenceTool ReferenceComplete tool documentation with parameters
DeploymentDeployment GuideSAP BTP and local development setup
DevelopmentTesting GuideTest suite and development guidelines
ChangesChangelogVersion history and feature updates

📖 Navigation Flow

README.md → docs/README.md → All Documentation     ↓           ↓Quick Start → Structured Navigation → Complete Coverage

Source: README.md at commit 46fcae0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts