npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mcp-abap-adt/compact

v26.1.2

Published

The compact MCP server for SAP ABAP ADT over stdio, on premise (ECC, S/4HANA) and SAP BTP ABAP Cloud: one tool per operation with the object type in the arguments: CRUD, where-used, ATC, unit tests, transports, the debugger, abapGit, batch mode, MCP promp

Readme

@mcp-abap-adt/compact

The compact MCP server over stdio — the command that serves all 31, the four debugger tools, the leftover sessions, background runs and batch mode (HandlerBatch). The 18 that change nothing alone are @mcp-abap-adt/compact-ro (mcp-abap-adt-compact-ro): the binary fixes the tool set (19.0.0), there is no --exposition. Streamable HTTP is @mcp-abap-adt/compact-http (mcp-abap-adt-compact-http), SSE @mcp-abap-adt/compact-sse (mcp-abap-adt-compact-sse): the same tools, a package per transport.

What compact is

A different decomposition of the same ABAP ADT surface: the operation is the tool and the object moves into the arguments. Where the object-oriented surface has CreateClass, CreateDomain, CreateDdl and so on, compact has one HandlerCreate with object_type. Twenty-eight tool schemas instead of hundreds. Each object_type enum, and each tool's description, is the declared system type's: its members are those the system type's ADT type table serves (22.0.0) — on cloud the writes offer no PROGRAM and no INCLUDE — and a member outside them is refused naming the list, before anything is sent. On cloud a write handler's schema offers only the properties its cloud members take (23.0.0): HandlerCreate has no program_name, application or include_name there, for example.

It exists for a host that cannot build a retrieval pipeline of its own — a small context, no tool-RAG, no way to select tools per request — and must still drive ABAP through MCP reliably. A consumer that does select per request has no use for it and should take @mcp-abap-adt/lib instead.

