logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-abap-integration-adapter

Provides standardized integration layer for MCP clients to interface with ABAP backend systems utilizing the ABAP Development Tools (ADT) RESTful services. This utility wraps core ADT functionalities for streamlined ABAP artifact lifecycle management, including secure authentication, object manipulation, and transport coordination.

Author

mcp-abap-integration-adapter logo

mario-andreschak

MIT License

Quick Info

GitHub GitHub Stars 61
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

abapapitoolsmanaging abapabap developmentabap systems

EXPERIMENTAL WARNING: This server component is currently under active development and testing. Exercise caution when deploying in production environments.

ABAP Development Tools (ADT) Interface Server via MCP

Smithery Status

Core Purpose

The mcp-abap-integration-adapter functions as a Model Context Protocol (MCP) intermediary, bridging external MCP consumers with internal SAP ABAP environments via the established ABAP Development Tools interfaces. It serves as an abstraction layer over the underlying abap-adt-api, empowering automated management of ABAP codebase assets, change request tracking, and static code analysis within development pipelines.

Capabilities Overview

  • Session Establishment: Securely initiate and validate connections to remote ABAP hosts via the login utility.
  • Artifact Lifecycle Control: Full CRUD operations (Create, Retrieve, Update, Delete) for various ABAP program units and definitions.
  • Change Management: Orchestrate the process of assigning objects to development transports using tools like createTransport and querying request status via transportInfo.
  • Quality Assurance: Execute remote syntax validation checks and retrieve context-aware code completion suggestions.
  • Modular Extension: Designed for straightforward extension, allowing the addition of new ABAP-related functionalities as required.
  • State Cleanup: Management of active connections, including connection invalidation through dropSession and logout.

Deployment Guide

Installation via Smithery

To rapidly provision this MCP Server for use with supported clients (like Claude Desktop) using the Smithery CLI:

npx -y @smithery/cli install @mario-andreschak/mcp-abap-abap-adt-api --client claude

System Prerequisites

  • Runtime Environment: A working installation of Node.js (obtainable from https://nodejs.org/).
  • Connectivity: Valid host URL, authentication credentials, and network accessibility to the target ABAP system.

Setup Procedure

  1. Source Retrieval

    cmd git clone https://github.com/mario-andreschak/mcp-abap-abap-adt-api.git cd mcp-abap-abap-adt-api

  2. Dependency Resolution

    cmd npm install

  3. Configuration of Credentials

    Use the provided .env.example file as a template. Create a .env file in the root directory:

    bash cp .env.example .env

    Populate .env with your connection parameters:

    env SAP_URL=https://your-sap-server.com:44300 SAP_USER=YOUR_SAP_USERNAME SAP_PASSWORD=YOUR_SAP_PASSWORD SAP_CLIENT=YOUR_SAP_CLIENT # Optional, recommended SAP_LANGUAGE=YOUR_SAP_LANGUAGE # Optional, recommended

    Self-Signed Certificate Handling (If Necessary):

    env NODE_TLS_REJECT_UNAUTHORIZED="0"

    SECURITY NOTICE: Ensure the .env file is excluded from source control via .gitignore.

  4. Compilation

    cmd npm run build

  5. Execution

    cmd npm run start (This server can also be integrated directly into IDE contexts like VSCode.)

Operational Interaction

After initialization, the server accepts commands via standard MCP client applications (e.g., Cline). When configuring Cline, specify the following execution profile:

    "mcp-abap-abap-adt-api": {
      "command": "node",
      "args": [
        "PATH_TO_YOUR/mcp-abap-abap-adt-api/dist/index.js"
      ],
      "disabled": true,
      "autoApprove": []
    },

Tool Reference Guide (Custom Instruction Context)

This server exposes capabilities to interact with ABAP objects via ADT endpoints. The primary workflow involves locating an object, obtaining its unique identifier (URI), locking it for modification, updating its content, and finalizing the process.

Key Functions:

  • searchObject: Locates an ABAP entity (e.g., class, function module) using a string query. Returns the object's ADT URI. Example URI: /sap/bc/adt/oo/classes/zcl_model_processor

  • transportInfo: Queries the current transport assignment for an object identified by its URI.

    • Input: objSourceUrl (The object's URI).
    • Output: Transport request number (e.g., TRKORR).
  • lock: Reserves the object for exclusive modification.

    • Input: objectUrl (The object's URI).
    • Output: A required lockHandle token.
  • unLock: Releases the reserved lock on the object.

    • Inputs: objectUrl, lockHandle.
  • setObjectSource: Overwrites the object's implementation code.

    • Input: objectSourceUrl (URI MUST include /source/main suffix), lockHandle, source (New code content), transport (Optional TR number).
  • getObjectSource: Fetches the current source code.

    • Input: objectSourceUrl (URI MUST include /source/main suffix).
  • syntaxCheckCode: Executes a remote syntax check on provided code snippet.

  • activate: Triggers the activation process for the specified object.

Modification Flow Summary: 1. Resolve URI via searchObject. 2. Fetch existing code using getObjectSource (with /source/main). 3. Determine required Transport Request via transportInfo or user input. 4. Acquire lock using lock to get lockHandle. 5. Apply changes via setObjectSource (using /source/main, lockHandle, and Transport ID). 6. Validate integrity with syntaxCheckCode. 7. Persist changes via activate. 8. Release resource using unLock.

Critical Considerations: * URI Suffix: For reading/writing content, append /source/main to the base object URI. * Lock Dependency: setObjectSource and unLock absolutely require a valid, unexpired lockHandle. * Local Files: Local file operations (reading/writing) are purely for local reference/editing buffers and do not directly synchronize with SAP. Use descriptive local filenames (e.g., ObjectName.Type.abap).

Database Interaction Best Practices in ABAP

When developing code that queries the underlying database tables, performance optimization is paramount due to the potential scale of SAP data.

  • Filtering: Always employ restrictive WHERE clauses to minimize dataset transfer.
  • Single Record Retrieval: Prefer SELECT SINGLE when all primary keys are known. If keys are incomplete or you only require one match, use SELECT ... UP TO 1 ROWS to halt processing immediately upon finding the first record.

Schema Inspection Utilities

To prevent runtime errors stemming from incorrect field names or type mismatches during coding, use these tools to inspect ABAP Dictionary definitions:

  • GetTable: Retrieve the full field catalog for a specified database table.
  • GetStructure: Retrieve the definition details for an internal structure or data type (this may require using searchObject first for complex types or includes, potentially falling back to GetStructure if initial lookups fail).

Development Collaboration

To contribute enhancements or fixes:

  1. Fork the primary repository.
  2. Establish a dedicated feature branch (e.g., git checkout -b feature/new-transport-tool).
  3. Commit changes clearly.
  4. Push the branch to your fork.
  5. Submit a Pull Request against the upstream repository.

Licensing

This codebase is released under the terms of the MIT License.


Contextual Note on Business Tools (Relevant to MCP/SAP): Business management tools, which encompass systems like this ABAP integration adapter, aim to enhance organizational efficiency by automating complex operational tasks. Proper selection and adaptation of such tools are key to maximizing their value, ensuring they align with specific business process requirements rather than forcing processes to conform to inflexible software defaults.

See Also

`