RFC_MCP
Provides tools to call SAP function modules over classic RFC, describe function module interfaces, read SAP table rows with field selection, Open SQL filters, row caps and paging, and invoke a fixed set of read-only RFCs plus operator-approved extended function modules such as BAPIs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RFC_MCP show me the first 10 rows of table T000 with fields MANDT and MTEXT"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RFC_MCP
An MCP server that lets a chat assistant call SAP function modules over classic RFC. It is aimed at SAP ECC, where there is often no OData or ADT surface to use, and works against other ABAP systems too.
Built on open-rfc by Marian Zeis
All RFC communication in this project is done by open-rfc, an SDK-free TypeScript implementation of the SAP RFC protocol written by Marian Zeis. Because of it, this server needs no SAP NW RFC SDK, no native addon and no S-user download.
Documentation: https://marianfoo.github.io/open-rfc/
Introduction: Calling SAP RFC from Node.js Without the SDK
open-rfc is licensed under Apache-2.0 and is itself adapted in part from
open-rfc-go. This project is independent of both, and is not
affiliated with or endorsed by SAP SE.
Related MCP server: guniweb-sap-mcp
Status
Built and unit-tested against a scripted SAP. It has not yet been run against a real SAP system.
Make the first live call RFC_SYSTEM_INFO on a non-productive client.
Tools
Tool | What it reaches | Intended gating |
| The interface of any function module: parameters, types, and which tool can call it | read |
| Rows of one table through | read |
| A fixed set of read-only function modules: | read |
| Function modules you list in | require an approval for every call |
Three guardrails are enforced in src/policy.ts, whatever the SAP user is
authorized for:
The function modules behind
RfcCallare fixed in code. Anything else has to be listed by the operator and goes throughRfcCallExtended.Sensitive tables are never read: HR master data and payroll clusters (
PAnnnn,PBnnnn,HRPnnnn,PCLn,HRPY_*), password hashes (USR02,USH02,USRPWDHISTORY), stored credentials and key material (RFCDES,RSECTAB,SSF_PSE*) and payment-card numbers. The list is a floor, not a data-protection classification of your system. SetRFC_MCP_TABLESto allow only named tables.Off by default. The process exits unless
RFC_MCP_ENABLED=true.
Never callable, even if listed: RFC_ABAP_INSTALL_AND_RUN, RFC_REMOTE_*, SXPG_* (operating
system commands), BAPI_USER_* and SUSR_* (user administration), BAPI_TRANSACTION_COMMIT, and
every generic table reader. The server refuses to start with one of them, or with a sensitive table,
in its configuration.
Limits
No transport encryption. Classic RFC without SNC sends the password and the data in clear text. Run the server on a trusted private network next to the SAP system, never across an untrusted one.
open-rfcdoes not support SNC, X.509, SAProuter or message-server logon.Release band.
open-rfc0.2.6 is beta, qualified by its author on SAP NetWeaver 7.50 and SAP S/4HANA 2023. ECC 6.0 EHP8 runs on 7.50. Older ECC releases and non-Unicode systems are untested or unsupported. Check theopen-rfcdocumentation for the current support boundary.Nothing is committed. Each call logs on, runs one function module and logs off. A BAPI that needs
BAPI_TRANSACTION_COMMITtherefore does not persist its changes. A function module that commits by itself does, so list only what you have reviewed.A failed call is not proof of no effect. After a timeout or a dropped connection the outcome is unknown. The server never retries.
UCON and gateway ACLs still apply. A hardened system may refuse RFC outright. Errors carry a cause (
ucon,gateway_acl,rfc_auth,table_auth,row_512,logon,unreachable,absent) so a Basis team knows what to change.One technical user. Calls run as the configured SAP user, not as the person in the chat.
RFC_READ_TABLElimits. A row is at most 512 bytes across the selected fields, and some field types are not readable. Name only the fields you need.
Install
Requires Node.js 22.14 or later.
git clone https://github.com/espenleknes-stack/RFC_MCP.git
cd RFC_MCP
npm ci --ignore-scripts
npm run buildConfiguration
Variable | Required | Meaning |
| yes | Must be exactly |
| yes | Application server host |
| no | System number, default |
| yes | Three-digit client |
| yes | Technical RFC user. Take the password from a secret store, not a committed file |
| no | Default |
| no | Comma-separated function modules for |
| no | Comma-separated tables. When set, only these are readable |
| no | Row ceiling per table read, default 200, at most 5000 |
| no | Per-call timeout, default 25 |
Give the SAP user S_RFC for the function groups it calls and S_TABU_DIS (or S_TABU_NAM) for
the tables it reads, and no more than the tools are meant to reach.
Use it from an MCP client
The server speaks MCP over stdio. A typical client entry:
{
"mcpServers": {
"sap-ecc-rfc": {
"command": "node",
"args": ["/absolute/path/to/RFC_MCP/dist/index.js"],
"env": {
"RFC_MCP_ENABLED": "true",
"SAP_RFC_ASHOST": "ecc-app01.corp.example.com",
"SAP_RFC_SYSNR": "00",
"SAP_CLIENT": "100",
"SAP_USER": "RFC_CHAT",
"SAP_PASSWORD": "<from your secret store>",
"RFC_MCP_EXTENDED_FUNCTIONS": "BAPI_MATERIAL_GET_DETAIL"
}
}
}
}A good first conversation: ask for the system information (RfcCall with RFC_SYSTEM_INFO), then
describe a function module with RfcDescribeFunction before calling it. Parameter names are
case-sensitive and follow the function module's interface.
Configure your MCP host to ask for approval before RfcCallExtended. The server marks it with
readOnlyHint: false; the three other tools carry readOnlyHint: true.
Development
npm test # builds, then runs the unit tests and starts the built entry point
npm run typecheck
npm run pack:checkLogs go to stderr as one JSON object per event: tool, function module, outcome, cause and duration. Parameters, rows and credentials are never logged.
License
Licensed under the Apache License 2.0, the same license as open-rfc.
Trademarks
SAP, ABAP, SAP ECC, SAP S/4HANA and SAP NetWeaver are trademarks or registered trademarks of SAP SE or its affiliates.
Available Tools
3 toolsRfcCallARead-only
Call one of the fixed read-only SAP function modules: RFC_SYSTEM_INFO (system id, release, kernel, host and code page); /SDF/UPL_SYSTEM_STATUS (whether usage logging (UPL) is active and since when); SCMON_GET_LOG_STATUS (ABAP call monitor (SCMON) collection status); SWNC_GET_DIRECTORY_FRAME (workload statistics (ST03N) periods available); RPY_PROGRAM_READ (program source with includes); RFC_READ_REPORT (raw report source). No other function module is callable with this tool.
Inputs: function (required), parameters.
RfcDescribeFunctionARead-only
Read the interface of one SAP function module: its import, export, changing and tables parameters, their types, and which tool can call it. Use this before a call; parameter names are case-sensitive.
Inputs: function (required).
RfcReadTableARead-only
Read rows of one SAP table over RFC. Name the fields you need (a row is limited to 512 bytes in total) and narrow with "where" in Open SQL syntax, for example MANDT = '100' AND MTART = 'FERT'. At most 200 rows per call; page with skipRows. HR, payroll, password and credential tables are never readable.
Inputs: table (required), fields (required), where, maxRows, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools target distinct operations: describing a function module interface, reading table rows, and calling a fixed whitelist of function modules. Their boundaries are clear, and the descriptions reinforce when each should be used.
All names use the same Rfc prefix and PascalCase action-oriented style. RfcCall is a slight deviation because it lacks an explicit noun object compared with RfcDescribeFunction and RfcReadTable, but the convention remains readable.
Three tools are well-scoped for a narrow read-only SAP RFC server. Each tool has a clear, broad responsibility without excessive fragmentation.
The set covers core safe-read operations: table reads, function-module calls from a whitelist, and interface introspection. However, discovery is notably incomplete: there is no way to list available function modules/tables or describe table schemas, which may leave agents guessing field names and structures.
Maintenance
Related MCP Connectors
Read-only access to a company's ERP for Claude, ChatGPT and Gemini, with OAuth and an audit trail.
Give AI agents 30,000+ safe, token-optimized actions across Workday, SAP, Oracle + hundreds more.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
Read and write Sage Intacct from Claude or ChatGPT. Write tools are flagged for approval.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.1113MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants and n8n workflows to interact with SAP S/4HANA and ECC systems via OData, IDoc, and RFC/BAPI, with governed read-only-by-default access and multiple authentication types.3ISC
- AlicenseAqualityBmaintenanceEnables AI agents to discover, inspect, and call SAP RFC-enabled function modules (BAPIs/RFCs) with configurable read/write policies, transaction support, audit logging, and ABAP source retrieval.61MIT
- AlicenseAqualityBmaintenanceEnables AI agents to securely read and write SAP ABAP development objects via the ADT REST API, enforcing policy-based guardrails such as package/namespace allow-lists, read-only mode, human approvals, and audit logging.82MIT