ABAP ADT API MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "SAP_URL=${SAP_URL}" -e "SAP_USER=${SAP_USER}" -e "SAP_PASSWORD=${SAP_PASSWORD}" abap-adt-api -- npx -y @smithery/cli install @mario-andreschak/mcp-abap-abap-adt-api --client claude
Required:SAP_URLSAP_USERSAP_PASSWORD+ 2 optional
README.md

Seamless communication between ABAP systems and MCP clients via ADT API

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.

Features

  • Authentication: Securely authenticate with ABAP systems using the login tool.
  • Object Management: Create, read, update, and delete ABAP objects seamlessly.
  • Transport Handling: Manage transport requests with tools like createTransport and transportInfo.
  • 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 dropSession and logout.

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 claude

Prerequisites

  • 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

  1. Clone the Repository

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

    npm install
    
  3. Configure Environment Variables

    An .env.example file is provided in the root directory as a template for the required environment variables. To set up your environment:

    a. Copy the .env.example file and rename it to .env:

    cp .env.example .env
    

    b. Open the .env file 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_LANGUAGE
    

    Note: 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 .env file to version control. It's already included in .gitignore to prevent accidental commits.

  4. Build the Project

    npm run build
    
  5. Run 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.
    *

Tools (4)

searchObjectFinds ABAP objects based on a query string.
transportInfoRetrieves transport information for a given object.
lockLocks an ABAP object for editing.
unLockUnlocks a previously locked ABAP object.

Environment Variables

SAP_URLrequiredThe URL of the SAP server
SAP_USERrequiredSAP username
SAP_PASSWORDrequiredSAP password
SAP_CLIENTSAP client ID
SAP_LANGUAGESAP language code

Configuration

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

Try it

Search for the ABAP class zcl_invoice_xml_gen_model and return its URI.
Get the transport information for the object located at /sap/bc/adt/oo/classes/zcl_invoice_xml_gen_model.
Lock the ABAP object /sap/bc/adt/oo/classes/zcl_invoice_xml_gen_model for editing.
Unlock the ABAP object /sap/bc/adt/oo/classes/zcl_invoice_xml_gen_model using the handle provided.

Frequently Asked Questions

What are the key features of ABAP ADT API?

Secure authentication with ABAP systems. Create, read, update, and delete ABAP objects. Manage transport requests and check object locks. Perform syntax checks and retrieve code completion suggestions. Session management including caching and termination.

What can I use ABAP ADT API for?

Automating ABAP object discovery and documentation. Streamlining transport request management during development cycles. Integrating SAP ABAP development workflows directly into AI-powered IDEs.

How do I install ABAP ADT API?

Install ABAP ADT API by running: npx -y @smithery/cli install @mario-andreschak/mcp-abap-abap-adt-api --client claude

What MCP clients work with ABAP ADT API?

ABAP ADT API works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep ABAP ADT API docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare