Btp Sap Odata To Mcp Server Optimized

io.github.Raistlin82由 GitHub 账号 Raistlin82 发布v1.0.1更新于 Oct 24, 2026

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

概览

AI 生成的概览

将 SAP OData 服务接入 AI 助手,使其能够发现服务、把自然语言请求转换为 OData 查询,并生成 SAP Fiori 风格的界面组件。

可以做什么
按模式、业务领域或白名单发现并筛选 SAP OData 服务,默认排除测试和调试服务。通过智能查询路由把自然语言请求转换为 OData 查询。运行分层工具,自动串联和编排 SAP 工作流。生成 Fiori 表单、数据表格、KPI 仪表板、工作流构建器和分析报表等交互式界面组件。监控 KPI 与趋势,并提供健康检查和性能指标。
适用场景
适合需要让助手操作 SAP BTP 与 S/4HANA OData 服务的场景,尤其是用自然语言查询业务数据或组装 SAP 风格表单、表格和仪表板。适用于已运行 SAP BTP 并具备 Cloud Foundry、XSUAA、Identity、Connectivity 和 Destination 服务的团队。
运行要求
以 npm 包形式在本地通过 stdio 运行,需要 Node.js 18 或更高版本。需要访问 SAP BTP Cloud Foundry 环境,并具备 XSUAA、Identity、Connectivity 和 Destination 服务。必需的环境变量为 SAP_DESTINATION_NAME、SAP_IAS_URL、SAP_IAS_CLIENT_ID 和 SAP_IAS_CLIENT_SECRET;可选变量包括 ODATA_DISCOVERY_MODE、包含/排除模式、PORT 和 NODE_ENV。
安装前请注意
需要 SAP_IAS_CLIENT_SECRET 中的 OAuth 客户端密钥和 SAP BTP 凭据,应避免写入日志或共享配置。发现设置可能一次暴露大量服务,生产环境建议使用白名单模式。该服务器可查询并操作真实的 SAP 业务数据,连接生产系统前应确认纳入的服务范围。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Btp Sap Odata To Mcp Server Optimized,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

来源:README.md,提交 46fcae0

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分