Back to Browse

Abap Adt MCP Server

Developer ToolsLow Risk8.7MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server for SAP ABAP ADT over HTTP, RFC or SNC: repository analysis and RAP/classic ABAP CRUD

About

MCP server for SAP ABAP ADT over HTTP, RFC or SNC: repository analysis and RAP/classic ABAP CRUD

Security Report

8.7
Low Risk8.7Low Risk

Valid MCP server (2 strong, 1 medium validity signals). 2 known CVEs in dependencies (0 critical, 1 high severity) ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. Trust signals: 10 highly-trusted packages. 1 finding(s) downgraded by scanner intelligence.

8 files analyzed · 3 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Path to the .env file that states the destination (the same as the --env-path argument). The file states SAP_URL and SAP_AUTH_TYPE (basic, snc or jwt); a jwt file also states SAP_GRANT_TYPE (authorization_code or none). Without this or --mcp, the server starts in tool-inspection-only mode: nothing is read from the working directory, and SAP_* variables in the process environment alone form no destination.Optional

Environment variable: MCP_ENV_PATH

Base directory of service-keys/ and sessions/ for a named destination chosen with the --mcp argument (one directory; a list is not split). Default: ~/.config/mcp-abap-adt (Documents\mcp-abap-adt on Windows).Optional

Environment variable: AUTH_BROKER_PATH

Browser for a JWT login: chrome, edge, firefox, system, headless or none.Optional

Environment variable: MCP_BROWSER

Callback port of the JWT browser login, 1-65535.Optional

Environment variable: MCP_BROWSER_AUTH_PORT

Write a named destination's session to disk (sessions/<name>.env) instead of keeping it in memory.Optional

Environment variable: MCP_UNSAFE

Connection type: http or rfc. SNC needs rfc (and the SAP NW RFC SDK).Optional

Environment variable: SAP_CONNECTION_TYPE

System type, required (here or as --system-type; no default, never guessed): the tools offered (e.g. Programs are onprem-only), the connector, and how the system's answers are read. Without it a destination does not start.Optional

Environment variable: SAP_SYSTEM_TYPE

Logon language (ISO code, e.g. 'en', 'de').Optional

Environment variable: SAP_LANGUAGE

System context for on-prem create/update operations (system id).Optional

Environment variable: SAP_MASTER_SYSTEM

Responsible user for on-prem create/update operations.Optional