The low set's analogue. The low set left the full binaries in 19.0.0; its single-step operations are compact's: HandlerCreate (the create request alone — no validation, lock, write, check or activation; the object is created inactive with what the create carries; its schema lists only what the create sends; UNIT_TEST and CDS_UNIT_TEST, whose create is a chain, are refused — the full set serves CreateUnitTest and CreateCdsUnitTest), HandlerLock, HandlerUpdate with the lock_handle it answered (one request: the write alone, under your lock; lock_handle is required; for PACKAGE, DOMAIN, DATA_ELEMENT, FUNCTION_GROUP and TABLE_TYPE, and for INCLUDE with part: 'metadata', source_code is the whole metadata document, sent as given — read it with HandlerGet part metadata, change it, pass all of it back; part is taken by INCLUDE alone, source when absent; for SERVICE_BINDING the write is its publication request), HandlerLock action: unlock, HandlerDeletionCheck (the one deletion check, SAP's verdict as it came), HandlerDelete (one request: the deletion request alone, with no lock held on the object; a class include and UNIT_TEST are written empty by one PUT under your class lock's lock_handle), HandlerCheckRun, HandlerValidate, HandlerActivate (one request: one object of a type the per-object activation maps answers its verdict; every other call starts an activation run and answers { run_id }; on a system whose discovery offers no activation runs (SAP_BASIS 751, 7.40) that call answers SAP's refusal, and a group activation there is ActivateObjects of the full set or ActivateObjectLow of the low handlers group), and HandlerGet — one request per part: source the source alone, metadata the metadata document alone (PACKAGE, DOMAIN, DATA_ELEMENT, FUNCTION_GROUP and TABLE_TYPE have only metadata; a function module is named GROUP|MODULE or with function_group_name), and object_structure / node_structure / virtual_folders (a package's blank node structure is the empty listing with blank: an empty package, or no package of that name), and activation_status / activation_results (an activation run by its run_id: its status, then its messages — asking again until the status settles is yours), and object_type UNIT_TEST / CDS_UNIT_TEST (a unit-test run's result by its run_id, one request, as HandlerUnitTestResult / HandlerCdsUnitTestResult read it; the status is HandlerUnitTestStatus / HandlerCdsUnitTestStatus, asked until it says FINISHED). HandlerDumpList reads one page per call (top 1 to 100, to): its next_to is the to of SAP's next link, and following it is yours; that page starts at the boundary second, inclusive, so match entries by dump_id. Keeping a lock from HandlerLock short is your job: the server releases nothing on its own clock — unlock as soon as the write is done. The tool-by-tool table: MIGRATION-19.0.

Batch mode: HandlerBatch. Every compact binary, -ro ones included, on every transport, serves batch mode as one tool: action: 'begin' switches the server into batch mode, every call none of whose requests depends on another's answer is then recorded (it answers nothing and takes the next number, from 1), action: 'end' sends them all in one ADT batch envelope and leaves batch mode whatever happens, and action: 'answers' with number or numbers reads each call's answer by its number. A tool that builds a request from an earlier answer is refused; run such work as phases, each its own batch — create (HandlerCreate), lock (HandlerLock), write (HandlerUpdate with lock_handle), unlock (HandlerLock action: unlock). A batch holds one kind of request — LOCK, UNLOCK or stateless, as its first recorded call decides; a call of another kind is refused batch_other_kind: record it in the next batch. Every tool's description 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 action: 'begin' answers as the state_handle argument (or in the x-mcp-state-handle header) on every call of the batch. See Batch Mode.

The long session: HandlerSession, Streamable HTTP only. mcp-abap-adt-compact-http and mcp-abap-adt-compact-http-ro serve one more tool, and declare an optional state_handle argument on every tool: over Streamable HTTP each request is served by a new instance unless it carries the state_handle of one that holds state. HandlerSession action: 'open' keeps an instance and its SAP connection for every call that carries the state_handle it answers (no new connection, no logoff between the calls); action: 'close' with that handle answers what the instance held ({ "closed": true, "held": { "locks", "batch", "debug_session" } }), then logs off every SAP session the instance owns — which releases its locks — and drops an open batch unsent; the handle then answers state is not available. A session never closed ends at the idle bound (--state-idle-minutes, default 30). The model keeps its handles: there is no list tool. The stdio and SSE binaries keep their instance for the connection's life and serve neither: compact-http.

Why two library packages

Capability is decided by what you import, not by a flag a caller can pass. A tool list assembled from @mcp-abap-adt/compact-readonly-entries has no route to a write handler in its module graph — asserted against the graph, not against a list of names, in compact/src/__tests__/compactCapabilitySplit.test.ts. The read-only half depends on @mcp-abap-adt/lib/handlers/read; the modifying half on @mcp-abap-adt/lib/handlers/write.

Note what this is not: both halves depend on @mcp-abap-adt/lib, so this is not a smaller install, and it is not a sandbox — code that deliberately reaches into lib can still call anything. It is a facade that offers no way to write.

Running it

npm install -g @mcp-abap-adt/compact
mcp-abap-adt-compact --system-type=<onprem|cloud> # stdio: all 31, the debugger tools, leftover sessions, background runs
mcp-abap-adt-compact --version

npm install -g @mcp-abap-adt/compact-ro
mcp-abap-adt-compact-ro --system-type=<onprem|cloud> # the 18 that change nothing, the leftover-session list

For partial source reads, HandlerGetPartial summarizes the object, browses its elements, and retrieves selected code. See Source Parts. HandlerUpdatePartial changes a part by a unified diff of what was read, under the lock HandlerLock took (FUNCTION_INCLUDE for a function group's include). See Changing a part.

The binary fixes the tool set. mcp-abap-adt-compact serves all 31 tools (every access, which is what a local server gives), the four debugger tools, the debugger batch (HandlerDebugBatch), the leftover-session list and logoff, the background-run tools and HandlerBatch — 41; HandlerGetData, one of the 31, only with --enable-data-tools (42). mcp-abap-adt-compact-ro serves the 18 tools that change nothing — the reads, searches, where-used, checks and validations, the unit-test status and result reads, the profiler list and view, the dump list and view, the service-binding type list, the abapGit reads (HandlerAbapGitGet) — with the background-run tools, HandlerBatch and the leftover-session list — 22, HandlerGetData (one of the 18) only with --enable-data-tools (23); its tool list is exactly these, so a client calls only them. --exposition (ro, rw, debug, any word) and a config file's exposition stop the start with a sentence naming the binary to install instead, e.g. --exposition is gone (19.0.0): the binary fixes its tool set, so remove it; the compact tools that change nothing are served by mcp-abap-adt-compact-ro (@mcp-abap-adt/compact-ro).

Leftover sessions. HandlerLeftoverSessionList is served by mcp-abap-adt-compact and mcp-abap-adt-compact-ro; HandlerLeftoverSessionLogoff by mcp-abap-adt-compact alone (a logoff releases every lock a session holds) — the SAP sessions a killed server process left open (and the locks in them), listed or logged off by the user, only the caller's own; no tool resumes one: a stdio server takes up the one leftover session of its destination at its start: Leftover SAP sessions. They are stdio's: -compact-http and -compact-sse (and their -ro) serve none and write no session file, since one such server holds the sessions of many users.

Background runs, in mcp-abap-adt-compact. HandlerProfileRun takes background: true (no default): the call answers at once with a run_handle, and the run goes on in an ABAP session of its own until SAP answers — it cannot be cut. HandlerBackgroundRunGet, HandlerBackgroundRunList and HandlerBackgroundRunDiscard read, list and remove the caller's own runs (16 at most, kept in the server's memory until discarded or the process ends): Background runs.

The debugger, always in mcp-abap-adt-compact, never in -ro. Four tools, each for ABAP and AMDP (kind: abap|amdp); every call sends one SAP request, the one its operation names, and the consumer chains the calls: HandlerDebugBreakpoints (breakpoints and watchpoints), HandlerDebugSession (check, listen with the caller's hold_seconds, stop the listener, attach, detach, terminate, settings; AMDP start, events, stop, delete a debuggee; end, which logs off the debug state and ends its handle), HandlerDebugStep (the steps, run or jump to a line, the stack position) and HandlerDebugMaintain (stack, variables, child variables, memory sizes, a snapshot, set a value; an AMDP data preview). The first call that opens the debug state answers its state_handle. In user mode a breakpoint catches every request of the request user (the connected SAP user unless another is named): where that must not be possible, install mcp-abap-adt-compact-ro. What a debug session is, what keeps it alive on each transport and what ends it: Debugger.

Configuration — the destination, authentication, the login — is the same as mcp-abap-adt's, because the launcher is the same one: this command passes the compact tool set (compactToolSetOf of @mcp-abap-adt/lib/tool-set, with the two halves' entry builders) to the stdio main of @mcp-abap-adt/server-runtime — the one mcp-abap-adt runs —, and nothing else. It depends on no other server package (not on @mcp-abap-adt/core).

RFC and SNC work here exactly as in the full server, and need the same: the SAP NW RFC library when the server runs (SAP GUI's 64-bit sapnwrfc.dll in System32 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. Check it is there with npm ls -g @mcp-abap-adt/sap-rfc-lite. Steps: RFC Setup; every variant: Installation variants.

The tool page is generated from the built packages: docs/AVAILABLE_TOOLS.md (npm run docs:tools).

Licence

AGPL-3.0-only. See LICENSE.