MCP SAP S/4HANA || ECC connector for AI
10K+
MCP (Model Context Protocol) server that connects AI coding assistants — Kiro, Claude Desktop, VS Code, Amazon Q Developer, and other MCP-compatible clients — directly to your SAP system (ECC or S/4HANA) over the SAP ADT (ABAP Development Tools) REST API.
It lets an AI assistant read, write, check, and activate ABAP objects, browse the DDIC data model, inspect enhancements/BAdIs, and run read-only data previews — all through natural conversation instead of manually switching between SAP GUI, Eclipse ADT, and your editor.
+------------------------+
| MCP Client |
| (Kiro / Claude / |
| VS Code / Q Dev) |
+-----------+------------+
| MCP protocol (HTTP, streamable)
v
+------------------------+
| ABAP Accelerator |
| MCP Server (Docker) |
+-----------+------------+
| SAP ADT REST API (HTTPS)
v
+------------------------+
| SAP ECC / S/4HANA |
+------------------------+
The server runs as a single Docker container exposing an HTTP MCP endpoint (default http://localhost:8000/mcp). It authenticates to SAP using Basic Auth (username/password) over the ADT REST API — no RFC/SAPGUI connectivity is required, only HTTPS access to the SAP host's ICM port (typically 443<instance>, e.g. 44300 for instance 00).
docker pull irfanardi/mcpabapaccelerator:latest
The image is multi-arch (linux/amd64 and linux/arm64), so it runs natively on both Intel/AMD machines and Apple Silicon / ARM.
docker run -d \
--name abap-mcp \
--restart unless-stopped \
-p 8000:8000 \
-e CREDENTIAL_PROVIDER=env \
-e SAP_HOST=your-sap-host.example.com \
-e SAP_INSTANCE_NUMBER=00 \
-e SAP_CLIENT=100 \
-e SAP_USERNAME=YOUR_SAP_USER \
-e SAP_PASSWORD='YOUR_SAP_PASSWORD' \
-e SAP_SYSTEM_ID=YOUR_SID \
-e SAP_LANGUAGE=EN \
-e SSL_VERIFY=false \
-e MCP_ROLE=dev \
irfanardi/mcpabapaccelerator:latest
MCP_ROLE controls which tools the container exposes — set it to match how you intend to use the server:
MCP_ROLE | Use it when... | Behavior |
|---|---|---|
dev (shown above) | You're actively developing/fixing ABAP code with the assistant | All 43 tools are registered, including create/update/activate/transport tools. |
prod (also accepted: production, readonly, ro, display) | You only want the assistant to explore/read — e.g. a shared or production-adjacent system | Write/edit tools (abap_cb_create_object, abap_cb_update_source, abap_cb_activate_object, abap_cb_activate_objects_batch, abap_cb_create_or_update_test_class, abap_cb_create_transport_request, abap_cb_assign_transport, abap_cb_create_package) are not registered at all — the client can't see or call them, not even by mistake. Read/preview tools (abap_cb_get_source, abap_cb_data_preview, abap_cb_get_table_info, etc.) remain fully available. |
Run the same command as above but with -e MCP_ROLE=prod for a read-only instance:
docker run -d \
--name abap-mcp-readonly \
--restart unless-stopped \
-p 8000:8000 \
-e CREDENTIAL_PROVIDER=env \
-e SAP_HOST=your-sap-host.example.com \
-e SAP_INSTANCE_NUMBER=00 \
-e SAP_CLIENT=100 \
-e SAP_USERNAME=YOUR_SAP_USER \
-e SAP_PASSWORD='YOUR_SAP_PASSWORD' \
-e SAP_SYSTEM_ID=YOUR_SID \
-e SAP_LANGUAGE=EN \
-e SSL_VERIFY=false \
-e MCP_ROLE=prod \
irfanardi/mcpabapaccelerator:latest
You can run both a dev and a prod container side by side (different names, different host ports) if you want separate connections for exploration-only vs. active development.
Wait a few seconds, then confirm it's healthy:
docker ps --filter name=abap-mcp
# STATUS should show "healthy"
docker logs abap-mcp --tail 20
The config file location and JSON shape differ per client. Both connect to the same running container — only the config format changes.
File: .kiro/settings/mcp.json (workspace-level) or ~/.kiro/settings/mcp.json (user-level, applies to all workspaces).
{
"mcpServers": {
"abap-accelerator": {
"url": "http://localhost:8000/mcp",
"disabled": false,
"autoApprove": [
"abap_cb_get_source",
"abap_cb_connection_status",
"abap_cb_search_object",
"abap_cb_data_preview"
]
}
}
}
Create the file (and .kiro/settings/ folder) if it doesn't exist yet. After saving, open the MCP Servers panel in Kiro and enable/reconnect abap-accelerator — Kiro watches this file, but a manual reconnect is the most reliable way to pick up a newly added or edited server, especially after the container itself was restarted.
autoApprove is optional — it lists tool names Kiro can call without prompting for confirmation each time. Leave it as [] (or omit it) if you want to approve every call manually.
File: .vscode/mcp.json in the workspace, or your global MCP settings depending on the extension you use. The key difference from Kiro is the top-level key (servers instead of mcpServers) and the explicit "type": "http":
{
"servers": {
"abap-accelerator": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}
Reload the window (or use the extension's "Restart/Reconnect MCP Server" command) after adding or changing this file.
Claude Desktop's config only supports stdio-launched MCP servers out of the box (command/args), not a raw HTTP URL like this server exposes. To use it there, run the container as above and bridge it with an HTTP-to-stdio proxy such as mcp-remote:
{
"mcpServers": {
"abap-accelerator": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:8000/mcp"]
}
}
}
Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
Whichever client you use, once it's connected, ask it to check the SAP connection — it should call abap_cb_connection_status and report Connected.
If you're running from this repository's source, run-abap-accelerator.sh walks you through the same setup interactively (prompts for host/client/user/password, starts the container, verifies the SAP connection, and prints the ready-to-paste MCP config block):
./run-abap-accelerator.sh
services:
abap-accelerator:
image: irfanardi/mcpabapaccelerator:latest
container_name: abap-accelerator
restart: unless-stopped
ports:
- "8000:8000"
environment:
CREDENTIAL_PROVIDER: "env"
SAP_HOST: "your-sap-host.example.com"
SAP_INSTANCE_NUMBER: "00"
SAP_CLIENT: "100"
SAP_USERNAME: "YOUR_SAP_USER"
SAP_PASSWORD: "YOUR_SAP_PASSWORD"
SAP_SYSTEM_ID: "YOUR_SID"
SAP_LANGUAGE: "EN"
SSL_VERIFY: "false"
MCP_ROLE: "dev"
docker compose up -d
docker compose logs -f
docker compose down
| Variable | Description | Example |
|---|---|---|
SAP_HOST | SAP application server hostname or IP | vhcalnplci.example.com |
SAP_INSTANCE_NUMBER | SAP instance number | 00 |
SAP_CLIENT | SAP client (mandant) | 100 |
SAP_USERNAME | SAP username (dialog user with ADT/S_DEVELOP authorization) | DEV_USER |
SAP_PASSWORD | SAP password | — |
SAP_SYSTEM_ID | Logical system ID, used as the default sap_system_id context and in multi-tenant headers | DEV |
SAP_LANGUAGE | SAP logon language | EN |
| Variable | Default | Description |
|---|---|---|
CREDENTIAL_PROVIDER | interactive | env = read SAP_* vars above; interactive = prompt at startup; interactive-multi = load multiple systems from a YAML file; aws_secrets = AWS Secrets Manager |
SAP_PORT | derived from SAP_INSTANCE_NUMBER (443<NN>) | Override the SAP HTTPS port explicitly |
SSL_VERIFY | true | Set false for self-signed/expired SAP server certificates (testing only) |
MCP_ROLE | dev | dev = all 43 tools enabled; prod/readonly/ro/display = write/activate tools are hidden, read-only tools remain available |
MCP_SERVER_NAME | — | Friendly name reported by the server, useful when running multiple instances |
SERVER_PORT | 8000 | Port the server listens on inside the container |
ENABLE_ENTERPRISE_MODE | true | Enables multi-tenancy / per-request SAP system context via headers |
DEFAULT_SAP_SYSTEM_ID | — | Default system used when a request doesn't specify sap_system_id |
Each request can target a different SAP system by passing an x-sap-system-id header (or the sap_system_id tool argument), resolved against systems configured via CREDENTIAL_PROVIDER=interactive-multi and a sap-systems.yaml file, or aws_secrets in production/ECS deployments.
SAP_PASSWORD into the Docker image. Pass it at runtime via -e / Compose / a secrets manager.S_DEVELOP and ADT-related authorizations), not a personal or administrator account.MCP_ROLE=prod on any system where you want the assistant to browse/read but never write, activate, or create transports.SSL_VERIFY=true and use a valid certificate for anything beyond local testing.http://localhost:8000/mcp can invoke tools with the container's configured SAP credentials. Bind it to localhost only, or place it behind your own reverse proxy/auth layer, before exposing it on a shared network.The server exposes 43 tools, all prefixed abap_cb_, covering the full loop of exploring, understanding, writing, and validating ABAP code plus its surrounding metadata. In MCP_ROLE=prod (read-only) mode, only the tools marked ✅ below are available; tools marked 🔒 are disabled.
| Tool | What it does |
|---|---|
✅ abap_cb_connection_status | Check whether the server is connected to SAP, and to which host/client/user. |
✅ abap_cb_get_objects | List ABAP objects inside a package. |
✅ abap_cb_search_object | Search for ABAP objects by name/pattern, optionally filtered by type or package. |
| Tool | What it does |
|---|---|
✅ abap_cb_get_source | Read the source code of any ABAP object (class, program, include, function module, etc.). |
✅ abap_cb_get_program_includes | Read a program and recursively resolve all its INCLUDEs (nested), returning the include tree plus every include's source. |
🔒 abap_cb_create_object | Create a new ABAP object (class, interface, program, etc.). |
🔒 abap_cb_update_source | Update the source code of an existing object. |
✅ abap_cb_check_syntax | Run a syntax check against an object (or arbitrary source) without saving. |
🔒 abap_cb_activate_object | Activate a single ABAP object. |
🔒 abap_cb_activate_objects_batch | Activate multiple objects together (needed for circular dependencies). |
✅ abap_cb_check_object_lock | Check whether an object currently has an edit lock (SM12-style) and who holds it, before attempting an update. |
| Tool | What it does |
|---|---|
✅ abap_cb_where_used | Find where an object — or a specific position such as a method — is used/called. Supports method-level where-used. |
✅ abap_cb_get_object_structure | Get the outline of a class/interface: its methods and attributes. |
✅ abap_cb_find_field | Find where a field (including custom fields added via append/include, e.g. ZBRTU) is defined across all tables/structures, and resolve its data element + domain + fixed values in one call. |
| Tool | What it does |
|---|---|
✅ abap_cb_run_atc_check | Run an ABAP Test Cockpit (ATC) quality check on an object or package. |
✅ abap_cb_run_unit_tests | Run ABAP Unit tests for a class, optionally with code coverage. |
✅ abap_cb_get_test_classes | Retrieve the test classes associated with a given class. |
🔒 abap_cb_create_or_update_test_class | Create or update an ABAP Unit test class and its test methods. |
✅ abap_cb_get_migration_analysis | Get a migration/compatibility analysis for an object (e.g. S/4HANA readiness). |
| Tool | What it does |
|---|---|
✅ abap_cb_get_interfaces | List ABAP interfaces, optionally filtered by package. |
✅ abap_cb_get_interface_info | Get an interface's methods, events, types, and constants. |
✅ abap_cb_get_function_groups | List function groups, optionally filtered by package. |
✅ abap_cb_get_function_group_info | Get a function group's function modules and includes. |
✅ abap_cb_get_function_modules | List the function modules inside a function group. |
✅ abap_cb_get_function_module_info | Get a function module's full signature — IMPORTING/EXPORTING/CHANGING/TABLES parameters and EXCEPTIONS — essential for calling RFCs/BAPIs correctly. |
| Tool | What it does |
|---|---|
✅ abap_cb_get_enhancements | List enhancements/exits (BAdI implementations, enhancement implementations, source code plugins), filterable by type or package. |
✅ abap_cb_get_enhancement_info | Get details of a specific enhancement/exit — type, spot, BAdI definition, implementing class, filter values, active status. |
✅ abap_cb_get_enhancement_source | Get the source code of a source-code-plugin-style enhancement. |
✅ abap_cb_get_enhancement_spots | List enhancement spots / BAdI definition spots, to discover where custom logic can be plugged in. |
| Tool | What it does |
|---|---|
✅ abap_cb_get_service_binding_info | Inspect a service binding (SRVB) — binding type, service definition, and the published OData/REST endpoint URL. |
| Tool | What it does |
|---|---|
✅ abap_cb_get_tables | List DDIC database tables, optionally filtered by package. |
✅ abap_cb_get_table_info | Get a table's fields, types, and keys — the starting point for writing any SELECT/JOIN. |
✅ abap_cb_get_table_append_fields (dev only) | List all fields of a table including those added via append structures / customer includes (e.g. CI_EKKODBX), which don't appear in the plain DDL source. |
✅ abap_cb_get_data_elements | List data elements, optionally filtered by package. |
✅ abap_cb_get_data_element_info | Get a data element's domain, type, length, and decimals. |
✅ abap_cb_get_domains | List domains, optionally filtered by package. |
✅ abap_cb_get_domain_info | Get a domain's type, length, value table, and fixed values — useful for building correct WHERE-clause filters. |
✅ abap_cb_get_structures | List DDIC structures, optionally filtered by package. |
✅ abap_cb_get_structure_info | Get a structure's field list. |
| Tool | What it does |
|---|---|
✅ abap_cb_data_preview | Run a read-only ABAP SQL query (SELECT/WITH only) against SAP and return sample rows (1–1000, default 100). Any data-modifying statement (INSERT, UPDATE, DELETE, MODIFY, DROP, ALTER, CREATE, COMMIT, ROLLBACK, CALL) is rejected before it ever reaches SAP. |
| Tool | What it does |
|---|---|
✅ abap_cb_get_packages | List packages (root packages, or subpackages of a given parent). |
✅ abap_cb_get_package_info | Get details of a package (type, software component, super package, etc.). |
🔒 abap_cb_create_package | Create a new development package. |
✅ abap_cb_get_transport_requests | List transport requests, optionally filtered by user. |
🔒 abap_cb_create_transport_request | Create a new transport request (Workbench or Customizing). |
🔒 abap_cb_assign_transport | Assign an ABAP object to a transport request. |
Understand and extend an existing program
abap_cb_search_object → find the program/class.abap_cb_get_source (+ abap_cb_get_program_includes if it has includes) → read it.abap_cb_where_used → check impact before changing anything.abap_cb_check_object_lock → confirm nobody else has it locked.abap_cb_update_source → apply the change.abap_cb_check_syntax / abap_cb_activate_object → validate and activate.abap_cb_run_unit_tests / abap_cb_run_atc_check → verify quality.Design a new report/query
abap_cb_search_object / abap_cb_get_tables → find the relevant tables or CDS views.abap_cb_get_table_info → understand fields, types, and keys.abap_cb_get_data_element_info / abap_cb_get_domain_info → understand field semantics and valid values.abap_cb_data_preview → validate the proposed query against real data, read-only.Investigate a custom field or enhancement
abap_cb_find_field → locate a custom field (e.g. ZBRTU) and its data element/domain, even if it lives in an append structure.abap_cb_get_enhancements / abap_cb_get_enhancement_info / abap_cb_get_enhancement_source → find and read the BAdI/exit logic that populates or uses it."Failed to connect to SAP system ..."
SAP_HOST, SAP_INSTANCE_NUMBER (or SAP_PORT), SAP_CLIENT, SAP_USERNAME, SAP_PASSWORD.curl -k https://<host>:<port>/sap/bc/adt/discovery).SSL_VERIFY=false (testing only).MCP client shows the server as connected but tools return "Session not found" or similar
Syntax check reports a generic error for a program that is clearly valid
Container exited unexpectedly
docker logs abap-mcp for the stack trace. Common causes: wrong/missing required env var, or SAP host unreachable at startup depending on credential provider mode.MIT License. See LICENSE for details.
Content type
Image
Digest
sha256:efc9a53bb…
Size
100.5 MB
Last updated
about 1 month ago
docker pull irfanardi/mcpabapaccelerator