Skip to main content

MCP Overview

@abapify/adt-mcp is a 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 ships with two transports:

  • stdio (adt-mcp) — stateless connection-per-call
  • Streamable HTTP (adt-mcp-http) — session-scoped (Mcp-Session-Id) client reuse

For HTTP deployment details, see the dedicated guide: Deploying the adt-mcp HTTP server.

# 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 for stdio mode, or configure http://<host>:<port>/mcp for Streamable HTTP mode.

Calling a tool

Tools are invoked through the standard MCP tools/call request.

  • In stdio mode, tools carry connection parameters (baseUrl, username, password, client) per call.
  • In HTTP mode, call sap_connect once per MCP session, then reuse that cached client across subsequent tool calls on the same Mcp-Session-Id.

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

Search & navigation

Source code

Objects – generic CRUD

Function groups & modules

DDIC

CDS

RAP / services

BAdI

CTS transports

ATC

  • atc_run — run ATC checks on an object / package

gCTS (git-enabled CTS)

abapGit

Import / checkin

STRUST (SSL certificates)

Fiori Launchpad

RFC

  • call_rfc — invoke a classic RFC via SOAP-over-HTTP

Architecture notes

  • Dual state model. stdio is stateless; Streamable HTTP is session-scoped and caches AdtClient per MCP session.
  • Session lifecycle (HTTP). sap_connect binds a SAP client to an MCP session; sap_disconnect (or transport close / TTL) releases locks and tears down the SAP session.
  • 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; see packages/adt-mcp/tests/integration.test.ts for examples.

Known limitations

  • stdio credentials in arguments. Stateless stdio calls include connection parameters in each invocation.
  • HTTP session affinity required. Streamable HTTP clients must preserve and resend Mcp-Session-Id.
  • No streaming. Tools return a single JSON blob; long-running operations (package import, ATC runs) do not stream progress.

See also