rfc-mcp
rfc-mcp
一个 MCP 服务器,通过以发现优先(discovery-first)的接口,将 SAP 支持 RFC 的函数模块(BAPI/RFC)暴露给 AI 代理,基于 SAP 的 pyrfc 连接器构建——并附带自动 ABAP 源码读取(ADT 可达时使用 ADT,否则透明回退到 RFC,参见
docs/adt_rfc_integration_plan.md)。
安装
参见 docs/setup.md 了解 SAP NW RFC SDK + Python 3.11 前置条件(真实 SAP 调用生效前必需),以及 docs/architecture.md 了解分层概览,包括读写策略模型、通用表读取守卫(generic-table-reader guard)和审计日志。
前置条件安装完成后的快速开始:
uv sync --extra dev
copy .env.example .env # fill in connection + policy settings
uv run pytest # unit tests, fake pyrfc, no SAP needed
uv run mcp dev src/rfc_mcp/mcp/server.py真实的 SAP 连接还需要专有的 SAP NW RFC SDK 以及已归档/下架的 pyrfc==3.3.1 连接器。在运行 uv sync --extra sap 或冒烟测试之前,请先阅读 docs/setup.md 中的支持警告和安装步骤。
Related MCP server: SAP RFC MCP Server
工具
search_rfc_functions(pattern, group=None, limit=50)get_rfc_function_interface(function_name)call_rfc_function(function_name, parameters, mode="read"|"write", transaction_id=None)commit_rfc_transaction(transaction_id, wait=False)rollback_rfc_transaction(transaction_id)read_abap_source(object_type, object_name, function_group=None)—— 一个 工具,不向调用方暴露传输(transport)选择;参见 docs/architecture.md。
ABAP 知识技能
.claude/skills/sap-abap/ 内置了第三方
sap-abap Claude 技能,因此使用此服务器的代理也能随时获得准确的
ABAP 语言知识。它采用与本项目其余部分不同的许可证(GPL-3.0,拥有自己的
LICENSE/NOTICE.md)——参见下文。
范围
基础层、连接层、发现、执行和 MCP 集成均已构建并测试,包括默认拒绝(deny-by-default)的读写策略、针对通用表读取注入面(RFC_READ_TABLE 等)的表级守卫,以及对每个策略决策和调用结果的审计日志。未构建:超出单一服务器级策略的多租户认证/RBAC、速率限制、指标/追踪以及部署打包——参见
docs/architecture.md 的“范围之外”一节,了解有意推迟的内容及其原因。
写调用返回一个不透明的 transaction_id。在相关的写操作中复用该 ID,然后将其传递给 commit 或 rollback。这会将整个 SAP LUW 固定到单个 RFC 连接上;被放弃的事务会自动过期并回滚。
安全态势
除非函数名称匹配显式白名单,否则读写均被拒绝。示例配置仅允许发现、源码读取以及无害的
STFC_CONNECTION冒烟测试。MCP 工具注解向有能力的客户端描述读写风险,但仅是建议性元数据——并非授权边界。服务器策略和 SAP 服务账户的
S_RFC/表授权仍然是强制性的。Stdio 凭据来自环境变量,绝不会放入 MCP 工具参数中。除非实现了 MCP 授权规范和部署级速率限制,否则不要通过 HTTP 暴露服务器。
参见 SECURITY.md 了解报告和部署指南。
许可证
MIT(参见 LICENSE),有一个单独划出的例外:
.claude/skills/sap-abap/ 是内置的第三方
内容,采用 GPL-3.0 许可证——参见其自己的 LICENSE 和 NOTICE.md。包含
该目录不会使项目的其余部分置于 GPL-3.0 之下。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI assistants to integrate with SAP systems via OData REST APIs for querying entity sets, performing CRUD operations, and executing function imports. It features automatic service discovery, CSRF token management, and smart connection handling without requiring the SAP RFC SDK.1112
- AlicenseNot gradedqualityNot gradedmaintenanceAn enterprise-grade MCP server that enables AI agents to execute SAP RFC functions and read business data securely through the Model Context Protocol.
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to securely connect with SAP ABAP and BTP services, allowing execution of function modules, BAPIs, table reads, and various BTP operations through MCP.1Apache 2.0
- FlicenseAqualityCmaintenanceEnables AI agents to read, write, activate, and transport ABAP code in SAP systems via ABAP ADT REST API, without needing SAP GUI.424
Related MCP Connectors
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
SaaS intelligence for AI agents. 5 unified tools cover 1,000+ services with 91-96% token savings.
Runtime permission, approval, and audit layer for AI agent tool execution.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yassinbahri/pyrfc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server