
一个配置驱动的MCP(模型上下文协议)服务器,作为MCP工具展示OData和REST API。这使得像Claude这样的AI助手能够通过自然的......查询、管理和监控SAP后端。
概览
一个基于配置的MCP(模型上下文协议)服务器,将OData和REST API作为MCP工具暴露。这使得像Claude这样的AI助手能够通过自然语言查询、管理和监控SAP后端。 该服务器运行在SAP BTP Cloud Foundry上,并通过BTP目的地实现与OData API的安全、令牌管理连接。 - 跨6个API类别,自动注册为MCP工具——在API允许的情况下列出、获取、创建、更新和删除操作——$filter、$select、$expand、$orderby、$top、$skip和$inlinecount——专门用于相关实体的工具(例如,iFlow配置、消息附件、错误详情)——仅通过配置启用所需的API类别——BTP部署支持可流式HTTP,本地Claude Desktop使用stdio——令牌通过BTP目的地服务透明刷新 服务器在启动时解析BTP目的地,以获取云集成租户URL和OAuth2凭证。
概述(AI 翻译)
一个基于配置的MCP(模型上下文协议)服务器,将OData和REST API作为MCP工具暴露。这使得像Claude这样的AI助手能够通过自然语言查询、管理和监控SAP后端。
该服务器运行在SAP BTP Cloud Foundry上,并通过BTP目的地实现与OData API的安全、令牌管理连接。
特色
- 32个OData实体集,涵盖6个API类别,自动注册为MCP工具
- 完整CRUD支持——在API允许的情况下,列出、获取、创建、更新和删除操作
- OData V2 查询功能 –
$filter、$select、$expand、$orderby、$top、$skip和$inlinecount - 导航属性遍历——专门用于相关实体的工具(如iFlow配置、消息附件、错误详情)
- 基于类别的过滤——仅通过配置启用你需要的API类别
- 双传输模式——用于BTP部署的可流式HTTP,用于本地Claude桌面使用的stdio
- 自动OAuth令牌管理——令牌通过BTP目的地服务透明刷新
建筑
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
OData MCP Proxy
A config-driven MCP (Model Context Protocol) server that exposes OData and REST APIs as MCP tools. This enables AI assistants such as Claude to query, manage, and monitor SAP backends through natural language.
The server runs on SAP BTP Cloud Foundry and uses BTP Destinations for secure, token-managed connectivity to OData APIs.
Features
- 32 OData entity sets across 6 API categories, automatically registered as MCP tools
- Full CRUD support – list, get, create, update, and delete operations where the API permits
- OData V2 query capabilities –
$filter,$select,$expand,$orderby,$top,$skip, and$inlinecount - Navigation property traversal – dedicated tools for related entities (e.g., iFlow configurations, message attachments, error details)
- Category-based filtering – enable only the API categories you need via configuration
- Dual transport modes – Streamable HTTP for BTP deployment, stdio for local Claude Desktop use
- Automatic OAuth token management – tokens are refreshed transparently via the BTP Destination Service
Architecture
Claude / AI Assistant
|
| MCP Protocol (stdio or HTTP)
v
OData MCP Proxy
|
| OData V2 + JSON
v
OData Client
|
| OAuth2 (via BTP Destination Service)
v
BTP Destination
|
v
SAP Cloud Integration
OData Admin APIs
The server resolves a BTP Destination at startup to obtain the Cloud Integration tenant URL and OAuth2 credentials. On each API call, the destination is re-resolved to ensure tokens remain valid. The OData client translates MCP tool invocations into OData V2 HTTP requests and returns structured JSON results to the AI assistant.
Prerequisites
- Node.js 20+ (18+ minimum, 20+ recommended)
- SAP BTP account with a Cloud Foundry environment
- SAP Integration Suite tenant (Cloud Integration capability)
- BTP Destination configured to point to your Cloud Integration tenant’s OData API with OAuth2 authentication
- Cloud Foundry CLI (
cf) and MBT Build Tool (mbt) for BTP deployment
Quick Start (Local Development)
1. Clone and install
git clone
cd odata-mcp-proxy
npm install
2. Configure environment
cp .env.example .env
Edit .env and set at minimum:
SAP_DESTINATION_NAME=your_ci_destination_name
MCP_TRANSPORT=stdio
Note: For local development with stdio transport, you must have BTP Destination Service credentials available in your environment (e.g., via
VCAP_SERVICESor adefault-env.jsonfile).
3. Build and run
npm run build
npm run start:stdio
Or use the development watcher:
npm run dev
4. Connect from Claude Desktop
Add the server to your Claude Desktop MCP configuration (claude_desktop_config.json):
{
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"odata-mcp-proxy": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/odata-mcp-proxy",
"env": {
"SAP_DESTINATION_NAME": "your_ci_destination_name",
"MCP_TRANSPORT": "stdio"
}
}
}
}