mcp-abap-datainterface
Facilitates secure communication with SAP ABAP environments leveraging the Model Context Protocol (MCP) to extract critical development assets, including source code listings and underlying database schema definitions. It functions as an essential intermediary layer connecting external tooling ecosystems with proprietary ABAP development landscapes for streamlined data retrieval.
Author

mario-andreschak
Quick Info
Actions
Tags
mcp-abap-datainterface: Unified Access to ABAP Development Artifacts via MCP
This repository furnishes a dedicated server implementation engineered to interface with SAP ABAP systems utilizing the Model Context Protocol (MCP). Visualize this component as a conduit enabling specialized software clients, such as the Cline VS Code extension, to query and pull configuration specifics—such as program logic, data dictionary structures, and more—directly from your ABAP landscape. It effectively remote-activates your ABAP development workbench capabilities!
This documentation sequence is structured for newcomers, proceeding via systematic stages. We shall detail:
- Essential Preconditions: Required system prerequisites.
- Deployment & Configuration: Steps for initial setup.
- Server Activation: Methods for launching the service.
- Cline Integration Blueprint: Linking this service with the Cline IDE extension.
- Diagnostic Procedures: Addressing typical operational hurdles.
- Exposed Capabilities: A catalog of accessible operational commands.
1. Essential Preconditions
Prior to initiating operations, several assets must be provisioned:
-
Target SAP ABAP Instance: This service requires connectivity to an active ABAP instance. Prerequisites include:
- The system endpoint URI (e.g.,
https://my-sap-system.com:8000). - Valid security credentials (user ID and secret).
- The designated SAP client identifier (e.g.,
100). - Verification that the ABAP system permits ADT (ABAP Development Tools) connectivity. Typically, this mandates activation of specific services via transaction code
SICF. Consult your basis administration team. Specifically, the subsequent paths must be active:/sap/bc/adt
- For the
GetTableContentsfunction, deployment of a custom endpoint, specifically/z_mcp_abap_adt/z_tablecontent, is mandatory. Refer to this external guide for implementation details: Link to SAP Community Article
- The system endpoint URI (e.g.,
-
Version Control System (Git): Required for source code acquisition. You have two alternatives:
- Command-Line Git: The standard terminal utility. Obtain Git Here. Select the appropriate build for your host OS (Windows, macOS, or Linux) and follow setup instructions.
- GitHub Desktop: A graphical wrapper for Git operations, often preferred by novices. Obtain GitHub Desktop Here. Install and follow the procedural steps.
-
Node.js Runtime and npm Utility: Node.js provides the necessary JavaScript execution environment outside web browsers. npm (Node Package Manager) manages project dependencies.
- Acquire Node.js. It is strongly recommended to select the LTS (Long Term Support) distribution for enhanced stability. Proceed with the installation routine for your OS, ensuring npm is included (standard default).
- Validation Check: Post-installation, open a command-line interface (Terminal/CMD) and execute:
bash node -v npm -vSuccessful output should display version identifiers for both components. Any failure suggests an installation issue or incorrect PATH configuration (consult Diagnostics).
2. Deployment & Configuration
Let's prepare the project repository and set up the environment:
Installation via Smithery
To automate the deployment of the MCP ABAP Development Tools Server for Cline using Smithery:
npx -y @smithery/cli install @mario-andreschak/mcp-abap-adt --client cline
Manual Deployment
-
Clone the Source Repository:
- Using Git (CLI Method):
- Initiate a terminal session.
- Navigate to your desired storage location (e.g., Desktop):
bash cd Desktop - Duplicate the repository:
bash git clone https://github.com/mario-andreschak/mcp-abap-adt - Enter the newly created project structure:
bash cd mcp-abap-adt
- Using GitHub Desktop:
- Launch GitHub Desktop.
- Select "File" -> "Clone Repository...".
- In the URL tab, paste the repository address.
- Define the local file system path for storage.
- Execute the "Clone" action.
- Using Git (CLI Method):
-
Dependency Acquisition: This step fetches all required external code libraries.
bash npm installThis phase may require several moments. -
Code Compilation: This process translates the source code into an operational binary format.
bash npm run build -
Establish Configuration File (
.env): This file secures sensitive access parameters, such as SAP credentials. Security is paramount; this file must remain protected.- In the repository's root directory, generate a new file designated
.env(no suffix). - Open
.envin a suitable text editor (e.g., VS Code, Notepad). - Insert the configuration lines below, substituting placeholders with your specific SAP instance details:
Note: If your secret key contains the '#' symbol, ensure the entire value is delimited by quotation marks.
SAP_URL=https://your-sap-system.com:8000 # System URI SAP_USERNAME=your_username # User identifier SAP_PASSWORD=your_password # Security secret SAP_CLIENT=100 # Client identifierCritical Warning: Under no circumstances should the.envfile be shared publicly or committed to version control repositories!
- In the repository's root directory, generate a new file designated
3. Server Activation
While typically intended for integration with an MCP client like Cline, manual server execution is possible via two primary modes:
- Isolated Execution: Runs the server directly, streaming operational logs to the console. The server will initialize and wait passively for incoming client connections, which may render it functionally inert unless connected to a client.
- Development/Inspection Mode: Activates the server alongside the MCP Inspector interface. You can then access the provided URL in a web browser to interactively test operations.
3.1 Isolated Execution
To launch the server in its standard execution configuration, utilize this command in the terminal (from the root directory):
npm run start
Console output should confirm successful server initialization and its listening state for MCP connections. Terminate the process using Ctrl+C.
3.2 Development/Inspection Mode (With Inspector)
This configuration is highly beneficial for debugging and validation routines.
- Initiate Server in Debug Mode:
bash npm run devThis will yield a notification similar to:🔍 MCP Inspector is up and running at http://localhost:5173 🚀. This URL is your entry point for the browser-based MCP inspector.
4. Integrating with Cline
Cline is a specialized VS Code extension that leverages MCP endpoints to augment language functionality. The connection procedure is as follows:
-
Acquire Cline: If absent, install the "Cline" extension within VS Code.
-
Access Cline Configuration Panel:
- Navigate to VS Code settings (Menu: File -> Preferences -> Settings, or use shortcut Ctrl+,).
- Use the search bar to locate "Cline MCP Settings".
- Select the option to "Edit in settings.json". This opens the
cline_mcp_settings.jsonfile. (Typical Windows path structure:C:\Users\<username>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json)
-
Incorporate Server Definition: Add a new object entry to the existing
serversarray within thecline_mcp_settings.jsonstructure. Example payload:json { "mcpServers": { "mcp-abap-adt": { "command": "node", "args": [ "C:/PATH_TO/mcp-abap-adt/dist/index.js" ], "disabled": true, "autoApprove": [] } // ... existing configurations ... } } -
Verify Connectivity:
- Cline should attempt to establish a link immediately. You will observe the server appearing in the "MCP Servers" view within the Cline extension interface (check the specialized controls at the top of the extension pane).
- Issue a request to Cline for retrieving program source code; the process output should explicitly reference the MCP Server and indicate utilization of the associated tooling.
5. Diagnostic Procedures
node -vornpm -vreturns an error:- Confirm successful Node.js installation. Reinstallation may be necessary.
- Verify that the Node.js executable directory path is correctly registered within your operating system's PATH environment variable. (Windows users: Modify System Properties -> Environment Variables).
npm installexecution fails:- Ensure active network access.
- Attempt removal of the
node_modulesdirectory followed by a re-run ofnpm install. - If operating behind a network proxy, proxy configurations must be manually supplied to npm settings.
- Cline fails to establish a session:
- Meticulously re-check the file path specified within
cline_mcp_settings.json. On Windows, ensure absolute paths are used and backslashes are escaped (\\). - Confirm the server process is active (verify using
npm run start). - Restart the VS Code application.
- Alternative Deep Test Flow:
- In your system's file explorer, navigate to the
mcp-abap-adtroot folder. Perform a Shift+Right-Click and select "Open PowerShell Window Here". - Execute:
npm install - Execute:
npm run build - Execute the inspector launch command:
npx @modelcontextprotocol/inspector node dist/index.js - Access the displayed URL in your browser. Click "Connect" on the sidebar.
- Navigate to the "Tools" tab at the top, select "List Tools".
- Choose the
GetProgramtool. Input a known Report name (e.g.,SAPMV45A) into the 'Program Name' field on the right pane. - Analyze the resulting output for error indicators.
- In your system's file explorer, navigate to the
- Meticulously re-check the file path specified within
- Errors related to SAP connectivity:
- Validate all credentials recorded in the
.envfile. - Confirm the SAP instance is operational and reachable from your network segment.
- Ensure the SAP user possesses the requisite authorization profiles for ADT service invocation.
- Check that mandated ADT services are correctly initialized within the
SICFtransaction. - If self-signed certificates or HTTP configuration issues persist on the SAP side, ensure that the TLS_REJECT_UNAUTHORIZED setting (if applicable in this project's configuration schema) is managed appropriately.
- Validate all credentials recorded in the
6. Exposed Capabilities
This service exposes the following operational interfaces, accessible via Cline or any compatible MCP client:
| Function Name | Operational Summary | Required Input Parameters | Example Cline Invocation |
|---|---|---|---|
GetProgram |
Retrieves the source script for an ABAP program. | program_name (Text): Identifier of the program. |
@tool GetProgram program_name=ZMY_PROGRAM |
GetClass |
Fetches the source code of an ABAP class definition. | class_name (Text): Identifier of the class. |
@tool GetClass class_name=ZCL_MY_CLASS |
GetFunctionGroup |
Extracts the source code for an ABAP Function Group container. | function_group (Text): Name of the containing group. |
@tool GetFunctionGroup function_group=ZMY_FUNCTION_GROUP |
GetFunction |
Retrieves the source code for a specific ABAP Function Module. | function_name (Text), function_group (Text) |
@tool GetFunction function_name=ZMY_FUNCTION function_group=ZFG |
GetStructure |
Retrieves the definition schema for an ABAP Data Dictionary Structure. | structure_name (Text): Name of the DDIC Structure. |
@tool GetStructure structure_name=ZMY_STRUCT |
GetTable |
Fetches the metadata structure for an ABAP database table. | table_name (Text): Name of the physical DB table. |
@tool GetTable table_name=ZMY_TABLE |
GetTableContents |
Extracts actual data records from an ABAP table. | table_name (Text), max_rows (Numeric, optional, default 100) |
@tool GetTableContents table_name=ZMY_TABLE max_rows=50 |
GetPackage |
Retrieves detailed metadata for an ABAP package. | package_name (Text): Name of the ABAP package. |
@tool GetPackage package_name=ZMY_PACKAGE |
GetTypeInfo |
Queries information related to a specified ABAP data type. | type_name (Text): Identifier of the ABAP type. |
@tool GetTypeInfo type_name=ZMY_TYPE |
GetInclude |
Fetches the source content of an ABAP include member. | include_name (Text): Name of the included component. |
@tool GetInclude include_name=ZMY_INCLUDE |
SearchObject |
Executes an ABAP repository quick search query. | query (Text), maxResults (Numeric, optional, default 100) |
@tool SearchObject query=ZMY* maxResults=20 |
GetInterface |
Retrieves the definition script for an ABAP interface. | interface_name (Text): Name of the interface. |
@tool GetInterface interface_name=ZIF_MY_INTERFACE |
GetTransaction |
Fetches configuration details linked to an ABAP transaction code. | transaction_name (Text): Identifier of the T-Code. |
@tool GetTransaction transaction_name=ZMY_TRANSACTION |
