ADT MCP Server
An MCP server for ABAP Development Tools (ADT) that exposes various ABAP repository-read tools over a standardized interface.
ADT MCP Server
This repository provides a Model Context Protocol (MCP) server for ABAP Development Tools (ADT), exposing various ABAP repository-read tools (program, class, function, include, interface, structure, table, where-used, etc.) over a standardized MCP interface.
π Now includes SAP BTP (Business Technology Platform) support with JWT authentication and service key utilities!
π Quick Start: See QUICK_START.md for immediate setup instructions.
π Client Connections: See MCP_CLIENT_CONNECTIONS.md for connecting to Cline, Claude Desktop, and other MCP clients.
π Documentation: Complete documentation is available in the doc/ folder.
Prerequisites
- Python 3.9+
- pip (the Python package installer)
- A running SAP ABAP system with ADT services enabled
- A
.envfile in the project root with your SAP connection settings (see below)
Setup
-
Clone the repository
git clone https://github.com/<your-org>/<your-repo>.git cd <your-repo>Note: The MCP server can now be run from any directory, not just the project directory. See REMOTE_CONNECTION_GUIDE.md for details.
Transport Options: The server supports multiple transport protocols: STDIO (default), SSE, and Streamable HTTP.
-
Create and activate a virtual environment
python -m venv .venv source .venv/bin/activate # Linux/macOS .\.venv\Scripts\activate # Windows -
Install dependencies
pip install mcp "mcp[cli]"Then install:
pip install -r requirements.txt -
Configure environment variables
Copy the example
.env.exampleto.envand fill in your SAP credentials:For On-Premise Systems (Basic Authentication)
SAP_AUTH_TYPE=basic SAP_URL=https://my.sap.system:443 SAP_CLIENT=100 SAP_USER=YOUR_USER SAP_PASS=YOUR_PASS SAP_VERIFY_SSL=true # Optional timeout configuration (in seconds) SAP_TIMEOUT_DEFAULT=45 # Default timeout (45 seconds) SAP_TIMEOUT_CSRF=15 # CSRF token timeout (15 seconds) SAP_TIMEOUT_LONG=60 # Long operations timeout (60 seconds)For BTP Systems (JWT Authentication)
SAP_AUTH_TYPE=jwt SAP_URL=https://your-system.abap.region.hana.ondemand.com SAP_JWT_TOKEN=eyJhbGciOiJSUzI1NiIsImp... SAP_VERIFY_SSL=true # Optional timeout configuration (in seconds) SAP_TIMEOUT_DEFAULT=45 # Default timeout (45 seconds) SAP_TIMEOUT_CSRF=15 # CSRF token timeout (15 seconds) SAP_TIMEOUT_LONG=60 # Long operations timeout (60 seconds)π‘ Tip: Use the included BTP utilities to generate .env files from service keys automatically!
π BTP Integration
This server now includes comprehensive SAP BTP support with:
- JWT Token Authentication for BTP ABAP systems
- Service Key Parsing and analysis
- Automatic .env Generation from BTP service keys
- CLI Utility for easy configuration management
Quick BTP Setup
- Download your service key from BTP cockpit
- Generate .env file using the CLI utility:
python btp_env_generator.py --service-key service-key.json --username your-user@company.com --prompt-password - Use the generated .env file in your project
For complete BTP integration details, see BTP_INTEGRATION_GUIDE.md.
Available Tools
ABAP Repository Tools
get_program_source_mcpβ Retrieve ABAP program sourceget_class_source_mcpβ Retrieve ABAP class sourceget_function_group_source_mcpβ Retrieve function group sourceget_function_source_mcpβ Retrieve function module sourceget_include_source_mcpβ Retrieve include sourceget_interface_source_mcpβ Retrieve interface sourceget_structure_source_mcpβ Retrieve structure definitionget_table_source_mcpβ Retrieve table definitionget_table_contents_mcpβ Fetch table data (max rows default 100)get_package_structure_mcpβ Retrieve package metadataget_type_info_mcpβ Retrieve type informationget_transaction_properties_mcpβ Retrieve transaction propertiesget_search_objects_mcpβ Quick search for repository objectsget_usage_references_mcpβ Retrieve whereβused references for any objectget_cds_source_mcpβ Retrieve CDS view sourceget_metadata_extension_source_mcpβ Retrieve metadata extension sourceget_sql_query_mcpβ Execute freestyle SQL queriesget_enhancements_mcpβ Discover enhancement implementations
π BTP Tools
generate_env_from_service_key_file_mcpβ Generate .env from service key filegenerate_env_from_service_key_json_mcpβ Generate .env from service key JSONparse_btp_service_key_mcpβ Parse and analyze service keysget_btp_connection_status_mcpβ Check current BTP configuration
Troubleshooting
"MCP error -32000: Connection closed" Error
If you get this error when connecting from another directory:
-
Make sure you use the full path to the server:
python /full/path/to/mcp-adt/mcp_server.py -
Check MCP client configuration:
{ "mcpServers": { "adt-server": { "command": "python", "args": ["/full/path/to/mcp-adt/mcp_server.py"] } } } -
Run connection test:
python /path/to/mcp-adt/test_remote_connection.py -
Check logs:
- Log file is created in project directory:
mcp_server.log - Check for import or configuration errors
- Log file is created in project directory:
Other Common Issues
- ModuleNotFoundError: Make sure all dependencies are installed:
pip install -r requirements.txt - .env file issues: File is automatically searched in project directory
- Permission issues: On Linux/macOS you may need
chmod +x mcp_server.py
For detailed information see REMOTE_CONNECTION_GUIDE.md
License
Related Servers
MCP Stripe Server
Integrates with Stripe to manage payments, customers, and refunds.
Command Executor
Execute pre-approved shell commands securely on a server.
LambdaTest MCP Server
LambdaTest MCP Servers ranging from Accessibility, SmartUI, Automation, and HyperExecute allows you to connect AI assistants with your testing workflow, streamlining setup, analyzing failures, and generating fixes to speed up testing and improve efficiency.
AC to Automation Converter
An AI-powered system that converts Acceptance Criteria (AC) from QA specifications into automated browser testing workflows.
Zeek-MCP
Integrates Zeek network analysis with conversational AI clients. Requires an external Zeek installation.
EVM MCP Server
Provides blockchain services for over 30 EVM-compatible networks through a unified interface.
Generic API MCP Server
A generic server to interact with any REST API, allowing you to query data, create items, and call methods.
Unified MCP & A2A Server
A Google Apps Script server that unifies Model Context Protocol (MCP) and Agent2Agent (A2A) for Google Workspace users.
Unity MCP
Perform actions in the Unity Editor for game development using AI clients.
MCP Proxy Server
Aggregates multiple MCP resource servers into a single interface with stdio/sse support.