@iflow-mcp/joamel01-sap_adt_mcp
v1.4.7
Published
MCP server for SAP ADT repository access
Readme
SAP ADT MCP
Reusable MCP server for SAP ADT repository access.
The project is now maintained in English. The earlier Swedish overview is preserved in readme_sv.md.
Status
Version 1.4.0 is the current working baseline.
The practical verification work in this repository was carried out against ABAP Cloud Developer Trial 2023 for Docker.
The MCP now covers the main repository-centric SAP ADT workflows needed by an AI coding agent:
- ADT discovery
- workspace-roots lookup when the MCP client supports roots
- read object source and metadata
- write object source with stateful session handling
- lock and unlock flows
- explicit advanced lock/unlock helpers for source objects
- syntax check for supported repository objects without activation
- activation and activation log lookup
- dependency-aware activation helper for small known object chains
- small-set mass activation with optional stop-on-error behavior
- object deletion
- transport request creation, listing, inspection, checks, release and deletion
- package creation
- scaffold creation from templates
- creation of function group, function module, interface, report transaction, program, class, DDLS, DCLS and DDLX
- creation of RAP behavior definitions (BDEF) with verified create, source write, read and delete flows
- creation of DDIC objects:
- data elements
- domains
- domains with fixed values and value tables
- transparent tables
- structures
- table types
- persistent user-parameter read/update through verified helper flows
- local Markdown documentation and example search
- optional workspace Markdown search through client roots
- search help creation through the verified helper-program flow
- ABAP Unit metadata lookup
- ABAP Unit execution for one class or executable program
- ABAP
programrun - ABAP
classrun - CLI-friendly runtime output summaries for
programrunandclassrun - one-step post-activation verification for runnable programs and classrun classes
Newly Consolidated Findings In 1.4.0
This version closes the main stabilization loop after the large feature-expansion phase.
New in this version:
sap_adt_get_workspace_rootssap_adt_search_docsnow supports:- project docs
- optional workspace-root Markdown search
- a light regression bundle now exists through:
npm run verify:reference- SAP_ADT_MCP_Reference_Suite.md
- the project now has an explicit stabilization note:
Previously Consolidated Findings In 1.3.0
This version incorporates the most important lessons from the latest verification rounds:
- ABAP Unit metadata and execution endpoints are verified and exposed as MCP tools.
- ABAP Unit payload structure is confirmed, and the MCP now parses structured result summaries when the payload supports it.
- Broader live ABAP Unit verification now confirmed one non-empty ADT payload path in this environment:
- a program with local test classes returned structured
aunit:runResultXML - class-based own tests still returned empty payloads in the same container
- a program with local test classes returned structured
- External verification through Gemini CLI confirmed that the MCP is usable from a real third-party MCP client, not only through local direct scripts.
- A later external Gemini verification round on
1.3.0confirmed a full runtime chain throughsap_adt_run_class:- AMDP table function returned carrier data
- CDS consumer view joined flight data with the table function result
- the service class consumed the CDS layer successfully
- the resulting classrun output proved that the end-to-end backend chain was not only activatable but also executable
- A full SAPUI5 backend preparation flow was verified through the MCP:
- CDS basic view
- CDS consumption view
- metadata extension
- test report
- active OData service used by a deployed UI5 app
- That same UI5 exercise also clarified a scope boundary:
- the MCP is strong for ABAP backend artifacts consumed by UI5 apps
- BSP upload, app index rebuild, Launchpad content setup and PFCG role work remain separate SAP administration steps outside the current ADT-only scope
Key Technical Findings
The following behavior is verified against SAP and reflected in the implementation:
- activation requires full ADT object URIs and correct
adtcore:type - interface support is now verified through the native ADT interface endpoint:
- create on
/oo/interfaces - source read/write on
/oo/interfaces/{name}/source/main - activation as
INTF/OI
- create on
- classic function-group support is now verified through native ADT endpoints:
- function groups on
/functions/groups/{group} - function modules on
/functions/groups/{group}/fmodules/{fmodule} - source read/write on
.../source/main - activation types:
FUGR/FFUGR/FF
- function groups on
- RAP behavior-definition support is now partially verified through native ADT endpoints:
- create on
/bo/behaviordefinitions - source read/write on
/bo/behaviordefinitions/{name}/source/main - delete via source lock URI
- activation type mapping:
BDEF/BDO
- current Docker limitation:
- generic ADT activation for BDEF returned
checkExecuted="false"andactivationExecuted="false"even for valid objects - the MCP therefore exposes verified create/read/write/delete support, while BDEF activation remains environment-sensitive
- generic ADT activation for BDEF returned
- create on
- report transaction support is now verified through a helper-class flow around classic SAP function modules:
- create via
RPY_TRANSACTION_INSERT - delete via
RPY_TRANSACTION_DELETE - current verified scope: report transactions
- delete requires an explicit helper package for the temporary helper class
- package registration can be verified through
TADIRwithPGMID = 'R3TR'andOBJECT = 'TRAN'
- create via
- persistent user-parameter support is now verified through helper-class flows around classic SAP function modules:
- read via
SUSR_USER_PARAMETERS_GET - update via
SUSR_USER_PARAMETERS_GET+SUSR_USER_PARAMETERS_PUT - current verified scope:
- SU3-style persistent user parameters
- same-user verification for the MCP runtime user
- explicit non-scope:
- transient
SET PARAMETER ID/GET PARAMETER IDsession memory behavior
- transient
- read via
sap_adt_activate_objectnow normalizes common caller inputs internally:interfaceobjectType + objectName- direct definition URI
.../source/mainURI
sap_adt_syntax_check_objectnow supports repository-safe syntax checking for:classinterfaceprogramddlsdclsddlx
sap_adt_syntax_check_sourcenow supports draft-source syntax checking for the same object families without save or activationsap_adt_lock_objectandsap_adt_unlock_objectnow expose a small advanced control layer for:- explicit source locks
- explicit source unlock with a returned
lockHandle
- verified syntax-check modes:
source_artifactfor class, interface and programrepositoryfor DDLS, DCLS and DDLXdraft_source_artifactfor client-supplied draft content
- verified live syntax-check cases:
- class
ZCL_GEMINI_MCP_T1returned a clean result - DDLS
ZI_GEMINI_CARR_T1returned a real warning about a non-inherited search help assignment - draft class content for
ZCL_GEMINI_MCP_T1returned a real syntax error before save - draft DDLS content for
ZI_GEMINI_CARR_T1returned a real CDS source error before save - explicit lock/unlock for class
ZCL_GEMINI_MCP_T1returned:- real
lockHandle - transport
A4HK900318 - clean
200 OKunlock
- real
- class
sap_adt_activate_dependency_chainnow supports deterministic helper ordering for:- mixed DDLS + class + program stacks
- DDLS + DCL + DDLX stacks
sap_adt_activate_object_setnow supports deterministic activation of a small mixed object list with:stopOnError=truefor first-failure stop behaviorstopOnError=falsefor full per-object result collection
- external Gemini feedback confirmed that this mass-activation flow is the biggest practical ergonomics improvement in
1.3.0 sap_adt_run_programandsap_adt_run_classnow return:- raw output
parsedOutput- table-like summaries for plain-text list output when feasible
- key/value summaries for classrun-style output when feasible
- the MCP now also exposes one local documentation helper:
sap_adt_search_docs- it searches the repository's own verified Markdown documents and examples
- this was added as a lightweight, dependency-free response to ideas seen in other SAP-adjacent MCP servers
- activation diagnostics now fetch the linked activation result and return:
- a short normalized failure category
- a compact summary with the first relevant SAP error
- raw activation result XML
- raw activation run XML
- DDIC metadata objects require stateful session handling for
PUT - transported package creation often needs
corrNralready in the initial create step - tables and structures are written through
.../source/main - domains, data elements and table types are written directly through their DDIC object URIs as XML metadata
- search help support is implemented through a verified ABAP helper-program flow
- ABAP Unit metadata is exposed through
/abapunit/metadata - ABAP Unit execution is exposed through
/abapunit/testruns sap_adt_run_abap_unitnow returns:- raw XML
- parsed result format (
empty,adt-aunit,junit,unknown) - structured test classes
- structured test methods
- failure messages when present
- the local Docker trial now also has one verified live ABAP Unit reference object:
- program
Z_MCP_AUNIT_LV1 - local test class
LTC_REPORT - local test method
BASIC_ASSERTION
- program
- the verified ABAP Unit payload requires:
- root element
aunit:runConfiguration adtcore:objectSets- content type
application/vnd.sap.adt.abapunit.testruns.config.v4+xml - accept type
application/vnd.sap.adt.abapunit.testruns.result.v2+xml
- root element
- DCL and DDLX creation require their specific root namespaces
- transport release works best through:
sortandcompress- followed by
newreleasejobs
- request release must still be verified afterwards with a fresh request read
- default transport handling is fallback-only:
- explicit
transportRequest - valid
.envdefault if still modifiable - automatic lookup if exactly one modifiable workbench request exists
- explicit error if several exist
- explicit
- the
ZCL_FLIGHT_CONSUMERverification case confirmed that this richer activation path now exposes real repository errors, such as:- unknown ABAP type names in generated class source
- partially generated consumer programs that need follow-up content fixes
- create-time collisions are now normalized more clearly for external clients:
already_existslock_or_transport_errorcreate_failed
- the later Gemini verification also confirmed that
sap_adt_run_classis an important secondary verification path when ABAP Unit REST results stay empty in a given SAP environment - dependency-helper verification also confirmed one activation edge case:
activationExecuted="false"without real errors can still be acceptable when the object is not left inactive afterwards
Main Documents
Historical filenames are preserved, but the document contents are now in English.
- IMPLEMENTATION_README.md
- SAP_ADT_MCP_Technical_Design.md
- SAP_ADT_MCP_API_and_Phasing.md
- SAP_ADT_MCP_Risks_and_Security.md
- SAP_ADT_MCP_Verified_Findings.md
- SAP_ADT_MCP_ABAP_Unit_Verification.md
- SAP_ADT_MCP_Dependency_Activation.md
- SAP_ADT_MCP_Mass_Activation.md
- SAP_ADT_MCP_Auto_Verify.md
- SAP_ADT_MCP_Examples.md
- SAP_ADT_MCP_Demo_Package.md
- SAP_ADT_MCP_Reference_Suite.md
- SAP_ADT_MCP_Release_1.4.0.md
- SAP_ADT_MCP_E2E_Test_20260325.md
- SAP_ADT_MCP_Gemini_Verification_20260325.md
- SAP_ADT_MCP_Transport_Handling.md
Reuse In Another SAP Environment
You normally only need to adjust:
SAP_ADT_BASE_URLSAP_ADT_USERNAMESAP_ADT_PASSWORDSAP_ADT_VERIFY_TLSSAP_ADT_MCP_RESPONSE_NO_STRUCTURED_CONTENTif your MCP client needs text-only responsesSAP_ADT_ALLOWED_PACKAGESSAP_ADT_ALLOWED_OBJECT_TYPESSAP_ADT_DEFAULT_TRANSPORT_REQUESTif you intentionally want a fallback requestconfig/object-uri-templates.jsonif your ADT object paths differ
Optional defaults:
SAP_ADT_DEFAULT_MASTER_SYSTEMSAP_ADT_DEFAULT_ABAP_LANGUAGE_VERSIONSAP_ADT_DEFAULT_SOFTWARE_COMPONENTSAP_ADT_DEFAULT_SOFTWARE_COMPONENT_DESCRIPTIONSAP_ADT_REFERENCE_PACKAGESAP_ADT_REFERENCE_PROGRAMSAP_ADT_REFERENCE_CLASSSAP_ADT_REFERENCE_INTERFACESAP_ADT_REFERENCE_FUNCTION_GROUPSAP_ADT_REFERENCE_FUNCTION_MODULE
Gemini CLI
Basic flow:
- Run
npm install - Run
npm run build - Configure
.env - Start the wrapper:
- Register the server in Gemini CLI
- example: gemini-settings.example.json
ABAP Unit verification bundle:
- build:
npm run build
- run:
npm run verify:abapunit
- broader live run:
node dist/verify-abap-unit-live.js --transportRequest=<WORKBENCH_REQUEST>
- reference document:
Reference suite:
- build:
npm run build
- run:
npm run verify:reference
- document:
Scope
This is intentionally a focused SAP ADT MCP, not a generic SAP administration client.
It does not aim to cover:
- GUI automation
- transport import
- broad system administration
- unrestricted mass operations
- BSP repository upload
- Launchpad catalog maintenance
- PFCG role maintenance
Verified Against The Local SAP Container
Verified end-to-end:
- repository read/write
- activation
- package creation
- transport creation
- DDIC creation
- CDS + AMDP + consumer chain
- program execution
- class execution
- transport cleanup and release workflows
- ABAP Unit metadata and raw execution
- backend artifact creation for a working SAPUI5 demo app
