abap-adt-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SAP_URL | No | Legacy single-system mode: base URL, for example `https://host:44300`. | |
| SAP_USER | No | Legacy single-system mode: SAP user. | |
| SAP_CLIENT | No | Legacy single-system mode: client, for example `100`. | |
| SAP_SYSTEMS | No | The destinations map as inline JSON. Contains credentials, prefer the file. | |
| MCP_TOOLSETS | No | Toolsets to publish: preset `all` or `focused`, or a comma list. Default: `all`. | |
| SAP_LANGUAGE | No | Legacy single-system mode: logon language, for example `EN`. | |
| SAP_PASSWORD | No | Legacy single-system mode: SAP password. | |
| MCP_CACHE_DIR | No | Relocates the cloudification repository cache. Default: `~/.abap-adt-mcp/cache`. | |
| MCP_HTTP_HOST | No | Bind address of the HTTP transport. Default: `127.0.0.1`; `0.0.0.0` only in containers. | |
| MCP_HTTP_PORT | No | Serve Streamable HTTP on `http://127.0.0.1:<port>/mcp` with bearer auth instead of stdio. Unset by default (stdio); accepts 1024 to 65535. | |
| MCP_READ_ONLY | No | `1` makes every destination read-only, server-side. Off by default. | |
| SAP_AUTH_TYPE | No | Default auth type for entries without one, and the mode of the legacy single-system setup. Default: `sso`; `basic` or `oauth`. | |
| MCP_AUDIT_FILE | No | JSONL audit trail path. Off when unset. | |
| MCP_HTTP_TOKEN | No | Bearer token for the HTTP transport. Generated into `~/.abap-adt-mcp/http-token` by default. | |
| MCP_EXPORT_ROOT | No | Directory `exportPackageSources` may write into. Default: `~/.abap-adt-mcp/exports`. | |
| SAP_OAUTH_SCOPE | No | Legacy single-system mode: optional OAuth2 scope. | |
| MCP_PROFILE_GATE | No | Gate for toolsets the destination does not expose. Default: `enforce`; `warn` logs only, `off` disables. | |
| SAP_BROWSER_PATH | No | SSO: path to a Chromium, Chrome or Edge binary. Auto-detected by default. | |
| SAP_SYSTEMS_FILE | No | Path to the destinations file (systems.json). Recommended; keep mode 0600. | |
| SAP_TLS_INSECURE | No | Legacy single-system mode: `1` skips certificate verification for that system only. Sandboxes only. | |
| SAP_OAUTH_CLIENT_ID | No | Legacy single-system mode: OAuth2 client id. | |
| SAP_OAUTH_TOKEN_URL | No | Legacy single-system mode with `SAP_AUTH_TYPE=oauth`: token endpoint. | |
| MCP_DISABLED_TOOLSETS | No | Toolsets to hide, comma list. `core` cannot be disabled. | |
| MCP_HTTP_MAX_SESSIONS | No | Maximum concurrent MCP sessions; further `initialize` requests get `503`. Default: 16. | |
| MCP_HTTP_ALLOWED_HOSTS | No | Comma-separated `Host` header values allowed (DNS-rebinding protection). Loopback hosts always allowed on a loopback bind; any host on a non-loopback bind. | |
| MCP_MAX_RESPONSE_CHARS | No | Character budget of one tool response before paging or truncation. Default 40000, minimum 5000. | |
| MCP_HTTP_MAX_BODY_BYTES | No | Largest request body the HTTP transport accepts; larger bodies get `413`. Default: 4194304 (4 MB). | |
| SAP_BROWSER_PROFILE_DIR | No | SSO: persistent browser profile holding the identity-provider session. Default: `~/.abap-adt-mcp/sso/<host>`. | |
| SAP_DEFAULT_DESTINATION | No | Destination used when a call omits `destination`, or mark an entry `"default": true`. | |
| SAP_OAUTH_CLIENT_SECRET | No | Legacy single-system mode: OAuth2 client secret. | |
| MCP_HTTP_ALLOWED_ORIGINS | No | Comma-separated `Origin` values allowed; `*` allows any. Loopback origins always allowed on a loopback bind. | |
| SAP_ALLOW_REENTRANCE_TICKET | No | `1` enables the `reentranceTicket` tool. Disabled by default. | |
| MCP_HTTP_SESSION_TTL_MINUTES | No | Idle minutes after which an HTTP session (and its SAP sessions and locks) is closed. Default: 30. | |
| MCP_SOURCE_CACHE_TTL_SECONDS | No | Lifetime of the per-session source cache. Default: 300; `0` keeps entries until logout. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
ABAP ADT MCP server. Every tool accepts an optional destination parameter selecting the target SAP system; call listSystems first to see the configured destinations.
Creating a new object: pick objtype (e.g. CLAS/OC; creatableTypeDetails lists the options) -> validateNewObject (check name/package) -> resolveTransport (if package is not $TMP) -> createObject -> setObjectSource with activate=true -> unitTestRun.
Editing an existing object: searchObject / findObjectPath -> getObjectSource -> resolveTransport (for non-local packages) -> editObjectSource (replacements or line range), setMethodSource (one method) or setObjectSource (whole source), with activate=true -> unitTestRun -> objectDiff to review what changed. Never resend a whole source to change a few lines. Write tools lock and unlock by themselves; call lock/unLock only to hold a lock across several writes, and listLocks/forceUnlock if a write left an object locked. syntaxCheckCode before writing catches errors early. Class includes (implementations, testclasses, definitions) are read with getObjectSource on the URL from classIncludes, without /source/main.
Always run unit tests after adding tests or changing source code. Unit tests belong in the testclass include (createTestInclude). Use $TMP for local throwaway development; transportable packages require a transport request (resolveTransport picks it for you).
ABAP Cloud: apiReleaseState(names or source) checks SAP objects against the official cloudification repository before you use them; runSnippet executes throwaway ABAP in $TMP and returns the console output.
Finding code: sourceTextSearch (server index) or grepPackage (client grep with context) locate usages of tables, messages, methods or literals; read whole sources only for the hits. Data: reading table data is closed on a destination until its policy opens it (listSystems shows dataAccess; a policy refusal is final, report it to the user). Where open: runQuery for SQL over tables and CDS views (statements are wrapped to the 255-character line limit of the data preview), tableContents when the preview refuses a table, getDataElementProperties/getDomainProperties for the internal format of a key (leading zeros, conversion exits).
Errors carry kind/hint/nextTools: follow the hint instead of retrying blindly. systemProfile(destination) tells which toolsets the backend supports (S/4HANA Cloud lacks some); dumps/dumpDetails are the root-cause path when the debugger toolset is unavailable on a destination.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| listSystemsA | List the configured ABAP systems (destinations) this server can reach. Call this first to pick the destination to pass to all other tools. |
| healthcheckB | Check server health and list configured destinations. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| create-object | Validate, create, write, activate and unit-test a new ABAP object in the right package and transport. |
| safe-edit | Read, change with text-anchored edits, activate and test an existing object without losing anyone else's work. |
| review-transport | Summarise what a transport changes, object by object, with unified diffs and risk notes. |
| fix-atc | Run ATC on an object or package, apply deterministic quickfixes, fix the rest by hand, re-run until clean. |
| clean-core-check | Assess whether an object or package can run in ABAP Cloud: released APIs, deprecated objects, successors. |
| debug-dump | Find the root cause of a runtime error from the dump feed and propose a fix at the exact source line. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 2 tools
listSystems and healthcheck both return configured destinations, creating overlap. However, healthcheck also checks server health, so the primary purposes are somewhat distinguishable. An agent might still call healthcheck just to list systems.
listSystems follows a camelCase verb_noun pattern, while healthcheck is a single lowercase compound noun with no verb. The convention is mixed but readable, not chaotic.
Only two tools for an ABAP ADT server is far too thin. It covers discovery and health but no actual ABAP development operations, making the set feel severely under-scoped.
The surface is severely incomplete for an ABAP ADT integration. There are no tools to read, create, update, delete, or execute ABAP objects, transport requests, or repository content. It only lists systems and healthchecks.