Environment variable: SAP_RESPONSIBLE

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "core": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-abap-adt/core"
      ],
      "env": {
        "MCP_UNSAFE": "your-mcp-unsafe-here",
        "MCP_BROWSER": "your-mcp-browser-here",
        "MCP_ENV_PATH": "your-mcp-env-path-here",
        "SAP_LANGUAGE": "your-sap-language-here",
        "SAP_RESPONSIBLE": "your-sap-responsible-here",
        "SAP_SYSTEM_TYPE": "your-sap-system-type-here",
        "AUTH_BROKER_PATH": "your-auth-broker-path-here",
        "SAP_MASTER_SYSTEM": "your-sap-master-system-here",
        "SAP_CONNECTION_TYPE": "your-sap-connection-type-here",
        "MCP_BROWSER_AUTH_PORT": "your-mcp-browser-auth-port-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

mcp-abap-adt: Your Gateway to ABAP Development Tools (ADT)

Stand With Ukraine

mcp-abap-adt is an MCP server for ABAP ADT in SAP ECC/S/4HANA (on-premise) and SAP BTP ABAP Cloud systems. It gives agents controlled access to real ABAP repositories through ADT, so analysis and changes are grounded in system data instead of assumptions. It is built for AI-assisted pair programming (AIPNV: AI Pairing, Not Vibing), not autopilot vibe coding.

What it does

What you can do, grouped by what you want; each item links to its page. Where it matters, an item names its binaries and systems: -ro is a read-only binary, compact a binary of the compact tool set, onprem an ECC or S/4HANA system, cloud SAP BTP ABAP Cloud. New in 24.2.0 is marked.

Analyse code and its impact

  • Where-used and impact analysis: find every object that uses a class, table, CDS view, function module or text element before you change it — GetWhereUsed.
  • Search objects and source text: find objects by name and type, and search ABAP source inside packages — SearchObject, SearchSource, Read-only tools.
  • Read any repository object: source and metadata of classes, interfaces, programs, includes, function groups and modules, DDIC, CDS, RAP behavior, service definitions and bindings, message classes, enhancements (implementations onprem only) — Read-only tools.
  • Structure and outline: an object's components with the source lines each occupies, package trees and contents, includes and main programs — GetObjectOutline, GetObjectStructure, GetPackageTree.
  • Versions and diffs: list an object's versions, read an old version, compare two — Common tools.
  • Draft detection: see whether an object holds an unactivated change, and whose — GetObjectDraft (compact HandlerGet part: 'draft'), Access restrictions.

Develop and change

  • Full CRUD: create, read, update, delete, check and activate classes (with their local includes), interfaces, programs and includes (onprem), function groups and modules, packages, domains, data elements, tables, structures, table types, CDS views, RAP behavior definitions and implementations, metadata extensions, service definitions and bindings, message classes — High-level tools, compact HandlerCreate / HandlerUpdate / HandlerDelete.
  • Activation: activate one object or a list together — ActivateObjects, compact HandlerActivate.
  • Table settings and text elements: read and write a table's technical settings, and the text symbols, selection texts and headings of a program, function group or class (onprem and cloud) — Text elements.
  • Packages with no super package (new in 24.2.0): a structure package or a local (LOCAL) package can be created, locked and unlocked with no super package — CreatePackage, compact HandlerCreate PACKAGE.
  • abapGit (new in 24.2.0): find a package's repository, link it, pull, see what changed, stage, commit and push, switch branches and read the run log — on premise and on ABAP Cloud, full and compact, with any git host over HTTPS, the git credential bound to approved endpoints and kept out of every argument, log line and answer — abapGit.

Test and quality

  • ATC: run the ABAP Test Cockpit over several objects, read its findings, and list and read the stored ATC results — ATC tools.
  • ABAP Unit: create, update and run the tests of a class, program (onprem), function group, function module or CDS view, or run every test of a package — Unit test tools.
  • Syntax checks: check an object before activation — the Check* tools, compact HandlerCheckRun.

Transports

  • Transport requests: create requests and tasks, list a user's requests, read a request's objects and action log, add, remove and move objects, sort and compress a task — Transport tools; the read half in every binary, -ro included.

Debug and runtime

  • ABAP and AMDP debugger: breakpoints, stack, variables, watchpoints, steps and memory snapshots, a session kept between calls — Debugger; the full and compact write binaries, no -ro one.
  • Run and profile: run a class (and a program, onprem), with a profiler trace if asked, and read the traces — RuntimeRunClass, RuntimeRunProgram, the Runtime*Profiler* tools.
  • Dumps and feeds: read short dumps, system messages and (onprem) the gateway error log — RuntimeListFeeds, RuntimeGetDumpById.

Govern and secure

  • Access restrictions: deny tools or values (--deny-actions), and allow only listed packages, transport requests or tables (--allowed-packages, --allowed-requests, --allowed-tables / --denied-tables), set at start in every binary — Access restrictions.
  • Read-only binaries: mcp-abap-adt-ro, -http-ro, -sse-ro and the compact -ro three serve nothing that changes the system — Handler sets.
  • Data tools off by default: freestyle SQL and table preview (GetSqlQuery, GetTableContents, compact HandlerGetData) are not listed unless the server is started with --enable-data-tools — The data tools.
  • SAP authorization stays the boundary: every call runs as the connected SAP user, and the restrictions only take away — Security.

Work with agents

  • MCP prompts (new in 24.2.0): nine ready-made requests — create, get, update, delete, activate, check, unit_test, where_used, transport — that a client shows as slash commands, each answering the tools to call in order; every binary on onprem and cloud (the -ro ones get, where_used, transport, compact -ro also check) — MCP Prompts.
  • Terse answers (new in 24.2.0): every tool answers what the next call needs — TSV for a list, every row answered — and detail (terse, medium, full, raw) chooses the reading before the call — Answers.
  • Batch mode: record independent calls and send them to SAP together in one ADT batch request (compact binaries, -ro included) — Batch Mode.
  • Background long reads: where-used, search, package walks and other long reads answer a handle at once and are read or cancelled later, in every binary — Background runs.
  • Tool search texts: every tool carries keywords for BM25 and a sentence for vector search beside its description — Tool Search.
  • Long session by state_handle: keep one SAP session across a run of calls over Streamable HTTP — SessionOpen / SessionClose (compact HandlerSession), the -http binaries — Held state and the long session.
  • Full or compact: the full set has one tool per action and object type; the compact set has one tool per operation with the object type in the arguments — Compact tools.
  • Embeddable: the tools and an MCP server as a library, @mcp-abap-adt/lib (Apache-2.0) — Embeddable server.

Connect and run

  • Works with On-Premise (ECC/S/4HANA) and ABAP Cloud (BTP) systems; legacy systems (BASIS < 7.50) are not supported at present: that support is parked on the parked/legacy-support branch until it can be tried against a live legacy system
  • Three authentications over stdio: basic (HTTP or RFC), SNC (passwordless, RFC), JWT with browser login (service key, ABAP or XSUAA); a JWT you already hold goes in the x-sap-jwt-token header of mcp-abap-adt-http / mcp-abap-adt-sse
  • Multiple transports: stdio, HTTP, SSE
  • Several installation variants: the full server (@mcp-abap-adt/core) or the compact one (@mcp-abap-adt/compact), each connecting to the system over HTTP, RFC or SNC — see Installation variants

Authorization & Destinations (Important): A destination is the filename of a service key stored locally. You place service keys in the service-keys directory, and use --mcp=<destination> to select which one to use. This is the primary auth model for on‑prem and BTP systems. See Authentication & Destinations.

You can configure MCP clients either manually (JSON/TOML) or via the configurator CLI (@mcp-abap-adt/configurator, repo: mcp-abap-adt-conf).

Table of Contents

  1. What it does
  2. Getting Started
  3. Architecture
  4. Quick Start
  5. Use Cases
  6. Target Users
  7. Capabilities (High-Level Focus)
  8. Terminology
  9. Authorization & Destinations
  10. Registries
  11. Features — abapGit
  12. Documentation
  13. Dependencies
  14. Running the Server

Getting Started

Pick a variant first — full or compact server, and HTTP, RFC or SNC to the system. HTTP needs nothing but Node.js 22 or 24; RFC and SNC need the SAP NW RFC library when the server runs — SAP GUI's 64-bit sapnwrfc.dll on Windows, else the SAP NW RFC SDK; the RFC module comes prebuilt for Linux x64 (glibc), Windows x64 and macOS ARM64, and npm install compiles nothing. Installation variants has the table and the commands; RFC Setup the steps. To run without Node.js on a machine, build your own portable executable — Node.js and your SAP NW RFC SDK inside.

Install the server and configure your client using the configurator:

npm install -g @mcp-abap-adt/core
npm install -g @mcp-abap-adt/configurator

# stdio (destination)
mcp-conf --client cline --name abap --mcp TRIAL

# HTTP (streamable HTTP)
mcp-conf --client copilot --name abap --transport http --url http://localhost:3000/mcp/stream/http

Full configurator usage (separate repo): CLIENT_INSTALLERS.md.

Terminology

Destination: a local service key filename. You store service keys in the standard service-keys directory, and pass the filename (without extension) via --mcp=<destination> to select which system to use.

See docs/user-guide/TERMINOLOGY.md for the full list.

Authorization & Destinations

Destination-based auth is the default. Drop service keys into the standard platform folder and use the filename as your destination:

mcp-abap-adt --mcp=TRIAL --system-type=cloud

Standard service key paths:

  • Unix (Linux/macOS): ~/.config/mcp-abap-adt/service-keys/<destination>.json
  • Windows: %USERPROFILE%\\Documents\\mcp-abap-adt\\service-keys\\<destination>.json

mcp-abap-adt (stdio) supports exactly three authentications, each a destination stated in a service key, a .env, or both; a JWT you hold is sent in headers to the HTTP or SSE server:

Authentication.env keys
Basic (HTTP or RFC)SAP_AUTH_TYPE=basic, SAP_USERNAME, SAP_PASSWORD
SNC (RFC only, passwordless)SAP_AUTH_TYPE=snc, SAP_SNC_PARTNERNAME, optional SAP_SNC_QOP, SAP_SNC_LIB, SAP_SNC_MYNAME — no user, no password
JWT, browser loginSAP_AUTH_TYPE=jwt, SAP_GRANT_TYPE=authorization_code, a service key (ABAP or XSUAA) or SAP_UAA_*
JWT you holdthe x-sap-jwt-token header of mcp-abap-adt-http / mcp-abap-adt-sse (stdio serves none)

A jwt .env must state SAP_GRANT_TYPE. The mcp-auth command that writes such a .env comes from @mcp-abap-adt/auth-broker-cli. The browser login listens on port 61001 unless --browser-auth-port says otherwise.

A created object always carries its responsible person and, where known, its master system. The servers name them once per destination — its credentials and its ABAP system — when its connection is created, by the rules of @mcp-abap-adt/responsible-rules: the system's systeminformation answer (its user, its system id) wins, on-premise and on ABAP Cloud alike; a tool argument that names the value (a transport's owner, say) still states it for that call. When the system gives no information, ABAP Cloud is an error (cloud_without_systeminformation for a 404, else system_lookup_failed); on-premise the responsible is SAP_RESPONSIBLE / x-sap-responsible if stated, else the login (SAP_USERNAME, x-sap-login), and the master system SAP_MASTER_SYSTEM / x-sap-master-system when stated; with no user at all the call is refused system_user_unknown, and a stdio start ends with exit 1. A 401 is answered as it came. The library applies no rules unless an embedder passes them. See Authentication & Destinations.

