mcp-abap-abap-adt-api
Provides tools for managing ABAP objects, handling transport requests, performing code analysis, and more, enabling interaction with SAP systems via ADT APIs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-abap-abap-adt-api Lock the ABAP class ZCL_MY_CLASS for editing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DISCLAIMER: This server is still in experimental status! Use it with caution!
ABAP-ADT-API MCP-Server
Description
The MCP-Server mcp-abap-abap-adt-api is a Model Context Protocol (MCP) server designed to facilitate seamless communication between ABAP systems and MCP clients. It is a wrapper for abap-adt-api and provides a suite of tools and resources for managing ABAP objects, handling transport requests, performing code analysis, and more, enhancing the efficiency and effectiveness of ABAP development workflows.
Related MCP server: MCP-ADT
Features
Authentication: Securely authenticate with ABAP systems using the
logintool.Object Management: Create, read, update, and delete ABAP objects seamlessly.
Transport Handling: Manage transport requests with tools like
createTransportandtransportInfo.Code Analysis: Perform syntax checks and retrieve code completion suggestions.
Extensibility: Easily extend the server with additional tools and resources as needed.
Session Management: Handle session caching and termination using
dropSessionandlogout.
Installation
Installing via Smithery
To install ABAP-ADT-API MCP-Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mario-andreschak/mcp-abap-abap-adt-api --client claudePrerequisites
Node.js: Ensure you have Node.js installed. You can download it from here.
ABAP System Access: Credentials and URL to access the ABAP system.
Steps
Clone the Repository
git clone https://github.com/mario-andreschak/mcp-abap-abap-adt-api.git cd mcp-abap-abap-adt-apiInstall Dependencies
npm installConfigure Environment Variables
An
.env.examplefile is provided in the root directory as a template for the required environment variables. To set up your environment:a. Copy the
.env.examplefile and rename it to.env:cp .env.example .envb. Open the
.envfile and replace the placeholder values with your actual SAP connection details:SAP_URL=https://your-sap-server.com:44300 SAP_USER=YOUR_SAP_USERNAME SAP_PASSWORD=YOUR_SAP_PASSWORD SAP_CLIENT=YOUR_SAP_CLIENT SAP_LANGUAGE=YOUR_SAP_LANGUAGENote: The SAP_CLIENT and SAP_LANGUAGE variables are optional but recommended.
If you're using self-signed certificates, you can also set:
NODE_TLS_REJECT_UNAUTHORIZED="0"IMPORTANT: Never commit your
.envfile to version control. It's already included in.gitignoreto prevent accidental commits.Build the Project
npm run buildRun the Server
npm run start(or alternatively integrate the MCP Server into VSCode)
Usage
Once the server is running, you can interact with it using MCP clients or tools that support the Model Context Protocol (e.g. Cline). In order to integrate the MCP Server with Cline, use the following MCP Configuration:
"mcp-abap-abap-adt-api": {
"command": "node",
"args": [
"PATH_TO_YOUR/mcp-abap-abap-adt-api/dist/index.js"
],
"disabled": true,
"autoApprove": [
]
},
Custom Instruction
Use this Custom Instruction to explain the tool to your model:
## mcp-abap-abap-adt-api Server
This server provides tools for interacting with an SAP system via ADT (ABAP Development Tools) APIs. It allows you to retrieve information about ABAP objects, modify source code, and manage transports.
**Key Tools and Usage:**
* **`searchObject`:** Finds ABAP objects based on a query string (e.g., class name).
* `query`: (string, required) The search term.
* Returns the object's URI. Example: `/sap/bc/adt/oo/classes/zcl_invoice_xml_gen_model`
* **`transportInfo`:** Retrieves transport information for a given object.
* `objSourceUrl`: (string, required) The object's URI (obtained from `searchObject`).
* Returns transport details, including the transport request number (`TRKORR` or `transportInfo.LOCKS.HEADER.TRKORR` in the JSON response).
* **`lock`:** Locks an ABAP object for editing.
* `objectUrl`: (string, required) The object's URI.
* Returns a `lockHandle`, which is required for subsequent modifications.
* **`unLock`:** Unlocks a previously locked ABAP object.
* `objectUrl`: (string, required) The object's URI.
* `lockHandle`: (string, required) The lock handle obtained from the `lock` operation.
* **`setObjectSource`:** Modifies the source code of an ABAP object.
* `objectSourceUrl`: (string, required) The object's URI *with the suffix `/source/main`*. Example: `/sap/bc/adt/oo/classes/zcl_invoice_xml_gen_model/source/main`
* `lockHandle`: (string, required) The lock handle obtained from the `lock` operation.
* `source`: (string, required) The complete, modified ABAP source code.
* `transport`: (string, optional) The transport request number.
* **`syntaxCheckCode`:** Performs a syntax check on a given ABAP source code.
* `code`: (string, required) The ABAP source code to check.
* `url`: (string, optional) The URL of the object.
* `mainUrl`: (string, optional) The main URL.
* `mainProgram`: (string, optional) The main program.
* `version`: (string, optional) The version.
* Returns syntax check results, including any errors.
* **`activate`:** Activates an ABAP object. (See notes below on activation/unlocking.)
* `object`: The object to be activated.
* **`getObjectSource`:** Retrieves the source code of an ABAP object.
* `objectSourceUrl`: (string, required) The object's URI *with the suffix `/source/main`*.
**Workflow for Modifying ABAP Code:**
1. **Find the object URI:** Use `searchObject`.
2. **Read the original source code:** Use `getObjectSource` (with the `/source/main` suffix).
3. **Clone and Modify the source code locally:** (e.g., `write_to_file` for creating a local copy, and using `read_file`, `replace_in_file` for modifying this local copy).
4. **Get transport information:** Use `transportInfo`.
5. **Lock the object:** Use `lock`.
6. **Set the modified source code:** Use `setObjectSource` (with the `/source/main` suffix).
7. **Perform a syntax check:** Use `syntaxCheckCode`.
8. **Activate** the object, Use `activate`..
9. **unLock the object:** Use `unLock`.
**Important Notes:**
* **File Handling:** SAP is completly de-coupled from the local file system. Reading source code will only return the code as tool result - it has no effect on file. Files are not synchronized with SAP but merely a local copy for our reference. FYI: It's not strictly necessary for you to create local copies of source codes, as they have no effect on SAP, but it helps us track changes.
* **File Handling:** The local filenames you will use will not contain any paths, but only a filename! It's preferable to use a pattern like "[ObjectName].[ObjectType].abap". (e.g., SAPMV45A.prog.abap for a ABAP Program SAPMV45A, CL_IXML.clas.abap for a Class CL_IXML)
* **URL Suffix:** Remember to add `/source/main` to the object URI when using `setObjectSource` and `getObjectSource`.
* **Transport Request:** Obtain the transport request number (e.g., from `transportInfo` or from the user) and include it in relevant operations.
* **Lock Handle:** The `lockHandle` obtained from the `lock` operation is crucial for `setObjectSource` and `unLock`. Ensure you are using a valid `lockHandle`. If a lock fails, you may need to re-acquire the lock. Locks can expire or be released by other users.
* **Activation/Unlocking Order:** The exact order of `activate` and `unLock` operations might need clarification. Refer to the tool descriptions or ask the user. It appears `activate` can be used without unlocking first.
* **Error Handling:** The tools return JSON responses. Check for error messages within these responses.
## Efficient Database Access
SAP systems contain vast amounts of data. It's crucial to write ABAP code that accesses the database efficiently to minimize performance impact and network traffic. Avoid selecting entire tables or using broad `WHERE` clauses when you only need specific data.
* **Use `WHERE` clauses:** Always use `WHERE` clauses in your `SELECT` statements to filter the data retrieved from the database. Select only the specific rows you need.
* **`UP TO 1 ROWS`:** If you only need a single record, use the `SELECT SINGLE` statement, if you can guarantee that you can provide ALL the key fields for the `SELECT SINGLE` statement. Otherwise, use the `SELECT` statement with the `UP TO 1 ROWS` addition. This tells the database to stop searching after finding the first matching record, improving performance. Example:
```abap
SELECT vgbel FROM vbrp WHERE vbeln = @me->lv_vbeln INTO @DATA(lv_vgbel) UP TO 1 ROWS.
EXIT. " Exit any loop after this.
ENDSELECT.
```
## Checking Table and Structure Definitions
When working with ABAP objects, you may encounter errors related to unknown field names or incorrect table usage. You can use the following tools to inspect table and structure definitions:
* **`GetTable`:** Use this tool to retrieve the structure of an ABAP Dictionary table, including its field names and data types. This is helpful for verifying the correct fields to use in your `SELECT` statements.
* If you need to inspect an include structure, you may need to use `searchObject` to find the include and then use `GetTypeInfo` or `GetStructure`. You may get a 404 error and try again with `GetStructure`
* **`GetStructure`:** Use this tool to retrieve the structure of an ABAP Dictionary structure, including its field names and data types. This is helpful for verifying the correct fields to use in your `SELECT` statements.
* If you need to inspect an include structure, you may need to use `searchObject` to find the include and then use `GetTypeInfo` or `GetStructure`.
Contributing
Contributions are welcome! Please follow these steps to contribute:
Fork the Repository
Create a New Branch
git checkout -b feature/your-feature-nameCommit Your Changes
git commit -m "Add some feature"Push to the Branch
git push origin feature/your-feature-nameOpen a Pull Request
License
This project is licensed under the MIT License.
Available Tools
127 toolsabapDocumentationC
Retrieves ABAP documentation.
Inputs: body (required), line (required), column (required), objectUri (required), +1 more.
activateByNameC
Activate an ABAP object using name and URL
Inputs: objectUrl (required), objectName (required), mainInclude, preauditRequested.
activateObjectsB
Activate ABAP objects using object references
Inputs: objects (required), preauditRequested.
adtCompatibiliyGraphC
Retrieves the ADT compatibility graph.
Inputs: no named parameters.
adtCoreDiscoveryC
Performs ADT core discovery.
Inputs: no named parameters.
adtDiscoveryD
Performs ADT discovery.
Inputs: no named parameters.
annotationDefinitionsB
Retrieves annotation definitions.
Inputs: no named parameters.
atcChangeContactC
Changes the contact for an ATC finding.
Inputs: userId (required), itemUri (required).
atcCheckVariantC
Retrieves information about an ATC check variant.
Inputs: variant (required).
atcContactUriB
Retrieves the contact URI for an ATC finding.
Inputs: findingUri (required).
atcCustomizingB
Retrieves ATC customizing information.
Inputs: no named parameters.
atcExemptProposalB
Retrieves an ATC exemption proposal.
Inputs: markerId (required).
atcRequestExemptionC
Requests an ATC exemption.
Inputs: proposal (required).
atcUsersB
Retrieves a list of ATC users.
Inputs: no named parameters.
atcWorklistsC
Retrieves ATC worklists.
Inputs: runResultId (required), timestamp, usedObjectSet, includeExempted.
bindingDetailsC
Retrieves details of a service binding.
Inputs: binding (required), index.
checkRepoD
Checks a Git repository.
Inputs: repo (required), user, password.
classComponentsC
List class components
Inputs: url (required).
classIncludesC
Get class includes structure
Inputs: clas (required).
codeCompletionC
Get code completion suggestions
Inputs: line (required), column (required), source (required), sourceUrl (required).
codeCompletionElementC
Retrieves code completion element information.
Inputs: line (required), column (required), source (required), sourceUrl (required).
codeCompletionFullC
Performs full code completion.
Inputs: line (required), column (required), source (required), sourceUrl (required), +1 more.
collectionFeatureDetailsB
Retrieves details for a given collection feature.
Inputs: url (required).
createAtcRunD
Creates an ATC run.
Inputs: mainUrl (required), variant (required), maxResults.
createObjectC
Create a new ABAP object
Inputs: name (required), objtype (required), parentName (required), parentPath (required), +3 more.
createTestIncludeC
Creates a test include for a class.
Inputs: clas (required), lockHandle (required), transport.
createTransportB
Create a new transport request
Inputs: DEVCLASS (required), REQUEST_TEXT (required), objSourceUrl (required), transportLayer.
createTransportsConfigB
Creates transport configurations.
Inputs: no named parameters.
ddicElementC
Retrieves information about a DDIC element.
Inputs: path (required), getExtensionViews, getSecondaryObjects, getTargetForAssociation.
ddicRepositoryAccessD
Accesses the DDIC repository.
Inputs: path (required).
debuggerAttachC
Attaches the debugger.
Inputs: user (required), debuggeeId (required), debuggingMode (required), dynproDebugging.
debuggerChildVariablesB
Retrieves child variables of a debugger variable.
Inputs: parent.
debuggerDeleteBreakpointsC
Deletes breakpoints.
Inputs: ideId (required), breakpoint (required), terminalId (required), requestUser (required), +2 more.
debuggerDeleteListenerC
Stops a debug listener.
Inputs: user (required), ideId (required), terminalId (required), debuggingMode (required).
debuggerGoToStackB
Navigates to a specific stack entry in the debugger.
Inputs: urlOrPosition (required).
debuggerListenC
Listens for debugging events.
Inputs: user (required), ideId (required), terminalId (required), debuggingMode (required), +2 more.
debuggerListenersC
Retrieves a list of debugger listeners.
Inputs: user (required), ideId (required), terminalId (required), debuggingMode (required), +1 more.
debuggerSaveSettingsC
Saves debugger settings.
Inputs: settings (required).
debuggerSetBreakpointsC
Sets breakpoints.
Inputs: user (required), ideId (required), clientId (required), terminalId (required), +6 more.
debuggerSetVariableValueC
Sets the value of a debugger variable.
Inputs: value (required), variableName (required).
debuggerStackTraceC
Retrieves the debugger stack trace.
Inputs: semanticURIs.
debuggerStepC
Performs a debugger step.
Inputs: steptype (required), url.
debuggerVariablesC
Retrieves debugger variables.
Inputs: parents (required).
deleteObjectB
Deletes an ABAP object from the system
Inputs: objectUrl (required), lockHandle (required), transport.
dropSessionA
Clear local session cache
Inputs: no named parameters.
dumpsC
Retrieves a list of dumps.
Inputs: query.
extractMethodEvaluateC
Evaluates an extract method refactoring.
Inputs: uri (required), range (required).
extractMethodExecuteC
Executes an extract method refactoring.
Inputs: refactoring (required).
extractMethodPreviewC
Previews an extract method refactoring.
Inputs: proposal (required).
featureDetailsB
Retrieves details for a given feature.
Inputs: title (required).
feedsB
Retrieves a list of feeds.
Inputs: no named parameters.
findCollectionByUrlA
Finds a collection by its URL.
Inputs: url (required).
findDefinitionC
Find symbol definition
Inputs: url (required), line (required), endCol (required), source (required), +3 more.
findObjectPathC
Find path for an object
Inputs: objectUrl (required).
fixEditsD
Applies fix edits.
Inputs: source (required), proposal (required).
fixProposalsD
Retrieves fix proposals.
Inputs: url (required), line (required), column (required), source (required).
fragmentMappingsC
Retrieves fragment mappings.
Inputs: url (required), name (required), type (required).
getObjectSourceC
Retrieves source code for ABAP objects
Inputs: objectSourceUrl (required), options.
getTransportConfigurationB
Retrieves a specific transport configuration.
Inputs: url (required).
gitCreateRepoC
Creates a new Git repository.
Inputs: repourl (required), packageName (required), user, branch, +2 more.
gitExternalRepoInfoC
Retrieves information about an external Git repository.
Inputs: repourl (required), user, password.
gitPullRepoC
Pulls changes from a Git repository.
Inputs: repoId (required), user, branch, password, +1 more.
gitReposB
Retrieves a list of Git repositories.
Inputs: no named parameters.
gitUnlinkRepoB
Unlinks a Git repository.
Inputs: repoId (required).
hasTransportConfigB
Check if transport configuration exists
Inputs: no named parameters.
healthcheckA
Check server health and connectivity
Inputs: no named parameters.
inactiveObjectsB
Get list of inactive objects
Inputs: no named parameters.
isProposalMessageB
Checks if a given object is a proposal message.
Inputs: proposal (required).
loadTypesC
Loads object types.
Inputs: no named parameters.
lockC
Lock an object
Inputs: objectUrl (required), accessMode.
loginB
Authenticate with ABAP system
Inputs: no named parameters.
logoutB
Terminate ABAP session
Inputs: no named parameters.
mainProgramsA
Retrieves the main programs for a given include.
Inputs: includeUrl (required).
nodeContentsC
Retrieves the contents of a node in the ABAP repository tree.
Inputs: parent_type (required), user_name, parent_name, parentnodes, +2 more.
objectRegistrationInfoC
Get registration information for an ABAP object
Inputs: objectUrl (required).
objectStructureC
Get object structure details
Inputs: objectUrl (required), version.
objectTypesD
Retrieves object types.
Inputs: no named parameters.
packageSearchHelpD
Performs a package search help.
Inputs: type (required), name.
prettyPrinterB
Formats ABAP code using the pretty printer.
Inputs: source (required).
prettyPrinterSettingA
Retrieves the pretty printer settings.
Inputs: no named parameters.
publishServiceBindingC
Publishes a service binding.
Inputs: name (required), version (required).
pushRepoB
Pushes changes to a Git repository.
Inputs: repo (required), staging (required), user, password.
reentranceTicketC
Retrieves a reentrance ticket.
Inputs: no named parameters.
remoteRepoInfoC
Retrieves information about a remote Git repository.
Inputs: repo (required), user, password.
renameEvaluateC
Evaluates a rename refactoring.
Inputs: uri (required), line (required), endColumn (required), startColumn (required).
renameExecuteC
Executes a rename refactoring.
Inputs: refactoring (required).
renamePreviewC
Previews a rename refactoring.
Inputs: renameRefactoring (required), transport.
revisionsC
Retrieves revisions for an object.
Inputs: objectUrl (required), clsInclude.
runClassD
Runs a class.
Inputs: className (required).
runQueryC
Runs a SQL query on the target system.
Inputs: sqlQuery (required), decode, rowNumber.
searchObjectC
Search for objects
Inputs: query (required), max, objType.
setObjectSourceC
Sets source code for ABAP objects
Inputs: source (required), lockHandle (required), objectSourceUrl (required), transport.
setPrettyPrinterSettingC
Sets the pretty printer settings.
Inputs: style (required), indent (required).
setTransportsConfigD
Sets transport configurations.
Inputs: uri (required), etag (required), config (required).
stageRepoC
Stages changes in a Git repository.
Inputs: repo (required), user, password.
switchRepoBranchB
Switches the branch of a Git repository.
Inputs: repo (required), branch (required), user, create, +1 more.
syntaxCheckCdsUrlC
Perform ABAP syntax check with CDS URL
Inputs: cdsUrl (required).
syntaxCheckCodeC
Perform ABAP syntax check with source code
Inputs: code (required), url, mainUrl, version, +1 more.
syntaxCheckTypesB
Retrieves syntax check types.
Inputs: no named parameters.
systemUsersA
Retrieves a list of system users.
Inputs: no named parameters.
tableContentsB
Retrieves the contents of an ABAP table.
Inputs: ddicEntityName (required), decode, sqlQuery, rowNumber.
tracesCreateConfigurationC
Creates a trace configuration.
Inputs: config (required).
tracesDbAccessC
Retrieves database access information for a trace.
Inputs: id (required), withSystemEvents.
tracesDeleteC
Deletes a trace.
Inputs: id (required).
tracesDeleteConfigurationC
Deletes a trace configuration.
Inputs: id (required).
tracesHitListC
Retrieves the hit list for a trace.
Inputs: id (required), withSystemEvents.
tracesListC
Retrieves a list of traces.
Inputs: user.
tracesListRequestsC
Retrieves a list of trace requests.
Inputs: user.
tracesSetParametersC
Sets trace parameters.
Inputs: parameters (required).
tracesStatementsC
Retrieves statements for a trace.
Inputs: id (required), options.
transportAddUserB
Adds a user to a transport.
Inputs: user (required), transportNumber (required).
transportConfigurationsC
Retrieves transport configurations.
Inputs: no named parameters.
transportDeleteC
Deletes a transport.
Inputs: transportNumber (required).
transportInfoC
Get transport information for an object source
Inputs: objSourceUrl (required), devClass, operation.
transportReferenceC
Retrieves a transport reference.
Inputs: pgmid (required), obj_name (required), obj_wbtype (required), tr_number.
transportReleaseC
Releases a transport.
Inputs: transportNumber (required), IgnoreATC, ignoreLocks.
transportsByConfigB
Retrieves transports by configuration.
Inputs: configUri (required), targets.
transportSetOwnerB
Sets the owner of a transport.
Inputs: targetuser (required), transportNumber (required).
unitTestEvaluationC
Evaluates unit test results.
Inputs: clas (required), flags.
unitTestOccurrenceMarkersC
Retrieves unit test occurrence markers.
Inputs: url (required), source (required).
unitTestRunC
Runs unit tests.
Inputs: url (required), flags.
unLockC
Unlock an object
Inputs: objectUrl (required), lockHandle (required).
unPublishServiceBindingC
Unpublishes a service binding.
Inputs: name (required), version (required).
usageReferencesC
Find symbol references
Inputs: url (required), line, column.
usageReferenceSnippetsC
Retrieves usage reference snippets.
Inputs: references (required).
userTransportsC
Retrieves transports for a user.
Inputs: user (required), targets.
validateNewObjectC
Validate parameters for a new ABAP object
Inputs: options (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 127 tools
With 127 tools covering overlapping domains like transport, debugging, ATC, and traces, many tools have unclear boundaries (e.g., hasTransportConfig vs getTransportConfiguration, codeCompletion vs codeCompletionFull, loadTypes vs objectTypes). The sheer volume makes it difficult for an agent to reliably select the correct tool.
The naming uses a mix of verb-first (createTransport, getObjectSource, runClass), noun-first (transportInfo, objectStructure, debuggerVariables), and inconsistent prefixes (set, create, has, get, delete). There is no uniform pattern, and 'unLock' vs 'unPublishServiceBinding' and the typo 'adtCompatibiliyGraph' add to inconsistency.
127 tools is far beyond the typical MCP server scope and falls into the extreme category. Even for a broad ABAP ADT API, exposing every operation without grouping or filtering creates an overwhelming surface.
The server covers a wide range of ABAP development workflows including object CRUD, transports, syntax checking, debugging, refactoring, ATC, tracing, and Git operations. Minor gaps exist, such as missing delete operations for transport configs or explicit object assignment to transports, but most primary workflows are supported.
Maintenance
Related MCP Connectors
List, read, edit, and deploy your GenMB AI-generated apps from any MCP client.
Search 16,000+ API operations and 95 built tools by need, then call any of them by name
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with SAP ABAP systems through ABAP Development Tools (ADT), providing access to repository objects, source code, where-used analysis, and SQL queries with support for both on-premise and BTP systems.3-
- AlicenseCqualityDmaintenanceFacilitates interaction with SAP ABAP systems via ADT APIs, enabling object management, transport handling, and code analysis.100203 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to read, write, activate, and transport ABAP code in SAP systems via ABAP ADT REST API, without needing SAP GUI.24284 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform ABAP Development Tools operations on SAP ERP (ECC and S/4HANA) systems, including source code editing, object activation, syntax checks, and ABAP unit tests.14 npmMIT