Skip to main content
Glama
engoetz

sap-adt-mcp

by engoetz

sap-adt-mcp

tests license python

MCP server and Python client for the SAP ADT (ABAP Development Tools) REST API. It gives your AI assistant the same operations that Eclipse ADT uses — searching the repository, reading and writing source code, activating, checking syntax, and working with transport requests — by talking to the same /sap/bc/adt/* endpoints.

Full technical documentation also in English: docs/PROJECT_DOCUMENTATION.md.


What you can do

  • Search and browse — objects by wildcard (Z*, ZCL_*), package contents (including namespaces like /ACME/PKG), and metadata

  • Read and write source — with locking, transport assignment, and activation in a single call; optionally saving/reading local files

  • Activate and check syntax — with error messages by line and column

  • Transports — list, create, release, and check whether an object needs one

  • Create objects — programs, classes, interfaces, and packages (local or transportable)

  • Export DDIC as Markdown — tables, data elements, domains, and views become readable context for the AI

  • Work on older releases — media types are negotiated per endpoint and sap_system_info tells you what that system supports

Credentials are stored in the operating system credential manager; no password is ever written to a project file.


Related MCP server: mcp-abap-abap-adt-api

Requirements

Requirement

Minimum

Check

Python

3.10+

python --version

SAP system

NetWeaver 7.31 SP04+ with the ICF node /sap/bc/adt active

sap-adt test <ID>

MCP client

Cursor, Claude Code, Claude Desktop, VS Code, or another with MCP support

Network

access to the SAP host and port

SAP-side prerequisites (ICF services, roles, and authorization objects) are detailed in section 6 of the command reference.


Installation

pip install git+https://github.com/engoetz/sap-adt-mcp

This registers two commands on your PATH:

Command

Purpose

sap-adt

manage connections from the terminal (password in hidden prompt)

sap-adt-mcp

run the MCP server (stdio)

To run without permanently installing anything, using uv:

uvx --from git+https://github.com/engoetz/sap-adt-mcp sap-adt-mcp

From source code (for development)

git clone https://github.com/engoetz/sap-adt-mcp
cd sap-adt-mcp
python -m venv .venv && .venv/Scripts/activate   # Linux/macOS: source .venv/bin/activate
pip install -e ".[dev]"
python -m pytest tests -q

Setting up in the MCP client

After installation, the sap-adt-mcp command is already on the PATH — no absolute path needed:

{
  "mcpServers": {
    "sap-adt": {
      "command": "sap-adt-mcp",
      "args": []
    }
  }
}

Where to place this block:

Client

File

Cursor (global)

~/.cursor/mcp.json — Windows: C:\Users\<usuário>\.cursor\mcp.json

Cursor (per project)

.cursor/mcp.json in the project root — there's a template at .cursor/mcp.json.example

Claude Code

claude mcp add sap-adt -- sap-adt-mcp

Claude Desktop

claude_desktop_config.json

If you prefer to run directly from source without installing the package, replace it with "command": "python", "args": ["/caminho/para/sap-adt-mcp/scripts/run_mcp.py"].

Verify

In Cursor, the server appears as user-sap-adt under Settings > MCP. To test in any client, call sap_list_environments() — it should return the list of saved connections.

Problem

Solution

Server does not appear

Check the configuration file path and reopen the client

Server in red

Run sap-adt-mcp in the terminal and see the error; usually it's the wrong Python on the PATH

ModuleNotFoundError: sap_adt

The package was installed in a different virtual environment

No password available

Run sap-adt password <ID>

Missing connection parameter(s)

Run sap-adt add <ID> to create the connection


Credentials

sap-adt add DEV

The command asks for host, port, client, user, language, and HTTPS (Enter accepts the suggested value) and, finally, the password — entered twice, with no echo on screen. This way it doesn't end up in the shell history or the AI conversation history.

sap-adt list                      # conexões salvas e se têm senha
sap-adt edit DEV --port 8020      # alterar campos sem tocar na senha
sap-adt password DEV              # trocar apenas a senha
sap-adt test DEV                  # conectar e sondar os endpoints ADT
sap-adt delete DEV                # remover conexão e senha

There is no --password parameter: by design, the password is only entered via prompt. For automation, the SAP_PASSWORD environment variable is accepted.

The password goes to the OS keyring (Windows Credential Manager, macOS Keychain, Linux Secret Service). The other parameters are stored in ~/.sap-adt/environments.json, outside the project.

Via chat

sap_save_password(system_id="DEV", host="...", port=8000, client="100", user="username", password="...") does the same thing — but the password stays in the conversation log. Prefer the terminal.


First use

sap_connect(system_id="DEV")
sap_system_info()                       # o que este sistema suporta (rode em release antiga)

sap_search(query="Z*", object_type="CLAS")
sap_read_source(object_name="ZCL_MINHA_CLASSE", object_type="CLAS")

sap_write_source(
    object_name="ZCL_MINHA_CLASSE",
    object_type="CLAS",
    source_code="...",
    transport_request="DEVK900123"
)

Outside the MCP client, sap-adt test DEV performs the same diagnostics from the terminal.


Cross-release compatibility

Older systems (ECC, NetWeaver 7.3x) expose a subset of ADT and don't always understand the same media type versions. The client handles this on its own:

  • Negotiated media types per endpoint, from newest to oldest, remembering what worked

  • Discovery with fallbacks when /sap/bc/adt/discovery is not active in SICF

  • Transport sent in both forms (corrNr in the query and sap-transportrequest header)

  • sap_system_info probes the endpoints and tells you which tools won't work there

Details in section 6.7 of the reference.


MCP tools (25)

Connection and credentials

Tool

Description

sap_connect

Authenticate against the SAP system (supports saved environments)

sap_disconnect

Close the current connection (allows switching systems)

sap_system_info

Diagnostics: which ADT endpoints the system supports

sap_discovery

List available ADT services

sap_save_password

Store credentials in the OS credential manager

sap_delete_password

Remove saved credentials

sap_list_environments

List saved SAP environments

Repository

Tool

Description

sap_search

Search ABAP objects (CLAS, PROG, INTF, FUGR, TABL)

sap_browse_package

List package contents (supports namespaces)

sap_object_metadata

Get details of an object (name, type, package, owner)

sap_export_ddic_markdown

Export DDIC metadata as Markdown

Source code

Tool

Description

sap_read_source

Read ABAP source code (optional: save to a local file)

sap_write_source

Write source with automatic locking, transport, and activation

sap_activate

Compile/activate objects

sap_syntax_check

Syntax check without activating

Transports

Tool

Description

sap_check_lock

Check object lock status

sap_list_transports

List open transport requests

sap_create_transport

Create a new transport request

sap_release_transport

Release a transport request

sap_transport_check

Check whether an object requires a transport

Creation and deletion

Tool

Description

sap_create_program

Create a new ABAP program

sap_create_class

Create a new ABAP class

sap_create_interface

Create a new ABAP interface

sap_create_package

Create a new ABAP package (DEVC), local or transportable

sap_delete_object

Delete ABAP object (requires confirm='DELETE')

Parameters, examples, and return values for each one: docs/MCP_COMMAND_REFERENCE.md


Architecture

Cliente MCP  →  servidor MCP (stdio/JSON-RPC)  →  cliente REST ADT  →  SAP /sap/bc/adt/*
src/sap_adt/
├── client.py            # HTTP: autenticação, CSRF, sessões stateful, negociação de media type
├── credential_store.py  # ~/.sap-adt/environments.json + keyring do SO
├── repository.py        # pesquisa, navegação de pacotes, metadados
├── source.py            # leitura/escrita de fonte com bloqueio
├── activation.py        # ativação e verificação de sintaxe
├── transport.py         # transport requests (CTS)
├── ddic_export.py       # DDIC → Markdown
├── cli.py               # comando `sap-adt`
├── models.py            # dataclasses
├── exceptions.py        # hierarquia de exceções
└── mcp_server.py        # servidor MCP com as 25 ferramentas

Dependency

Purpose

requests

HTTP client for the ADT REST API

mcp

Model Context Protocol SDK (FastMCP)

lxml

XML parsing

keyring

credentials in the OS credential manager


Development

pip install -e ".[dev]"
python -m pytest tests -q

The tests are offline: no SAP system and no network are required. They cover URI resolution, the XML parsers fed with static responses (including the format from older releases), and the CLI. CI runs the suite on Linux and Windows, Python 3.10 and 3.13, and verifies that the package builds.

Contributions and bug reports are welcome via issues. When opening an issue, do not paste hostnames, usernames, clients, or proprietary code snippets — describe the behavior and, if possible, include the output of sap_system_info.


Documentation

Document

Content

docs/MCP_COMMAND_REFERENCE.md

Command reference: parameters, examples, SAP prerequisites, and the CLI manual

docs/PROJECT_DOCUMENTATION.md

Complete technical documentation (English)

docs/PROJECT_DOCUMENTATION_PT-BR.md

Complete technical documentation (Portuguese)

AGENTS.md

Working rules for the assistant that uses the tools


License

Apache-2.0.

Independent project, with no affiliation, sponsorship, or endorsement from SAP SE. SAP, ABAP, and SAP NetWeaver are trademarks of SAP SE. The tool only consumes the publicly documented ADT API, using the user's own credentials.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    C
    maintenance
    Facilitates interaction with SAP ABAP systems via ADT APIs, enabling object management, transport handling, and code analysis.
    100
    148
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI agents to read, write, activate, and transport ABAP code in SAP systems via ABAP ADT REST API, without needing SAP GUI.
    4
    24

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…

  • Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/engoetz/sap-adt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server