On supported SAP HTTP connections, 24.1.1 can retry a standalone syntax check such as CheckClass in the same MCP call after SAP returns a CSRF 403 and the connector detects session replacement. See Syntax checks after session loss.

Coming from 23.x? See the 24.0 migration note — an RFC destination states its address (SAP_ASHOST and SAP_SYSNR, or the message-server keys), SAP_CLIENT and SAP_LANGUAGE, and no SAP_URL; over MCP two arguments become required (CreateDomain's package_name, compact HandlerCreate BEHAVIOR_IMPLEMENTATION's behavior_definition) and a few tools declare arguments their handlers already read; compact HandlerSearch and HandlerWhereUsed became HandlerSystem's search_object and where_used, beside six reads compact did not have; an embedder writes a tool's inputSchema in zod, builds an entry with defineTool, calls it as entry.call(context, args) and registers it with registerTool(server, entry). Coming from 22.x? See the 23.0 migration note — CreateProgram no longer offers include (create an include with CreateInclude); an embedder registering the ./handlers groups on its own McpServer states systemType (SAP_SYSTEM_TYPE is not read there), and HandlerExporter serves no background run and no debugger. Coming from 21.x? See the 22.0 migration note — the tools, their enums and the object types each argument accepts are the declared system type's (onprem or cloud), inspection needs --system-type too, function / func are the function module, main types stand for their one code, RunATC on cloud offers no program, and ValidateServiceBinding requires package_name. Coming from 19.x? See the 20.0 migration note — RFC on connection 19 and sap-rfc-lite 0.3.2: nothing compiled on install, a prebuilt binding for Linux x64, Windows x64 and macOS ARM64 only; over Streamable HTTP state_handle is an argument of every tool, and a long session keeps one SAP session across calls. Coming from 18.x? See the 19.0 migration note — the server split into a package per transport and tool set, the system type required, the low set gone, the auth chain on 6.0. Coming from 17.x? See the 18.0 migration note — the debugger's embedder surface moved to adt-clients 29, and a debugger start needs at least one breakpoint. From 16.x, the 17.0 note first.

