Enables natural language interactions with SAP S/4HANA or ECC systems by exposing all OData services as dynamic MCP tools, supporting CRUD operations on entities like customers, purchase orders, banks, and other business data through conversational queries.
SAP OData to AI-Powered MCP Server (Optimized Playground)
This repository is an experimental and optimized environment based on the original project btp-sap-odata-to-mcp-server by @lemaiwo. It has been enhanced with AI capabilities, a hierarchical tool architecture, a powerful interactive UI suite, and a robust authentication system for enterprise scenarios.
✨ Key Features
- 🧠 Hierarchical Tools & Smart Router: The
sap-smart-query
tool acts as a universal entry point. It interprets requests (in natural language or OData) and orchestrates the optimal workflow, simplifying the user experience by abstracting the complexity of over 17 underlying tools. - 🎨 Interactive UI Tools Suite: A suite of 5 integrated tools for creating rich, interactive SAP Fiori-based user experiences directly from data:
ui-form-generator
: Dynamically generates SAP Fiori forms with built-in validation for creating and editing data.ui-data-grid
: Creates interactive tables with sorting, filtering, pagination, and data export capabilities.ui-dashboard-composer
: Builds KPI dashboards with real-time charts and graphs for data visualization.ui-workflow-builder
: Allows for the creation of visual workflow processes with approval steps and custom logic.ui-report-builder
: Generates analytical reports with drill-down capabilities for in-depth data exploration.
- 🔄 End-to-End Workflow Integration: UI tools are automatically and intelligently suggested in context after SAP data operations, creating seamless data-to-UI workflows without manual intervention.
- 🔐 Enterprise-Grade Authentication: Features native integration with SAP BTP's security services (XSUAA and IAS). It supports a session-based authentication flow, role-based access control (RBAC), and principal propagation for a secure, enterprise-ready setup.
- 🤖 AI and Real-time Capabilities: Includes a suite of advanced tools for:
- Natural language to OData query conversion.
- AI-driven data analysis and trend identification.
- Query performance optimization.
- Real-time data streaming and KPI monitoring.
- ☁️ Cloud-Native and Optimized: Designed for efficient deployment on SAP BTP, Cloud Foundry. It includes structured logging, health check endpoints, and graceful shutdown for robust lifecycle management in a cloud environment.
🚀 Quick Start
Prerequisites
- Access to an SAP BTP, Cloud Foundry environment.
- Required BTP services: XSUAA, Identity, Connectivity, Destination.
- Node.js >= 18.
1. Installation
2. Configuration
Copy the .env.example
file to .env
and populate the required variables for your SAP IAS tenant and other configurations.
3. Build and Deploy
📚 Documentation
For a detailed understanding of the project, please refer to the complete documentation.
- Getting Started: The main hub for all documentation.
- Architecture Overview: A deep dive into the system's architecture, including the hierarchical tool model and the smart router.
- Tool Reference: Detailed documentation for all available tools, with parameters and examples.
- User Guide: A step-by-step guide on how to authenticate and use the tools.
- Deployment Guide: Instructions for deploying the application to SAP BTP and for local development.
- Configuration Guide: A comprehensive guide to all environment variables and security configurations.
- Testing Guide: Information on how to run and extend the test suite.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Transforms SAP S/4HANA or ECC systems into conversational AI interfaces by exposing all OData services as dynamic MCP tools. Enables natural language interactions with ERP data including querying, creating, updating, and deleting entities through SAP BTP integration.