MCP Overview
@abapify/adt-mcp is a stateless Model Context Protocol server that bridges MCP-aware clients — Claude Code, Cursor, VS Code Copilot, and others — to SAP ABAP Development Tools (ADT). It uses the same typed contracts as the adt CLI, so every tool call goes through @abapify/adt-client and the XSD-driven schema pipeline. No manual XML, no ad-hoc HTTP.
The server is a thin MCP adapter. All business logic lives in @abapify/adt-client, @abapify/adt-contracts, and the domain packages.
Why an MCP server?
- Agentic ABAP workflows. An AI assistant can search objects, read source, run syntax checks, execute ATC, create transports, and commit to gCTS — all inside the same conversation.
- Type safety end-to-end. Every tool is backed by a typed contract; responses are parsed against the schemas in
@abapify/adt-schemas. - Same guarantees as the CLI. CSRF sessions, lock protocol, ETag refresh, and security session semantics are handled by
@abapify/adt-client— see adt-client architecture.
Installing and running
adt-mcp is published as a binary inside the monorepo. The server speaks MCP over stdio.
# From the monorepo
bunx nx build adt-mcp
# Run directly
node packages/adt-mcp/dist/bin/adt-mcp.js
Claude Code / Claude Desktop
Add the following to your ~/.config/claude/claude_desktop_config.json (or equivalent):
{
"mcpServers": {
"adt": {
"command": "node",
"args": ["/absolute/path/to/packages/adt-mcp/dist/bin/adt-mcp.js"]
}
}
}
Cursor
In Settings → MCP Servers:
{
"adt": {
"command": "node",
"args": ["/absolute/path/to/packages/adt-mcp/dist/bin/adt-mcp.js"]
}
}
VS Code (Copilot / other MCP clients)
Point the client at the same binary using its MCP server configuration UI. The transport is always stdio — no HTTP port, no daemon.
Calling a tool
Tools are invoked through the standard MCP tools/call request. Every tool accepts the connection parameters (baseUrl, username, password, client) as arguments — the server is stateless and creates a fresh AdtClient per call.
Example raw JSON-RPC request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_objects",
"arguments": {
"baseUrl": "https://sap.example.com:44300",
"username": "DEVELOPER",
"password": "***",
"client": "100",
"query": "ZCL_MY"
}
}
}
The response is a single text content item whose text field contains a JSON-serialised result:
{
"content": [
{ "type": "text", "text": "[ { \"name\": \"ZCL_MY_CLASS\", ... } ]" }
]
}
Errors are returned with isError: true and a human-readable message.
Tool catalog
All 96 registered tools grouped by category. Each page documents the input schema (Zod), the underlying contract, and an example invocation.
Discovery & system
discovery— list available ADT servicessystem_info— SAP system / session informationget_installed_components— installed software componentsget_features— enabled ADT feature toggleslookup_user— resolve an SAP user
Search & navigation
search_objects— quick search (object name prefix)get_object— fetch an object's metadata by URIgrep_objects— regex search over sourcegrep_packages— regex search across packagesfind_definition— jump to symbol definitionfind_references— find references to a symbolget_callers_of— callers of a function/methodget_callees_of— callees of a function/methodget_object_structure— outline / structureget_type_hierarchy— class / interface hierarchypretty_print— format ABAP source
Source code
get_source— read source codeupdate_source— write source (lock-aware)activate_object— activate an objectactivate_package— activate a whole packagecheck_syntax— syntax checklock_object— acquire an edit lockunlock_object— release an edit lockrun_unit_tests— AUnit executionget_test_classes— list unit-test classesrun_abap— ad-hoc ABAP executionrun_query— data preview
Objects – generic CRUD
create_object— create PROG / CLAS / INTF / FUGR / DEVC / …delete_object— delete an objectclone_object— duplicate an objectget_include— read a class / program includecreate_package— create a DEVC packageget_package— read package metadatastat_package— package statisticslist_package_objects— enumerate package contents
Function groups & modules
get_function_group— read FUGR metadataget_function— read a function modulecreate_function_group— create FUGRcreate_function_module— create FMdelete_function_module— delete FM
DDIC
get_domain— read a DOMA domainget_data_element— read a DTEL data elementget_structure— read a structureget_table— read a TABL tableget_table_contents— preview rows
CDS
get_cds_ddl— read a CDS DDL view (DDLS)get_cds_dcl— read a CDS DCL role (DCLS)
RAP / services
get_bdef,create_bdef,delete_bdef— behavior definitionsget_srvd,create_srvd,delete_srvd— service definitionsget_srvb,create_srvb,delete_srvb— service bindingspublish_service_binding— publish a bindingunpublish_srvb— unpublish a binding
BAdI
get_badi— read a BAdI implementationcreate_badi— create a BAdI implementationdelete_badi— delete a BAdI implementation
CTS transports
cts_list_transports— list transports of a usercts_search_transports— search with filterscts_get_transport— read a transportcts_create_transport— create a transportcts_update_transport— update a transportcts_release_transport— release a transportcts_reassign_transport— reassign ownercts_delete_transport— delete a transport
ATC
atc_run— run ATC checks on an object / package
gCTS (git-enabled CTS)
gcts_list_repos,gcts_get_repogcts_create_repo,gcts_clone_repo,gcts_delete_repogcts_list_branches,gcts_create_branchgcts_checkout_branch,gcts_switch_branchgcts_commit,gcts_log,gcts_pullgcts_config
abapGit
get_git_types— list serializable object typesgit_export— export to abapGit format
Import / checkin
import_object,import_package,import_transportcheckin— push local files to SAP (inverse of import)
STRUST (SSL certificates)
Fiori Launchpad
RFC
call_rfc— invoke a classic RFC via SOAP-over-HTTP
Architecture notes
- Stateless. No session, no cached client, no credentials in memory between calls. Every request receives its own
AdtClient. - Schema-driven. All request bodies and response parsing go through schemas in
@abapify/adt-schemas— never a manual XML parser. - Contract-backed. Each tool calls exactly one typed contract from
@abapify/adt-contracts. If an endpoint has no contract yet, a contract is added before the tool. - Mock server for testing.
createMockAdtServer()starts an in-process HTTP server backed by fixtures; seepackages/adt-mcp/tests/integration.test.tsfor examples.
Known limitations
- Credentials in arguments. MCP tool calls include connection parameters in every invocation. The server never persists them — but clients do need to forward them.
- Per-call sessions. SAP allows one security session per user. Concurrent tool calls from the same user compete for the same slot.
- No streaming. Tools return a single JSON blob; long-running operations (package import, ATC runs) do not stream progress.
See also
- adt-mcp package AGENTS guide — internal conventions
- CLI overview — same contracts, CLI surface
- Architecture — session & lock protocol