For full details (paths, .env, direct headers), see Authentication & Destinations.

Architecture

The project ships a library and the servers — and a compact variant of each server — because the two usage patterns want different licences. Embedding the tools in a network service should not drag in the obligations of a server that service never runs.

PackageLicenceWhat it is
@mcp-abap-adt/libApache-2.0The ADT tool handlers and the embeddable MCP server. No transport: the host supplies one.
@mcp-abap-adt/coreAGPL-3.0-onlyThe standalone stdio server, mcp-abap-adt: one destination through the auth broker. Depends on the library.
@mcp-abap-adt/httpAGPL-3.0-onlyThe Streamable HTTP server, mcp-abap-adt-http: credentials from each request's x-sap-* headers.
@mcp-abap-adt/sseAGPL-3.0-onlyThe HTTP+SSE server, mcp-abap-adt-sse: credentials from the x-sap-* headers of each SSE connection's GET.
@mcp-abap-adt/compactAGPL-3.0-onlyThe compact server over stdio, mcp-abap-adt-compact: one tool per operation, the object type in the arguments. core's launcher and configuration (from server-runtime) with the compact tool set.
@mcp-abap-adt/compact-httpAGPL-3.0-onlyThe compact server over Streamable HTTP, mcp-abap-adt-compact-http: http's launcher and configuration (from server-runtime) with the compact tool set.
@mcp-abap-adt/compact-sseAGPL-3.0-onlyThe compact server over HTTP+SSE, mcp-abap-adt-compact-sse: sse's launcher and configuration (from server-runtime) with the compact tool set.
@mcp-abap-adt/server-runtimeAGPL-3.0-onlyThe launch code of every server: the stdio, Streamable HTTP and SSE launchers and servers, and the destination layer. No command of its own: every server package depends on it, so it is installed with each server; you never install it yourself.
@mcp-abap-adt/background-runs-memoryApache-2.0The in-memory store of background runs (IBackgroundRuns of the library): the servers' store, for an embedder that keeps runs in its process. Every server package depends on it.
@mcp-abap-adt/responsible-rulesApache-2.0The rules that name a call's responsible, user and system from systeminformation (SystemContextRules of the library), and the system type the binaries require. Every server package passes them; the library applies none, so an embedder opts in.
@mcp-abap-adt/core-ro, http-ro, sse-roAGPL-3.0-onlyThe read-only servers, mcp-abap-adt-ro, mcp-abap-adt-http-ro, mcp-abap-adt-sse-ro: core's, http's and sse's launcher with the readonly tools (with system and search), the background runs of the long reads, batch mode and, on stdio, the leftover-session list — nothing that changes the system: no high, run, trace-schedule, debugger, leftover-session logoff or resume tool.
@mcp-abap-adt/compact-ro, compact-http-ro, compact-sse-roAGPL-3.0-onlyThe read-only compact servers, mcp-abap-adt-compact-ro, -compact-http-ro, -compact-sse-ro: the 17 compact tools that change nothing, the background runs of the long reads, HandlerBatch and, on stdio, the leftover-session list.
@mcp-abap-adt/compact-readonly-entries, compact-modifyApache-2.0The compact tools as libraries, split into the half that changes nothing and the half that writes (compact-readonly-entries was compact-readonly before 19.0.0).

