ADAM
ADAM is an MCP server that lets an AI assistant debug ABAP code inside SAP's own debugger — arm breakpoints, run the code, read variables and step through it, all over the ADT REST API.
Capture one run (
abap_debug): arm up to 20 breakpoints, run the code once, and get every stop back — position, call stack, local variables, and optional steps (long loops folded into a compact trace).Breakpoints of many kinds: lines, class methods, ABAP conditions, hit counts,
MESSAGEstatements, statement kinds (COMMIT WORK…), exception classes, and watchpoints that stop where a variable changes.Interactive debugging (
abap_debug_session): hold the program at its first stop and drive it move by move —step(over/into/out),continue,inspect,watch,wait,end(orterminateto abort before a commit).Flexible triggers: the object's ABAP Unit tests, an OData
GET, or your own run of a Fiori app / report / transaction (trigger: none).Read source (
abap_source): active, line-numbered source of classes, programs, function modules, interfaces, includes, CDS views, behavior and service definitions — and a service binding's service definitions to trace a Fiori app to its code.Search the repository (
abap_search): find objects by name, prefix or pattern, filtered by type or package.Clean up (
abap_breakpoints): list and remove breakpoints, listeners or sessions a crashed capture left behind for your SAP user.Safe by design: observes only — no variable writes, no flow changes, only your own SAP user, refuses if another debugger is attached, always releases the program, and bounds time, steps and result size.
Deploy anywhere: locally next to the assistant (stdio, Windows
.exe, ornpx) or as a shared server on SAP BTP Cloud Foundry with per-user XSUAA sign-in.
Integrates with SAP systems through the ABAP Development Tools (ADT) REST API to debug ABAP code. It can set breakpoints, run the code via ABAP Unit tests or OData GET triggers, capture stops with call stack, variables and steps, and support interactive stepping. Works with on-premise SAP NetWeaver/S/4HANA and SAP BTP ABAP Environment, with each user debugging as their own SAP user.
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., "@ADAM Debug why ZCL_ORDER=>GET_TOTAL returns 0 for order 4711"
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.
ADAM
ADAM is an MCP server that lets an AI assistant — Claude, GitHub Copilot, Cursor… — debug ABAP code in SAP's own debugger: set breakpoints, run the code, read the variables, step through it. It speaks the ABAP Development Tools (ADT) REST API, as Eclipse does, so nothing has to be installed on the SAP system.
You: Why does ZCL_ORDER=>GET_TOTAL return 0 for order 4711?
Claude: abap_source {type: "CLAS", name: "ZCL_ORDER", method: "get_total"}
abap_debug {type: "CLAS", name: "ZCL_ORDER", breakpoints: [{line: 42, hits: 3}],
variables: ["LS_ITEM-NETWR", "LV_TOTAL"], steps: 2}
→ three iterations of the loop in one run, each with both values and two stepsFeatures
Two modes. One-shot: a single tool call arms the breakpoints, runs the code, records every stop and releases the program. Interactive: the program waits at its first stop and the assistant drives it — step in, over or out, continue, inspect — deciding each move from what it sees.
Breakpoints on lines and methods of classes, programs and function modules (RAP behavior pools included), with ABAP conditions and hit counts; on messages, statement kinds (
COMMIT WORK, …) and exceptions. Watchpoints: stop wherever a variable changes — or becomes a given value.From a Fiori app to its code: find the service binding, follow it to the service definition, the CDS views, the behavior definition and the handler methods to debug.
Triggers: the object's ABAP Unit tests, an OData
GET, or your own run of a Fiori app or report.Long runs stay readable: thousands of steps fold into a compact trace (
(9-12)×497) with the values only where they changed, anduntilstops on a line or a changed variable.Safe by design: observes without changing anything, debugs only your own SAP user, never takes over another debugger, always cleans up, bounded in time and result size.
Local or shared: next to the assistant (stdio), or as a server on SAP BTP Cloud Foundry where each user signs in and debugs as their own SAP user.
Related MCP server: DebugMCP
Quick start
You need an SAP system with ADT (on-premise SAP_BASIS 7.50 or later, or the SAP BTP ABAP
Environment), and an SAP user with ADT access (S_ADT_RES) and debug authorization (S_DEVELOP with
OBJTYPE = DEBUG, ACTVT = 03). With several application servers, SAP runs the debugger's requests
on the program's server over RFC, as the same user: S_RFC for function group SADT_REST, which
Eclipse ADT needs too.
Three ways to run it, from the most shared to the most hands-on:
On SAP BTP: one server for the whole team; each user signs in and debugs as their own SAP user.
The Windows executable: one file next to the assistant, no Node.js.
With Node.js:
npxfetches and builds the server from GitHub.
Single sign-on cookies, the BTP ABAP Environment, a corporate proxy and every other setting of the local options: Configuration.
Then ask, for instance: "Debug ZCL_ORDER=>GET_TOTAL with its unit tests and show me LV_TOTAL at line 42."
1. On SAP BTP
Deploy the MTA on Cloud Foundry (mbt build, cf deploy), point it at a destination, assign the role
collection, and connect the clients to https://<route>/mcp. They sign in through XSUAA in the
browser, and each user debugs as their own SAP user: principal propagation through the Cloud
Connector for an on-premise system, a user token for the BTP ABAP Environment. See the
deployment guide.
Client | How |
Claude Code |
|
Claude Desktop, claude.ai | Settings → Connectors → Add custom connector → |
VS Code ( |
|
Cursor ( |
|
2. The Windows executable
Download abap-debugger-mcp.exe from the
latest release, copy it anywhere and register
it as the command — claude_desktop_config.json, .cursor/mcp.json or .vscode/mcp.json (in VS Code
the top-level key is servers):
{
"mcpServers": {
"adam": {
"command": "C:\\tools\\abap-debugger-mcp.exe",
"env": {
"SAP_URL": "https://my-sap-host:44300",
"SAP_CLIENT": "100",
"SAP_USER": "DEVELOPER",
"SAP_PASSWORD": "secret"
}
}
}
}Instead of the env block, the server can read a file: "args": ["--env-file", "C:\\tools\\sap.env"]
(see .env.example).
It carries Node.js (about 100 MB): nothing else to install. Every tag
v*builds it.It is not code-signed: Windows SmartScreen or an antivirus may hold it back until it is signed or allowed.
For another platform, run
npm run build:exein a clone: it buildsbuild/abap-debugger-mcpfor the platform it runs on.
3. With Node.js
You need Node.js 22.12+ and git.
Claude Code
claude mcp add adam \
-e SAP_URL=https://my-sap-host:44300 -e SAP_CLIENT=100 \
-e SAP_USER=DEVELOPER -e SAP_PASSWORD=secret \
-- npx -y --allow-git=root github:ClementRingot/ADAMClaude Desktop, Cursor, VS Code and other clients — claude_desktop_config.json,
.cursor/mcp.json or .vscode/mcp.json (in VS Code the top-level key is servers):
{
"mcpServers": {
"adam": {
"command": "npx",
"args": ["-y", "--allow-git=root", "github:ClementRingot/ADAM"],
"env": {
"SAP_URL": "https://my-sap-host:44300",
"SAP_CLIENT": "100",
"SAP_USER": "DEVELOPER",
"SAP_PASSWORD": "secret"
}
}
}
}npx fetches the repository from GitHub and builds it once: the first start takes a while. Run
npx -y --allow-git=root github:ClementRingot/ADAM --versiononce in a terminal first, so the client does not wait for the build.--allow-git=root: npm 12 refuses to install from git unless allowed; earlier versions accept the flag too.Pin a version by appending
#<tag or commit>to the repository name.On Windows, some clients start
npxonly through the shell:"command": "cmd"with"args": ["/c", "npx", "-y", "--allow-git=root", "github:ClementRingot/ADAM"].From a clone:
git clone https://github.com/ClementRingot/ADAM.git, thennpm ci(it also builds), and registernode /path/to/ADAM/dist/index.jsas the command.Instead of an
envblock, the server can read a file: add"--env-file", "/path/to/.env"toargs(see .env.example).
Tools
Tool | What it does |
| Arms breakpoints, runs the code and records every stop of that run: position, call stack, variables, steps. With |
| Drives a held program one move at a time: |
| Lists what the debugger holds or left behind for your SAP user — breakpoints a crashed capture could not remove, a stale listener — and removes it |
| The active source of a class, program or function module, with the line numbers breakpoints use — and of interfaces, includes, CDS views, behavior and service definitions; a service binding's service definitions: the way from a Fiori app to its code |
| Finds objects of every type by name, name start or pattern — service bindings and definitions included, with SAP's generated service objects left out |
abap_debug {type: "CLAS", name: "ZCL_ORDER", breakpoints: [{method: "get_total"}]}
stop in GET_TOTAL while the class's unit tests run: stack and local variables
abap_debug {type: "CLAS", name: "ZCL_ORDER", breakpoints: [{line: 42, condition: "sy-tabix = 500"}], variables: ["LS_ITEM"]}
only the 500th pass of the loop
abap_debug {type: "CLAS", name: "ZCL_ORDER", line: 42, until: {changed: "LV_STATUS"}}
step until LV_STATUS changes, and show where
abap_debug {type: "PROG", name: "ZREPORT", line: 30, trigger: "none", timeoutSeconds: 120}
run ZREPORT yourself, as the same SAP user, while the capture waits
abap_debug {type: "CLAS", name: "ZCL_ORDER", line: 42, interactive: true}
abap_debug_session {action: "step", stepMode: "into", variables: ["LV_TOTAL"]}
abap_debug_session {action: "inspect", variables: ["LS_HEAD"], stack: true}
abap_debug_session {action: "end"}
an interactive session, one move per callParameters, results and more examples: Tool reference.
How it works
1. Resolve the breakpoints against the active source — input errors stop here
2. Arm external breakpoints for your SAP user, and SAP's debugger listener
3. Run the trigger: ABAP Unit, an OData GET, or your own run
4. Follow attach where the program stopped; record each stop, step, continue
5. Release let the program finish; remove the breakpoints and the listener — alwaysThe program runs once, however many stops you ask for: a breakpoint in a loop with hits: 5
shows five iterations of the same run. A one-shot capture never leaves a program suspended. An
interactive session holds it — and its SAP work process — until end, two minutes without a call, or
fifteen minutes in all (both adjustable).
More in the tool reference and in the ADT debugger protocol, which also records what has been verified on real systems.
Safety
Observes, never changes: no variable writes, no jumps, no system debugging. The one exception is on request: ending an interactive session with
terminate: trueaborts the program. When SAP can only attach in non-exclusive mode, where every debugger step commits the program's database work, the capture lets the program go at once instead of inspecting it.Only your own SAP user: the user SAP itself names for the session, never a name passed in a call.
No takeover: if Eclipse, VS Code or another capture debugs the same user, the call refuses.
Harmless triggers: ABAP Unit runs harmless tests only; the HTTP trigger only reads an OData path on the connected system.
Always cleaned up: on every path, errors and timeouts included, the breakpoints and the listener are removed and the program is released. If the server itself is killed mid-capture, the next capture of the same user removes what was left — and
abap_breakpointsshows and removes it on request.Bounded: 20 breakpoints and 50 stops per call; steps as far as the call's time (default 120 s) and result size (default 40 KB) allow, both capped by the server's ceilings; a few captures and sessions at once per server, since each held program takes an SAP work process.
Fits the client's patience: a call answers within 50 s (many clients give up after 60); longer work goes on in the background, and
abap_debug_sessionwaitpicks up its answer.
Documentation
Page | Contents |
Parameters, results, examples, limits | |
Connecting to SAP, every setting | |
XSUAA, destinations, Cloud Connector, MTA | |
When a capture does not stop where expected | |
How SAP's debugger is driven, and what was verified live | |
Ideas and open checks |
Status
Early releases (v0.0.x). What has run live:
SAP BTP ABAP Environment, over HTTP as a remote connector: attaching across application servers, several stops in one run, steps, conditions, long step runs, statement kinds, interactive sessions, answers that outlast a call (
wait) and the removal of leftovers.On-premise ECC (SAP_BASIS 7.50) and S/4HANA (8.16), both with two application servers, run locally next to the assistant: search, source, captures through unit tests, runs started by the user, and interactive sessions. SAP GUI sessions opened through SM51 stop, whichever server they run on, while sessions opened from SAP Logon never do — Eclipse's breakpoints included. The SM51 steps show in the client's dialog (MCP elicitation) in GitHub Copilot.
Not run live yet: the server deployed on SAP BTP Cloud Foundry (XSUAA, destinations, principal propagation), an on-premise 7.58 system, and the other checks of the roadmap.
Development
npm ci # installs, then builds (the prepare script)
npm test # unit tests (vitest)
npm run typecheck # tsc over sources and tests
npm run lint # biome
npm run dev # run from source (tsx)
npm run build:exe # one executable needing no Node.js, for this platform: build/abap-debugger-mcp(.exe)Folder | Contents |
| ADT HTTP client, debugger protocol, ABAP Unit, repository reads, BTP ABAP login |
| Object types, method locator |
| The tools: |
| Per-user SAP connections through the Destination service |
|
|
Logs go to stderr only: over stdio, stdout carries the MCP protocol.
License and attribution
MIT — see LICENSE. This server is derived from ARC-1 (MIT), from which the ADT HTTP conventions, the BTP login, the method locator and the ABAP Unit parsing were ported. The ADT debugger contract was corroborated against abap-adt-api, vscode_abap_remote_fs and vibing-steampunk.
Available Tools
5 toolsabap_breakpointsList or remove what the debugger left for your SAP userAIdempotent
list: your capture or interactive session on this server, the breakpoints a capture could not remove (its server process was killed, or SAP refused the removal — the next capture removes them too), and whether a debugger listener is registered for your SAP user on SAP. delete: end your capture or session and remove those leftovers; listener: true also removes the listener — SAP removes it by user, Eclipse's included. Use it when a capture is refused because a debugger listens, or the user's requests stop at odd places. SAP has no request that lists every breakpoint of a user: Eclipse's own are in Eclipse.
Inputs: action (required), listener.
abap_debugCapture one ABAP run in the debuggerA
RULE on an on-premise or private cloud system: trigger "none" needs a human action: relay the steps of the answer (userMessage) to the user and end your turn before calling wait. Pass runFrom "http" for a Fiori app (no SM51 steps). Debug ABAP code on the connected SAP system in ONE call: arm breakpoints (lines or class methods in CLAS, PROG or FUNC objects, optionally with an ABAP condition; or where a message is issued, a statement kind runs, an exception is raised; watchpoints, set at the first stop, then stop wherever a variable changes), run the code (its harmless ABAP Unit tests, an OData GET, or wait while you run it yourself as the same SAP user), and at every stop of that one run record the position, the call stack, the variables and optional steps — then release the program and remove the breakpoints. The program runs once, however many stops you ask for: a breakpoint in a loop with hits 5 shows five iterations of the same run. Nothing stays stopped after the call returns, so name every variable you need up front; to look again, run another capture — or start an interactive session (interactive: true) and decide each move with abap_debug_session. Lines are numbered as abap_source shows the ACTIVE source. Per capture: at most 20 breakpoints and 50 stops, and as many steps as the budgets allow — the run is followed until its result size (maxResultKB, default 40 KB) or inspection time (maxSeconds, default 120 s) runs out, then goes on without stopping. Past 20 steps from one stop, the steps come back as a compact trace; until ends them at a line or once a variable changed. Result: hit; breakpoints (set, with the hits they made, or refused with SAP's reason); debuggee; stops (at, stoppedAt, stack and variables on a breakpoint's first stop — its later stops carry only values, unchanged structures and tables marked so; steps, or a trace of a long run: path = the lines executed per frame, (9-12)×300 = a loop, changes = values where they changed); release; trigger; warnings. Without a stop: reason and hint. A call answers within ABAP_DEBUGGER_CALL_SECONDS (default 50 s). A capture still waiting for its stop or following its run then answers running: true with its session id, and goes on: abap_debug_session action wait picks up its result, action end stops it. trigger "none": on the BTP ABAP Environment or S/4HANA Cloud Public Edition, which have no SAP GUI, never ask about it or mention SM51. On an on-premise or private cloud system, from SAP GUI, only a NEW session opened through SM51 (select the application server, Goto → Remote Logon → Normal) once the breakpoints are armed stops at them — on some systems, a session opened before, or from SAP Logon or SAP Business Client, never does. When the user says they run it from a Fiori app or another HTTP call, pass runFrom "http": no SM51 steps. Otherwise, right after arming, the client shows the user these steps in a dialog where it can (MCP elicitation: accept goes on waiting, decline stops the capture); else the call answers at once with running: true, userMessage (the steps, for the user) and agentInstructions (for you): show userMessage to the user in their language, keeping its numbered steps, END YOUR TURN, and call abap_debug_session action "wait" once they ran the code. runFrom "http" answers at once the same way, telling the user to open the app. It never changes variables or the program flow, never debugs system code, and only debugs the session's own SAP user; it refuses when Eclipse or VS Code already debugs that user.
Inputs: url, line, name, type, +14 more.
abap_debug_sessionDrive an interactive ABAP debug sessionA
One move of the program an interactive capture holds (abap_debug with interactive: true), then where it stands — its position, the code around it, the watched variables — so you decide the next move from what you see. step: statement by statement — stepMode over (default), into a call, out to the caller; count steps at once (past 20 they come back as a compact trace), until a line or until a variable changed. continue: run to the next breakpoint or watchpoint (each stop as in abap_debug), or to toLine. inspect: read any variables where it stands (or the whole frame), and the call stack. watch: set a watchpoint on a variable visible here — continue then also stops where it changes (optionally where a condition holds). end: let the program run to its end — or terminate: true to abort it, e.g. before it commits. wait: a move (or a capture) that outlasts its call — ABAP_DEBUGGER_CALL_SECONDS, default 50 s — answers running: true and goes on in the background; wait returns its answer once it is done. The program waits in a work process between calls, so end the session when you are done; it is also released after a while without a call (ABAP_DEBUGGER_IDLE_SECONDS, default 120 s) and after ABAP_DEBUGGER_SESSION_SECONDS (default 15 min). Every answer says how long it has left. Apart from terminate, it never changes variables or the program's flow.
Inputs: action (required), hits, count, stack, +11 more.
abap_searchFind ABAP objectsARead-onlyIdempotent
Find repository objects of any type by name, name start or pattern: classes, interfaces, programs and includes, function groups and modules, CDS views, behavior definitions, service definitions and bindings, UI5 apps… — each with its exact name, type, what it is, package and description. E.g. the service binding and definition behind a Fiori app (then the CDS views and behavior pools they lead to), or the unit-test class to use as triggerName.
Inputs: query (required), types, package, maxResults, +1 more.
abap_sourceRead active ABAP source with line numbersARead-onlyIdempotent
The ACTIVE source with its line numbers: of a class (main source or a local-class include), a program or a function module — numbered as abap_debug breakpoints use them — and of interfaces, includes, CDS views, behavior and service definitions. A service binding (SRVB) shows its service definitions: from a Fiori app's binding, follow SRVD → CDS views → BDEF → behavior pool to the code to debug. Narrow a source with method, lineStart/lineEnd or grep.
Inputs: name (required), type (required), grep, method, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
abap_debug and abap_debug_session share the debug prefix and can be confused: one runs a one-shot capture, the other performs a single interactive-session move. abap_breakpoints also overlaps with breakpoint arming in abap_debug, though the descriptions cross-reference each other and explain the boundaries.
All tool names use a consistent lower_snake_case abap_ prefix, making the set readable and predictable. The suffixes mix actions (debug, search) and nouns (breakpoints, source, session) rather than following a strict verb_noun pattern, but this is a minor deviation.
Five tools is well-scoped for complex ABAP debugging. Each tool maps to a distinct area: object search, source inspection, capture debugging, interactive stepping, and breakpoint cleanup.
The tool surface covers the debugging lifecycle end-to-end: finding objects, reading active source, arming and running captures, inspecting stops, stepping interactively, and cleaning up breakpoints/listeners. No significant gaps in ABAP debugging workflows are apparent.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Debug, build, and manage Power Automate cloud flows with AI agents
Create, run and debug Leapwork Play tests and runlists, build knowledge bases, and use AI workflows.
Build, validate, test-run and publish AIOS workflows from Claude Code, Codex, Cursor or VS Code.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to access SAP ADT APIs for reading, writing, debugging, deploying, and testing ABAP code through natural language or DSL automation.530MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to debug code inside VS Code by setting breakpoints, stepping through execution, inspecting variables, and evaluating expressions across multiple languages.583MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform ABAP Development Tools operations on SAP ERP (ECC and S/4HANA) systems, including source code editing, object activation, syntax checks, and ABAP unit tests.14 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to work with SAP ABAP systems through the ADT REST API, supporting repository search, source code read/write, activation, syntax checks, and transport request management.1Apache 2.0