SAP RFC
A Model Context Protocol (MCP) server that provides seamless integration with SAP systems through RFC (Remote Function Call) connections. This server enables AI assistants and applications to interact with SAP functions, retrieve metadata, and perfor
What is SAP RFC?
SAP RFC is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that provides seamless integration with sap systems through rfc (remote function call) connections. this server enables ai assistants and applications to interact w...
A Model Context Protocol (MCP) server that provides seamless integration with SAP systems through RFC (Remote Function Call) connections. This server enables AI assistants and applications to interact with SAP functions, retrieve metadata, and perfor
This server falls under the Business Applications category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol (MCP) server that provides seamless
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx sap-rfcConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use SAP RFC
The SAP RFC MCP Server bridges AI assistants with SAP systems through Remote Function Call (RFC) connections, allowing Claude and other MCP clients to invoke RFC functions, search SAP function metadata, and retrieve table data directly from R/3 through S/4HANA landscapes. It is written in Python and requires the SAP NetWeaver RFC SDK alongside a network-accessible SAP application server.
Prerequisites
- Python 3.9 or higher installed
- SAP NetWeaver RFC SDK downloaded from SAP Service Marketplace and installed
- Access to an RFC-enabled SAP system (R/3 4.5B through S/4HANA)
- SAP user account with RFC authorization (S_RFC object)
- Git installed to clone the repository
Clone the repository
Clone the sap-rfc-mcp-server repository to your local machine and enter the project directory.
git clone https://github.com/thupalo/sap-rfc-mcp-server.git
cd sap-rfc-mcp-serverRun the automated setup script
Use the provided setup script to install all Python dependencies and create the initial configuration. Alternatively, install manually with pip.
python tools/setup_dev.py
# or manually:
pip install -e .Configure SAP connection credentials
Create a .env file in the project root with your SAP system details. Use the security manager to store credentials securely and verify connectivity.
# .env file
SAP_ASHOST=your-sap-host.example.com
SAP_SYSNR=00
SAP_CLIENT=100
SAP_USER=your_sap_user
SAP_PASSWD=your_password
SAP_LANG=EN
SAP_POOL_SIZE=5
# Then test the connection:
python -m sap_rfc_mcp_server.sap_security_manager setup
python -m sap_rfc_mcp_server.sap_security_manager testStart the MCP server
Launch the server using the smart startup script that handles port management, or start the MCP server directly for stdio transport.
# Recommended: smart start with port management
python tools/start_mcp_smart.py
# Or start directly:
python -m sap_rfc_mcp_server.server
# Or as HTTP API on a specific host/port:
python -m sap_rfc_mcp_server.http_server 127.0.0.1 8000Add to Claude Desktop configuration
Register the server in your Claude Desktop config so it is available as an MCP tool. Adjust the python path to match your virtual environment if needed.
{
"mcpServers": {
"sap-rfc": {
"command": "python",
"args": ["-m", "sap_rfc_mcp_server.server"],
"cwd": "/path/to/sap-rfc-mcp-server",
"env": {
"SAP_ASHOST": "your-sap-host.example.com",
"SAP_SYSNR": "00",
"SAP_CLIENT": "100",
"SAP_USER": "your_sap_user",
"SAP_PASSWD": "your_password",
"SAP_LANG": "EN"
}
}
}
}SAP RFC Examples
Client configuration
Claude Desktop configuration for the SAP RFC MCP Server using Python module transport.
{
"mcpServers": {
"sap-rfc": {
"command": "python",
"args": ["-m", "sap_rfc_mcp_server.server"],
"cwd": "/home/user/sap-rfc-mcp-server",
"env": {
"SAP_ASHOST": "sap-prod.corp.local",
"SAP_SYSNR": "00",
"SAP_CLIENT": "100",
"SAP_USER": "RFC_USER",
"SAP_PASSWD": "secret",
"SAP_LANG": "EN",
"SAP_POOL_SIZE": "5"
}
}
}
}Prompts to try
Example prompts you can use with the SAP RFC MCP Server once configured.
- "Search for RFC functions related to material master data in SAP"
- "Call RFC_READ_TABLE to fetch the first 10 rows from table T001 (company codes)"
- "Get the metadata and parameter descriptions for function module BAPI_MATERIAL_GET_DETAIL"
- "List all available RFC function modules related to purchase orders"
- "Retrieve the function group and import/export parameters for RFC_GET_STRUCTURE_DEFINITION"Troubleshooting SAP RFC
ImportError or 'pyrfc not found' when starting the server
The pyrfc Python library requires the SAP NetWeaver RFC SDK to be installed first. Download the SDK from SAP Service Marketplace (search for 'SAP NW RFC SDK'), extract it, and set the SAPNWRFC_HOME environment variable to the SDK root before running pip install pyrfc.
RFC connection fails with authorization error or RFC_NOT_AUTHORIZED
Ensure the SAP user has S_RFC authorization object with RFC_TYPE FUGR and the relevant function groups. Ask your SAP Basis team to assign the correct authorization profile. Also verify SAP_CLIENT, SAP_SYSNR, and SAP_ASHOST values are correct for your landscape.
Server starts but Claude cannot connect to it
Verify the cwd in the Claude Desktop config points to the cloned repository directory and that the python executable path matches your virtual environment. Run python -m sap_rfc_mcp_server.server manually in a terminal to check for startup errors before adding it to the MCP config.
Frequently Asked Questions about SAP RFC
What is SAP RFC?
SAP RFC is a Model Context Protocol (MCP) server that model context protocol (mcp) server that provides seamless integration with sap systems through rfc (remote function call) connections. this server enables ai assistants and applications to interact with sap functions, retrieve metadata, and perfor It connects AI assistants to external tools and data sources through a standardized interface.
How do I install SAP RFC?
Follow the installation instructions on the SAP RFC GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with SAP RFC?
SAP RFC works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is SAP RFC free to use?
Yes, SAP RFC is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
SAP RFC Alternatives — Similar Business Applications Servers
Looking for alternatives to SAP RFC? Here are other popular business applications servers you can use with Claude, Cursor, and VS Code.
n8n
★ 189.1kA comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and dou
LobeHub
★ 77.5k🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.
Jeecgboot
★ 46.4kAI 低代码平台,「低代码 + 零代码」双模式驱动:低代码一键生成前后端代码,零代码 5 分钟搭建系统,AI Skills 一句话画流程、设计表单、生成整套系统。内置 AI聊天、知识库、流程编排、MCP插件等,兼容主流大模型。引领「AI 生成 → 在线配置 → 代码生成 → 手工合并->AI修改」开发模式,消除 Java 项目 80% 的重复工作,提效而不失灵活。
CowAgent
★ 44.7kCowAgent (chatgpt-on-wechat) 是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、通过长期记忆和知识库不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页等接入,可选择DeepSeek/OpenAI/Claude/Gemini/ MiniMax/Qwen/GLM/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助理和企业数字员工。
Minds Platform
★ 39.2kPlatform dedicated to building an open foundation for applied Artificial Intelligence, designed for people seeking production-ready AI systems they can truly control, extend and deploy anywhere.
Astrbot
★ 32.8kAI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨
Browse More Business Applications MCP Servers
Explore all business applications servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up SAP RFC in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use SAP RFC?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.