Eighteen packages, twelve binaries: four kinds of binary — core, core-ro, compact, compact-ro — on each transport. The binary fixes the tool set (19.0.0; there is no --exposition): install the one for your transport and the tools you want to run a server — @mcp-abap-adt/core, http or sse (readonly, high, the debugger), their -ro packages (the readonly tools alone), compact, compact-http, compact-sse, or their -ro packages (the compact tools that change nothing). Install @mcp-abap-adt/lib to embed the tools in your own application. Every binary and its tools: Handler sets.

Each server is installed on its own (npm install -g @mcp-abap-adt/compact): a server package brings everything it runs on — server-runtime, lib and the rest — and depends on no other server package, so installing two servers, in one command or in two, is fine and neither needs the other. Since 19.2.0 a process that loads two copies of @mcp-abap-adt/lib anyway does not start: it prints Two copies of @mcp-abap-adt/lib are loaded in this process (<copy>, <copy>): reinstall <package> (npm install -g <package>). — each copy by its version and label, an earlier one as a copy before 24.0.0 — and exits 1 — see One lib per server process.

1. Standalone MCP Server (Default)

Run as a standalone MCP server; a binary is its transport (there is no --transport option):

mcp-abap-adt --mcp=TRIAL --system-type=cloud # stdio (@mcp-abap-adt/core): one destination
mcp-abap-adt-http --system-type=<onprem|cloud> # Streamable HTTP (@mcp-abap-adt/http): x-sap-* headers per request
mcp-abap-adt-sse --system-type=<onprem|cloud> # SSE (@mcp-abap-adt/sse): x-sap-* headers per SSE connection
mcp-abap-adt-compact --mcp=TRIAL --system-type=cloud # the compact tool set over stdio (@mcp-abap-adt/compact)
mcp-abap-adt-compact-http --system-type=<onprem|cloud> # ... over Streamable HTTP (@mcp-abap-adt/compact-http)
mcp-abap-adt-compact-sse --system-type=<onprem|cloud> # ... over SSE (@mcp-abap-adt/compact-sse)
mcp-abap-adt-ro --mcp=TRIAL --system-type=cloud # the readonly tools alone over stdio (@mcp-abap-adt/core-ro)
mcp-abap-adt-compact-ro --mcp=TRIAL --system-type=cloud # the compact tools that change nothing (@mcp-abap-adt/compact-ro)
                                       # (and -http-ro, -sse-ro, -compact-http-ro, -compact-sse-ro)

