ABAP-ADT-API MCP-Server
Enables interaction with SAP systems through ABAP Development Tools (ADT) APIs to manage ABAP objects, modify source code, handle transport requests, perform syntax checks, and inspect database table structures.
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., "@ABAP-ADT-API MCP-Server find the class ZCL_SALES_ORDER and check its syntax"
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: ABAP-ADT-API MCP-Server
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
118 toolsabapDocumentationC
Retrieves ABAP documentation.
Inputs: objectUri (required), body (required), line (required), column (required), +1 more.
activateByNameC
Activate an ABAP object using name and URL
Inputs: objectName (required), objectUrl (required), mainInclude, preauditRequested.
activateObjectsB
Activate ABAP objects using object references
Inputs: objects (required), preauditRequested.
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: itemUri (required), userId (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: sourceUrl (required), source (required), line (required), column (required).
codeCompletionElementC
Retrieves code completion element information.
Inputs: sourceUrl (required), source (required), line (required), column (required).
codeCompletionFullC
Performs full code completion.
Inputs: sourceUrl (required), source (required), line (required), column (required), +1 more.
collectionFeatureDetailsB
Retrieves details for a given collection feature.
Inputs: url (required).
createAtcRunD
Creates an ATC run.
Inputs: variant (required), mainUrl (required), maxResults.
createTestIncludeC
Create test include for class
Inputs: clas (required), lockHandle (required), transport.
createTransportB
Create a new transport request
Inputs: objSourceUrl (required), REQUEST_TEXT (required), DEVCLASS (required), transportLayer.
createTransportsConfigB
Creates transport configurations.
Inputs: no named parameters.
ddicElementC
Retrieves information about a DDIC element.
Inputs: path (required), getTargetForAssociation, getExtensionViews, getSecondaryObjects.
ddicRepositoryAccessD
Accesses the DDIC repository.
Inputs: path (required).
debuggerAttachC
Attaches the debugger.
Inputs: debuggingMode (required), debuggeeId (required), user (required), dynproDebugging.
debuggerChildVariablesB
Retrieves child variables of a debugger variable.
Inputs: parent.
debuggerDeleteBreakpointsC
Deletes breakpoints.
Inputs: breakpoint (required), debuggingMode (required), terminalId (required), ideId (required), +2 more.
debuggerDeleteListenerC
Stops a debug listener.
Inputs: debuggingMode (required), terminalId (required), ideId (required), user (required).
debuggerGoToStackB
Navigates to a specific stack entry in the debugger.
Inputs: urlOrPosition (required).
debuggerListenC
Listens for debugging events.
Inputs: debuggingMode (required), terminalId (required), ideId (required), user (required), +2 more.
debuggerListenersC
Retrieves a list of debugger listeners.
Inputs: debuggingMode (required), terminalId (required), ideId (required), user (required), +1 more.
debuggerSaveSettingsC
Saves debugger settings.
Inputs: settings (required).
debuggerSetBreakpointsC
Sets breakpoints.
Inputs: debuggingMode (required), terminalId (required), ideId (required), clientId (required), +6 more.
debuggerSetVariableValueC
Sets the value of a debugger variable.
Inputs: variableName (required), value (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), source (required), line (required), startCol (required), +3 more.
findObjectPathC
Find path for an object
Inputs: objectUrl (required).
fixEditsD
Applies fix edits.
Inputs: proposal (required), source (required).
fixProposalsD
Retrieves fix proposals.
Inputs: url (required), source (required), line (required), column (required).
fragmentMappingsC
Retrieves fragment mappings.
Inputs: url (required), type (required), name (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: packageName (required), repourl (required), branch, transport, +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), branch, transport, user, +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.
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), parent_name, user_name, parent_tech_name, +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).
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), startColumn (required), endColumn (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), rowNumber, decode.
searchObjectC
Search for objects
Inputs: query (required), objType, max.
setObjectSourceC
Sets source code for ABAP objects
Inputs: objectSourceUrl (required), source (required), lockHandle (required), transport.
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), create, user, +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, mainProgram, +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), rowNumber, decode, sqlQuery.
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: transportNumber (required), user (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_wbtype (required), obj_name (required), tr_number.
transportReleaseC
Releases a transport.
Inputs: transportNumber (required), ignoreLocks, IgnoreATC.
transportsByConfigB
Retrieves transports by configuration.
Inputs: configUri (required), targets.
transportSetOwnerB
Sets the owner of a transport.
Inputs: transportNumber (required), targetuser (required).
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 118 tools
Many tools have overlapping or unclear boundaries, such as the multiple transport configuration tools (transportConfigurations, getTransportConfiguration, setTransportsConfig, createTransportsConfig, hasTransportConfig) and the numerous debugger tools with similar names (debuggerListeners, debuggerListen, debuggerAttach, debuggerVariables, debuggerChildVariables). The mix of generic operations like loadTypes, objectTypes, and collectionFeatureDetails also creates ambiguity.
Naming is inconsistent: some tools use camelCase (adtDiscovery, loadTypes, syntaxCheckCode), some use snake_case (unLock, setObjectSource), and some use mixed patterns (createTransportsConfig vs transportConfigurations). Verb placement varies (transportDelete vs deleteObject, gitCreateRepo vs createTransport), and there is no consistent verb_noun or noun_verb convention.
118 tools is far beyond the typical well-scoped server range. The server attempts to cover ADT discovery, transports, debugging, Git, ATC, traces, refactoring, and more, resulting in a sprawling surface that is difficult to navigate. This extreme count suggests the server is trying to expose an entire API rather than a curated tool set.
The tool set covers many ABAP development lifecycle areas: source retrieval/editing, activation, syntax checks, transports, debugging, ATC, Git, and traces. However, there are notable gaps and inconsistencies, such as no explicit tool for creating or deleting classes/programs (only validateNewObject and deleteObject), and the transport lifecycle is fragmented across many configuration tools. The breadth is high but the depth per area is uneven.
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP server for Product Management
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseCqualityCmaintenanceA Model Context Protocol server that facilitates communication between ABAP systems and MCP clients, providing tools for managing ABAP objects, handling transport requests, and performing code analysis to enhance ABAP development workflows.100210 npm215MIT
- AlicenseCqualityNot gradedmaintenanceAn MCP server that facilitates seamless interaction with SAP ABAP systems to manage development objects, transport requests, and source code. It provides a comprehensive suite of tools for performing syntax checks, object searches, and code modifications via the ADT API.100-
- AlicenseCqualityNot gradedmaintenanceA Model Context Protocol server that facilitates seamless communication between ABAP systems and MCP clients for managing ABAP objects, transport requests, and code analysis. It acts as a wrapper for the ABAP ADT API to enhance the efficiency of ABAP development workflows.100-
- FlicenseBqualityNot gradedmaintenanceAn MCP server that enables AI assistants to interact with SAP systems via the ABAP Development Tools (ADT) REST API. It allows users to read ABAP source code, inspect DDIC objects, and execute SQL queries directly.66-