SAP BTP ABAP ADT MCP Server
Provides tools for interacting with SAP ABAP Development Tools (ADT), enabling management of ABAP objects such as classes, interfaces, CDS entities, tables, programs, and function groups, including search, read, create, update, activate, delete, and OData service binding publish operations.
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., "@SAP BTP ABAP ADT MCP ServerSearch for ABAP classes containing 'order'"
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.
SAP ABAP ADT MCP Server
MCP (Model Context Protocol) server for AI agents to interact with SAP ABAP systems via ADT HTTP APIs. Provides 27 tools covering the full ABAP development lifecycle.
Requirements
Python 3.11+
SAP ABAP system with ADT enabled
Browser SSO access to the target system, or ADT-enabled Basic Auth credentials
Optional: communication arrangements for ABAP Unit (
SAP_COM_0735) and ATC (SAP_COM_0901)
Related MCP server: sap-adt-ddic
Install
python -m venv .venv
.\.venv\Scripts\pip install -e .
copy sap-mcp.example.yaml sap-mcp.yamlEdit sap-mcp.yaml and set:
abap_dev.system_urlabap_dev.client, if the SAP system requires an explicit client such as100abap_dev.auth_mode:sso,basic, orauto(default)abap_dev.username/abap_dev.password, ifauth_modeisbasicorautoallowed_packagesallow_write/allow_activate
Do not commit or share sap-mcp.yaml, .env, or .sap-mcp-session.json.
Start
HTTP:
$env:SAP_MCP_AUTH_TOKENS="dev-token"
uvicorn sap_mcp.server:app --host 127.0.0.1 --port 8000STDIO:
python -m sap_mcp.stdio_serverHTTP endpoints:
/mcp/healthz/logon/success
MCP Tools (27)
Session & System
Tool | Description | Actions |
| List available ABAP system destinations | (no args) |
| Manage ADT authentication |
|
| Read ABAP system information |
|
Object Discovery
Tool | Description | Key Parameters |
| Find ABAP repository objects by name, query, or package |
|
| Find where an ABAP object is referenced (Where-Used list) |
|
| Read object metadata, package, links, source structure |
|
Source Code
Tool | Description | Key Parameters |
| Read ABAP source code |
|
| Describe ABAP object method signatures |
|
| Update ABAP source code |
|
| Run syntax check on source (no activation) |
|
| Code assistance — element info or format |
|
Lifecycle Management
Tool | Description | Key Parameters |
| Create an ABAP repository object |
|
| Inspect/validate creation metadata |
|
| Activate one or more ABAP objects |
|
| Delete an ABAP repository object |
|
| Lock an ABAP object for editing |
|
| Release an ABAP object lock |
|
Transport
Tool | Description | Actions |
| Manage transport requests for object workflows |
|
Service Binding
Tool | Description | Key Parameters |
| Read service binding OData data |
|
| Publish an OData V2 or V4 service binding |
|
| Unpublish an OData V2 or V4 service binding |
|
RAP Generators
Tool | Description | Actions |
| Work with RAP generators |
|
CDS Analysis
Tool | Description | Actions |
| Analyze CDS views |
|
Data Preview
Tool | Description | Actions |
| Preview data from CDS views, DDIC tables, or free-style SQL |
|
Execution
Tool | Description | Key Parameters |
| Execute ABAP programs or classes |
|
| Call an ABAP function module or BAPI through |
|
Quality
Tool | Description | Key Parameters |
| Run ABAP quality checks (unit tests / ATC) |
|
Supported Object Types
Code | Description |
| Class |
| Interface |
| CDS View / Entity |
| Access Control (DCL) |
| Behavior Definition |
| CDS Extension |
| Service Definition |
| Service Binding |
| Table / Structure |
| Data Element |
| Domain |
| Package |
| Program |
| Function Group |
| Function Module |
Object type inputs accept either short canonical type (TABL, DDLS, SRVB) or an ADT type id from search/creation results (TABL/DT, DDLS/DF, SRVB/SVB). Prefer short object_type values for cross-tool calls.
Typical Workflow
find/read → syntax_check → update_source → activateFind objects with
abap_find_objectsRead source with
abap_read_sourceCheck syntax with
abap_syntax_checkUpdate source with
abap_update_sourceActivate with
abap_activate
For transport-managed systems, use abap_transport(action="get") first. Write, activate, publish, and delete operations are restricted by allowed_packages.
Login Flow
SSO Mode
Set
abap_dev.auth_mode: "sso"Call
abap_adt_session(action="login")Complete SAP SSO in the browser
The callback stores the local ADT session
Call
abap_adt_session(action="validate")
Basic Auth Mode
Set
abap_dev.auth_mode: "basic"Set
abap_dev.usernameandabap_dev.passwordCall
abap_adt_session(action="validate")
Use read tools first; enable write and activation only when needed.
Project Structure
SAP-ABAP-ADT-MCP/
├── sap_mcp/ # Python package
│ ├── auth/ # Authentication (SSO)
│ ├── connectors/ # ADT API connectors
│ │ ├── analysis/ # CDS analysis, code assist
│ │ ├── core/ # HTTP, auth, paths, XML utils
│ │ ├── integration/ # Business services, destinations, generators
│ │ ├── lifecycle/ # Activation, lock, quality, syntax check, transport
│ │ ├── objects/ # CRUD, search, execution, function modules
│ │ └── system/ # System info
│ ├── services/ # ABAP Dev Gateway
│ ├── tools/ # MCP tool workflows
│ ├── mcp_server.py # MCP tool definitions (27 tools total)
│ └── server.py # HTTP/STDIO server entry points
├── sap-mcp.example.yaml # Example configuration
├── pyproject.toml # Python project metadata
├── .gitignore
└── README.mdThis server cannot be deployed
Maintenance
Related MCP Connectors
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Access the GitHub API, enabling file operations, repository management, search functionality, and…
List, read, edit, and deploy your GenMB AI-generated apps from any MCP client.
Official Akeda ERP connector for tasks, CRM, chats, documents, finance and operations.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with SAP ABAP systems through ABAP Development Tools (ADT), providing access to repository objects, source code, where-used analysis, and SQL queries with support for both on-premise and BTP systems.3-
- FlicenseNot gradedqualityCmaintenanceEnables querying and manipulating SAP ABAP/DDIC objects via ADT REST, including search, source management, table data preview, and CRUD operations.-
- AlicenseCqualityCmaintenanceFacilitates interaction with SAP ABAP systems via ADT APIs, enabling object management, transport handling, and code analysis.10072MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform ABAP Development Tools operations on SAP ERP (ECC and S/4HANA) systems, including source code editing, object activation, syntax checks, and ABAP unit tests.3MIT