2. Embeddable Server (For Integration)

Embed MCP server into existing applications (e.g., SAP CAP/CDS, Express). This needs @mcp-abap-adt/lib only — not the AGPL server:

npm install @mcp-abap-adt/lib
import { EmbeddableMcpServer } from '@mcp-abap-adt/lib/embeddable';

const server = new EmbeddableMcpServer({
  connection,              // Your AbapConnection instance
  logger,                  // Optional logger
  exposition: ['readonly', 'high'],  // Handler groups to expose
  // A tool both groups serve under one name (Get<Type>) is listed once.
  // readOnlyDedupStrategy: a custom IReadOnlyDedupStrategy hides more.
});
await server.connect(transport);

See Handlers Management → EmbeddableMcpServer dedup strategies for how readonly tools are deduped against high and how to plug a custom IReadOnlyDedupStrategy for role-based rules.

Quick Start

  1. Install server: pick the installation variant — full or compact, HTTP, RFC or SNC — and follow the Installation Guide
  2. Configure client (auto): Use mcp-conf from @mcp-abap-adt/configurator (repo: mcp-abap-adt-conf, docs: CLIENT_INSTALLERS.md)
  3. Configure client (manual): See Client Configuration
  4. Use:

Use Cases

  • Impact analysis / where-used before changes: map object usage and probable blast radius.
  • Dependency audit: inspect links across classes, interfaces, DDIC, CDS/views, and RAP artifacts.
  • Migration and cleanup prep: extract repository facts to plan refactoring or cloud-readiness work.
  • RAP and ABAP iterative development: create/update artifacts quickly with ADT-backed operations.
  • Automated documentation and RAG ingestion: pull structured facts from ABAP systems for downstream tooling.

Target Users

  • ABAP developers and ABAP architects
  • RAP developers
  • Team leads and tech leads who need fast repository visibility
  • Teams building RAG/agent workflows for SAP landscapes

Capabilities (High-Level Focus)

