MCP Server
erpl-adt doubles as a Model Context Protocol server. Every CLI command is exposed as an MCP tool over JSON-RPC 2.0 on stdin/stdout. Plug it into any MCP-compatible agent — Claude Code, Cursor, Gemini CLI — and the agent decides which tools to call and in what order.
Start the server directly:
erpl-adt mcp --host sap.example.com --port 44300 --https
The process talks JSON-RPC on stdio, so you don't run this yourself; the MCP client launches it for you.
Client configuration
Claude Code
Add an entry to your ~/.claude/mcp.json (or per-project .claude/mcp.json):
{
"mcpServers": {
"sap": {
"command": "erpl-adt",
"args": ["mcp", "--host", "sap.example.com", "--port", "44300", "--https"],
"env": { "SAP_PASSWORD": "..." }
}
}
}
Restart Claude Code and the sap tools appear in the tool list.
Cursor
Settings → MCP → + Add new MCP server and paste the same shape as above.
Gemini CLI
Add to ~/.config/gemini/config.yaml under mcp_servers::
mcp_servers:
sap:
command: erpl-adt
args: ["mcp", "--host", "sap.example.com", "--port", "44300", "--https"]
env:
SAP_PASSWORD: "${SAP_PASSWORD}"
Tools the agent gets
The MCP tool names are derived from the CLI command paths. The most-used ones:
| MCP tool | CLI equivalent | What it does |
|---|---|---|
adt_search | search | Search ABAP objects by pattern and type |
adt_object_read | object read | Read an object's metadata (URI, includes, source URIs) |
adt_source_read | source read | Read source for a class, program, or include |
adt_source_write | source write | Write source (auto-lock, transport, optional activate) |
adt_activate | activate | Activate an inactive object |
adt_test | test | Run ABAP Unit tests |
adt_check | check | Run ATC quality checks |
adt_transport_create / _list / _release | transport … | Transport lifecycle |
adt_ddic_table | ddic table | Inspect a transparent table with check tables and abap types resolved |
adt_ddic_cds | ddic cds | Read a CDS view's source |
adt_package_list / _tree / _exists | package … | Browse package contents |
bw_search, bw_read_adso, bw_lineage, bw_export_cube, … | bw … | Full BW/4HANA toolkit (see BW page) |
46 tools are registered in total. Run erpl-adt mcp --list-tools to print the current set (returns a JSON manifest), or call the standard MCP tools/list method from your client.
Example agent loop
A typical session inside Claude Code looks like this — three CLI commands the agent picks itself, from one natural-language question.
You: What flight-related classes exist in this SAP system?
Claude calls adt_search with pattern ZCL_FLIGHT*:
Found 4 matching objects:
Name Type Package Description
──────────────── ──────── ──────────── ──────────────────────────
ZCL_FLIGHT_CTRL CLAS/OC ZFLIGHT_APP Flight booking controller
ZCL_FLIGHT_MODEL CLAS/OC ZFLIGHT_APP Flight data model
ZCL_FLIGHT_TEST CLAS/OC ZFLIGHT_APP Flight module unit tests
ZCL_FLIGHT_API CLAS/OC ZFLIGHT_APP REST API wrapper
You: Show me the booking controller and tell me what's broken.
Claude calls adt_object_read → adt_source_read → adt_test and writes back a diagnosis. The end-to-end narrative is in Your AI Coding Agent Just Learned ABAP and the follow-ups Real-Time SAP for AI, Part 1 and Part 2.
Authentication
Credentials are resolved in this order: CLI flags → --password-env env var → ~/.adt.creds (saved by erpl-adt login) → the SAP_PASSWORD environment variable.
For MCP usage, the env block in the client config is the cleanest path — the agent never sees the password, the password never appears in shell history, and you can rotate it without touching the client config.
Where to next
- BW guide — the BW modeling tools available over MCP
- Command Reference — every operation, also reachable via MCP
- Announcement post — full context, demo recording, and motivation