Key examples of high-value workflows and tools:

  • Repository and impact analysis: GetWhereUsed, DescribeByList, GetObjectStructure, GetObjectInfo, SearchObject, GetPackageTree, GetPackageContents
  • Code structure, as SAP states it: GetObjectOutline (an object's components with the source lines each occupies), the Get<Type> source reads with start_line/end_line for just those lines, GetIncludesList
  • RAP development: CreateBehaviorDefinition, UpdateBehaviorDefinition, CreateBehaviorImplementation, UpdateBehaviorImplementation, CreateServiceDefinition, UpdateServiceDefinition, CreateMetadataExtension, UpdateMetadataExtension
  • CDS development: CreateDdl, UpdateDdl, GetDdl, DeleteDdl, CheckDdl, ActivateDdl
  • ABAP OO CRUD: CreateClass, UpdateClass, GetClass, DeleteClass, CreateInterface, UpdateInterface, GetInterface, DeleteInterface
  • Function module/group CRUD: CreateFunctionGroup, UpdateFunctionGroup, GetFunctionGroup, DeleteFunctionGroup, CreateFunctionModule, UpdateFunctionModule, GetFunctionModule, DeleteFunctionModule
  • Transport and activation support: CreateTransport, CreateTransportTask, GetTransport (a transport request or a task, by its number: a request's header and tasks, a task's header, parent request and objects with their positions), ListTransports, ReadTransportObjects, AddTransportObject, MoveTransportObjects, ActivateObjects
  • Quality and testing: RunATC, GetATCRunStatus, GetATCFindings (ABAP Test Cockpit — one run over several objects, findings read back by worklist), ListATCResults, GetATCResult (the stored ATC results — central and users' runs — listed by user, kind and age, one read by its Display ID), ABAP Unit per test carrier — CreateUnitTest/UpdateUnitTest/DeleteUnitTest/RunUnitTest for a class, CreateCdsUnitTest/RunCdsUnitTest for a CDS view, CreateProgramUnitTest/RunProgramUnitTest for a report, CreateFunctionGroupUnitTest/RunFunctionGroupUnitTest/RunFunctionModuleUnitTest for a function group (runner: 'async', the default, starts the run; with wait: true, the default, the call reads the run's status at once and long-polls it while SAP answers it running, and once more when SAP answers that first read NOT_STARTED (the run it just started may not have begun yet), and answers the result of a run SAP answers finished, lasting as long as the run, or the run_id and NOT_STARTED when the long-polled read still answers it; GetUnitTestResult, given a run_id, answers NOT_STARTED at once; with wait: false it answers the run_id right after the start, which GetUnitTestResult reads — the way to start a long run under a client with a request time limit; runner: 'sync' is one request to /abapunit/testruns answering the finished result — for a system that has that endpoint alone; a function module's synchronous run takes function_group_name and covers every test of its group), and RunAbapUnit (with the same wait) for any ABAP Unit run target: an object of any type of the run registry (CLAS/OCL, DDLS/DF, …) or a package, with or without its subpackages; a CDS view's tests are assigned tests and execute with scope.foreign_tests: true — CheckClass and the rest of the Check* family

Long reads run in the background

The long reads on an approved list (where-used and search, SearchSource, package walks, data preview, the dump feed, profiler traces, … — tools/long-handlers.json) run on an ABAP session of their own. Since 24.0.0 a call without background answers a run_handle at once, and the result is read with GetBackgroundRun (compact HandlerBackgroundRunGet); background: false answers the result in the call. DiscardBackgroundRun (compact HandlerBackgroundRunDiscard) on a running read cancels it: its session is logged off, and nothing was changed. No tool takes a timeout: a read ends when SAP answers or when you cancel it. Once Get answers a finished or cancelled read, that read is gone: a Get response lost on the way cannot be recovered, ListBackgroundRuns no longer shows it, and the read must be started again. Every binary serves the background-run tools, the -ro ones included (their runs are reads alone). A server without background runs (an embedder without a store) lists a long tool without background and answers its read in the call. See MIGRATION-24.0.

Answers

A tool answers what the next call needs. What it answers is the reading the tool hands to its adt-clients call, chosen by detail before the request is sent; the answer is never cut — every row SAP answered is answered. detail has four levels:

  • terse (the default): compact, what the next call needs. A list answers TSV: one header line, one row per item, and a # <field> <value> line where a value would repeat on every row (a package, a task, an object). An item's details come from that item's own tool.
  • medium: every field the reading read, without the document's leftovers (URIs, namespaces).
  • full: the whole parse, the answer as it was before detail where a tool did not take it.
  • raw: what ADT sent. The shape is the tool's, not the call's, and each tool's detail description names it. A tool that reads one document answers that document as is. A tool that assembles reads — package contents and tree, the other repository walks (GetObjectInfo, GetNodeStructureLow included), SearchSource, DescribeByList, the include, structure and function group lists, GetEnhancements, GetWhereUsed, GetUnitTest, GetCdsUnitTest, GetUnitTestResult, GetCdsUnitTestResult, the unit-test runs, RuntimeListFeeds, CreateTransport, CreateTransportTask, CreateTableType, UpdateTableType, ActivateObjectLow — always answers a JSON array of every response the call got, in read order, each as { "status", "body" } as ADT sent it, an array even when the call read one: no parse, no projection, nothing of ours mixed in. A body the connection hands over as an object is its JSON text, bytes their UTF-8 text. When full is an error, or reports a read that failed or could not be read — an error member, a non-empty failures, unreadable, append_candidates_unread or includes_unread, or appends_unavailable: true — raw answers full's answer as an error. A parse failure is the one exception: full an error while every exchange was answered 2xx (every part of a batch envelope included) and our reading refused what came — then raw still gives the documents. CreateTransport answers a read-back that failed — with SAP's response or with none — as { "responses", "read_back" }, the responses beside the same note full gives. Otherwise raw is the documents, and a failed exchange full neither refuses nor reports (the probe of a batch endpoint a destination does not serve) is there as its failed response, never as a gap.

An answer is the complete result or an error, never a partial one. A terse or medium list is written from the reading's own lists, by construction: each tool states a column schema for every list its reading holds — a list without one does not compile — and the writer takes the lists from the reading itself and writes one row (or line, or entry) per item, every cell from that item, so no formatter chooses its items. A kind of item the approved answer leaves out by definition (the package and container nodes of a where-used tree, a separator line of an action log, a branch repeating a transport request already listed, a component's links in an outline) is named with its reason in the tool's schemas, every item still visited. What a reading cannot show — a node SAP could not load, an include or a probe SAP refused, a read that failed — is a typed list of the reading and is written like any other. Every value is escaped: a tab or any line terminator in SAP's text adds no column and no line. Terse lists what SAP returned: no row says that something asked for is absent — a consumer reads that with its own call, or asks medium or full where a tool states it — while what SAP itself returned stays, incomplete objects and nodes SAP could not load included (a node SAP could not load is its not loaded by SAP row at terse, medium and full; at raw, SAP's XML carries it).

JSON answers are minified. A compact tool answers as the full tool it reads through, at every level.

Migration (24.2.0): a caller that parsed a tool's default JSON asks for detail: 'full', which gives the former shape where the tool had no detail before; where it had one, the former terse JSON is detail: 'medium'. See the CHANGELOG. The same holds for the tools that moved after it (GetObjectInfo, GetNodeStructureLow, ListATCResults; GetSqlQuery, GetTableContents and HandlerGetData, whose former terse JSON is detail: 'medium').

Batch mode

Calls none of whose requests depends on another's answer can be recorded and sent together, in one ADT batch envelope, instead of one request each. Batch mode is the compact binaries' (the -ro ones included, on every transport), one tool, HandlerBatch: action: 'begin' switches the server into batch mode, every such call is then recorded, answers nothing and takes the next number (from 1, in the order made), action: 'end' sends them all and leaves batch mode whatever happens, and action: 'answers' reads each call's answer by its number — the answer the tool gives outside batch mode for what SAP answered. The full binaries serve no batch mode; their debugger batch reads its answers with DebugBatchAnswers.

A tool that builds a request from an earlier answer is refused in batch mode — a high-level create or update, a fallback after a 404, a poll. Run such work as phases, each its own batch, with the single-step tools: create (compact HandlerCreate, one request), lock (HandlerLock; the handles read with HandlerBatch action: 'answers'), write (HandlerUpdate with lock_handle, one request; the whole metadata document in source_code for PACKAGE, DOMAIN, DATA_ELEMENT, FUNCTION_GROUP and TABLE_TYPE, and for INCLUDE with part: 'metadata'), unlock (HandlerLock action: unlock), read back (HandlerGet, one request per part: source or metadata), activate (HandlerActivate, one request; a list, an object_adt_type and the types the per-object activation leaves to a run answer { run_id }), and the run's state (HandlerGet part: activation_status, then activation_results, by run_id; with with_long_polling: true the status read is one request SAP holds until the run ends, without it a read answered at once, as often as you choose); a unit-test run is one request with the synchronous runner (HandlerUnitTestRun with runner: 'sync', answering the finished result) or, with the asynchronous runner (runner: 'async', the default), its start (HandlerUnitTestRun, answering run_id; by tests, or by a run target — an object of any run type or a package — which takes this runner), its status (HandlerUnitTestStatus, as often as you choose, until FINISHED) and its result (HandlerUnitTestResult, one request); a profiled run is its schedule (HandlerProfileSchedule, answering profiler_id), the run under it (HandlerProfileRun with that profiler_id) and its trace (HandlerProfileList, as often as you choose, then HandlerProfileView); a deletion is a deletion check (HandlerDeletionCheck, one request) and then the delete (HandlerDelete, the deletion request alone). A batch holds one kind of request — LOCK, UNLOCK or stateless, as its first recorded call decides — so each batch end sends one envelope; a call of another kind is refused batch_other_kind: record it in the next batch. A transport create (HandlerTransportCreate, HandlerCreate object_type: 'TRANSPORT') types the new request's task from the create's answer and is not recorded. Every tool's description in a compact binary ends with one sentence saying how it behaves in batch mode: recordable, recordable for the arguments it names, or run outside batch mode. Over Streamable HTTP, send the state_handle HandlerBatch action: 'begin' answers as the state_handle argument (or in the x-mcp-state-handle request header) on every call of the batch. See Batch Mode, with the list of every recordable call.

Tools that read several objects at once (GetEnhancements, SearchSource, the package listings and walks, …) also send their independent reads in ADT batch envelopes. The server sets no bound of its own on an envelope: by default a step's reads go in one envelope, and SAP's answer to it is the answer. To bound it, start with --batch-parts-per-envelope=<parts> (MCP_BATCH_PARTS_PER_ENVELOPE, YAML batch.partsPerEnvelope): the most parts (requests) in one envelope, each read's requests kept together. 24.2.1 and earlier split at 300 reads in some of those tools; --batch-parts-per-envelope=300 gives about that size.

Prompts

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!