Skip to main content
Glama
SAP ADT MCP Server

SAP ADT MCP Server

by ethanhan2014

SAP ADT MCP Server

MCP server for SAP ABAP Development Tools (ADT) REST API. Enables AI assistants to read, create, and modify ABAP source code, inspect DDIC objects, execute SQL queries, manage transports, analyze traces, fetch short dumps, control the debugger, and more — across multiple SAP systems from a single server instance.

Tools (66)

Source Code & DDIC (11)

Tool

Description

Input

get_abap_program

Fetch ABAP program/report source code

name

get_class

Fetch ABAP class source code

name

get_function_module

Fetch function module source code

function_group, function_name

get_function_group

Fetch function group source code

name

get_include

Fetch ABAP include source code

name

get_interface

Fetch ABAP interface source code

name

get_cds_view

Fetch CDS view DDL source

name

get_structure

Fetch DDIC structure definition

name

get_table

Fetch ABAP database table definition

name

get_data_element

Fetch DDIC data element definition

name

get_domain

Fetch DDIC domain definition

name

Repository & Search (3)

Tool

Description

Input

search_object

Search ABAP objects by name pattern (wildcards supported)

query, max_results?

get_transaction

Fetch transaction details (package, app component)

name

get_package

Fetch package contents (objects with types/descriptions)

name

Create, Change & Execute (12)

Tool

Description

Input

create_abap_program

Create, write source, and activate a program

name, description, source, package?

change_abap_program

Modify an existing program (lock, write, activate, unlock)

name, source

create_abap_class

Create, write source, and activate a class

name, description, source, package?

change_abap_class

Modify an existing class (lock, write, activate, unlock)

name, source

create_interface

Create, write source, and activate an interface

name, description, source, package?

change_interface

Modify an existing interface (lock, write, activate, unlock)

name, source

create_cds_view

Create, write source, and activate a CDS view

name, description, source, package?

change_cds_view

Modify an existing CDS view (lock, write, activate, unlock)

name, source

execute_program

Execute a program and return WRITE output

name

execute_sql

Execute ABAP SQL query and return results as table

query

fetch_st22_dumps

Fetch ST22 short dumps for a date

date, user?, max_results?

get_csrf_token

Fetch CSRF token and session cookie

(none)

Transport Management (7)

Tool

Description

Input

list_user_transports

List all modifiable transports for current user

(none)

get_transport

Get full transport details (tasks, objects, status)

transport_number

get_transport_info

Check transport requirements for an object

uri, devclass, operation?

create_transport

Create a new transport request

devclass, description, ref?, operation?

release_transport

Release a transport for import

transport_number

delete_transport

Delete a transport request

transport_number

list_system_users

List SAP system users

(none)

SAT Trace (7)

Tool

Description

Input

list_traces

List ABAP runtime traces (SAT/SE30)

user?

get_trace_hitlist

Get performance hit list for a trace

trace_id

get_trace_db_access

Get database access statistics for a trace

trace_id

get_trace_statements

Get statement-level call tree for a trace

trace_id

delete_trace

Delete a runtime trace

trace_id

create_trace_config

Create a trace collection configuration

object_name, process_type?, description?

delete_trace_config

Delete a trace configuration

config_id

ST05 Performance Trace (3)

Tool

Description

Input

enable_st05_trace

Enable SQL/buffer/RFC/auth trace for a user

user?, sql?, buffer?, rfc?, auth?, enqueue?, http?

disable_st05_trace

Disable all active performance traces

(none)

get_st05_trace_state

Get active trace types, user filter, and server info

(none)

Cross Trace (5)

Tool

Description

Input

enable_cross_trace

Enable cross trace for RAP, OData, SADL, BAdI, Gateway

user?, components?, max_traces?, trace_level?

disable_cross_trace

Disable a cross trace activation

activation_id

get_cross_trace_activations

List active cross trace activations

(none)

list_cross_traces

List captured cross trace results

user?

get_cross_trace_records

Get detailed records for a cross trace

trace_id

Service Binding (3)

Tool

Description

Input

get_binding_details

Get OData service binding details

binding_name

publish_service_binding

Publish an OData service binding

binding_name, binding_version

unpublish_service_binding

Unpublish an OData service binding

binding_name, binding_version

Debugger (14)

Tool

Description

Input

start_debugger_listener

Start debugger listener (opens stateful session)

terminal_id?, ide_id?, user?

stop_debugger_listener

Stop listener and close debug session

terminal_id?, ide_id?, user?

get_debugger_session

Check if a debugger session is attached

terminal_id?, ide_id?, user?

set_debugger_breakpoint

Set a breakpoint at a source location

uri, line, user?

delete_debugger_breakpoint

Remove a breakpoint

breakpoint_id

attach_debugger

Attach to a running ABAP debug session

debug_mode?

get_debugger_stack

Get the current call stack

(none)

get_debugger_variables

Get variable values

variable_names[]

get_debugger_child_variables

Get child/nested variable values

variable_name

set_debugger_variable_value

Set a variable value during debugging

variable_name, value

debugger_step

Step into/over/return/continue/terminate

step_type, uri?

debugger_goto_stack

Navigate to a stack frame

stack_type, position

insert_watchpoint

Set a watchpoint on a variable (pause on value change)

variable_name, condition?

get_watchpoints

List all active watchpoints

(none)

Multi-System (1)

Tool

Description

Input

list_systems

List all configured SAP systems with IDs, hostnames, and clients

(none)

All tools accept an optional system_id parameter to target a specific SAP system. Omit to use the default (first configured) system.

Prerequisites

  • Node.js v18 or later

  • SAP user with S_ADT_RES authorization for ADT resource access

  • ICF services activated under /sap/bc/adt/ (via transaction SICF)

  • Role SAP_BC_DWB_ABAPDEVELOPER or equivalent

Installation

git clone https://github.com/ethanhan2014/sap-adt-mcp.git
cd sap-adt-mcp
npm install
npm run build

Configuration

Option 1: Single system via .env

cp .env.example .env

Edit .env with your SAP system connection details:

SAP_HOSTNAME=your-sap-host.example.com
SAP_SYSNR=50
SAP_USERNAME=YOUR_USER
SAP_PASSWORD=YOUR_PASSWORD
SAP_CLIENT=001
SAP_LANGUAGE=EN

Variable

Description

Example

SAP_HOSTNAME

SAP system hostname

your-sap-host.example.com

SAP_SYSNR

System number (port = 443 + sysnr)

50 → port 44350

SAP_USERNAME

SAP user

DEVELOPER

SAP_PASSWORD

SAP password

secret

SAP_CLIENT

SAP client

001

SAP_LANGUAGE

Logon language (default: EN)

EN

Option 2: Multiple systems via systems.json

Create systems.json in the project root (see systems.json.example):

[
  {
    "id": "DEV",
    "hostname": "dev-system.sap.com",
    "sysnr": "50",
    "client": "001",
    "username": "YOUR_USER",
    "password": "YOUR_PASSWORD",
    "language": "EN"
  },
  {
    "id": "QA",
    "hostname": "qa-system.sap.com",
    "sysnr": "00",
    "client": "001",
    "authType": "certificate",
    "certThumbprint": "YOUR_CERT_THUMBPRINT",
    "language": "EN"
  }
]

When systems.json is present, .env is ignored for system configuration. The first system is the default. Use system_id on any tool call to target a specific system.

Supported auth types:

  • basic (default) — username/password

  • certificate — X.509 client certificate via certThumbprint

Usage

Claude Code

Add to ~/.claude.json:

{
  "mcpServers": {
    "sap-adt": {
      "command": "node",
      "args": ["/path/to/sap-adt-mcp/dist/index.js"]
    }
  }
}

Cline (VS Code)

Add to Cline MCP settings (cline_mcp_settings.json):

{
  "mcpServers": {
    "sap-adt": {
      "command": "node",
      "args": ["/path/to/sap-adt-mcp/dist/index.js"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

Standalone

npm start

Development (with MCP Inspector)

npx @modelcontextprotocol/inspector node dist/index.js

Tech Stack

  • TypeScript + Node.js

  • MCP SDK (@modelcontextprotocol/sdk)

  • Axios for HTTP

  • SAP ADT REST API over HTTPS with Basic Auth or X.509 Certificate

Available Tools

66 tools
attach_debuggerB

Attach the debugger to a running ABAP session

Inputs: debug_mode, system_id.

change_abap_classA

Modify an existing ABAP class in the SAP system. Locks the object, writes the new source, activates, and unlocks. Use get_class first to read the current source.

Inputs: name (required), source (required), system_id.

change_abap_programA

Modify an existing ABAP program/report in the SAP system. Locks the object, writes the new source, activates, and unlocks. Use get_abap_program first to read the current source.

Inputs: name (required), source (required), system_id.

change_cds_viewA

Modify an existing CDS view (DDL source) in the SAP system. Locks the object, writes the new source, activates, and unlocks. Use get_cds_view first to read the current source.

Inputs: name (required), source (required), system_id.

change_interfaceA

Modify an existing ABAP interface in the SAP system. Locks the object, writes the new source, activates, and unlocks. Use get_interface first to read the current source.

Inputs: name (required), source (required), system_id.

create_abap_classA

Create a new ABAP class in the SAP system. Creates the class, writes source code, and activates it. By default creates in $TMP (local objects, no transport required).

Inputs: name (required), description (required), source (required), package, +1 more.

create_abap_programA

Create a new ABAP program/report in the SAP system. Creates the program, writes source code, and activates it. By default creates in $TMP (local objects, no transport required).

Inputs: name (required), description (required), source (required), package, +1 more.

create_cds_viewA

Create a new CDS view (DDL source) in the SAP system. Creates the DDL source, writes the definition, and activates it. By default creates in $TMP.

Inputs: name (required), description (required), source (required), package, +1 more.

create_interfaceA

Create a new ABAP interface in the SAP system. Creates the interface, writes source code, and activates it. By default creates in $TMP (local objects, no transport required).

Inputs: name (required), description (required), source (required), package, +1 more.

create_trace_configB

Create a trace collection configuration to capture an ABAP runtime trace

Inputs: object_name (required), process_type, description, max_executions, +2 more.

create_transportB

Create a new transport request in the SAP system

Inputs: devclass (required), description (required), ref, operation, +1 more.

debugger_goto_stackB

Navigate to a specific stack frame in the debugger

Inputs: stack_type (required), position (required), system_id.

debugger_stepA

Execute a debug step. stepInto/stepOver/stepReturn/stepContinue use batch mode (step+getStack). stepRunToLine/stepJumpToLine/terminateDebuggee use action mode.

Inputs: step_type (required), uri, system_id.

delete_debugger_breakpointB

Remove a breakpoint from the debugger

Inputs: breakpoint_id (required), system_id.

delete_traceB

Delete a runtime trace

Inputs: trace_id (required), system_id.

delete_trace_configC

Delete a trace collection configuration

Inputs: config_id (required), system_id.

delete_transportB

Delete a transport request from the SAP system

Inputs: transport_number (required), system_id.

disable_cross_traceA

Disable an ABAP Cross Trace activation by its ID. Use get_cross_trace_activations to find the activation ID.

Inputs: activation_id (required), system_id.

disable_st05_traceB

Disable ST05 performance trace. Stops all active trace collection on the server.

Inputs: system_id.

enable_cross_traceA

Enable ABAP Cross Trace for a user. Traces RAP, OData, SADL, BAdI, Gateway and other framework components continuously (up to max_traces). Unlike SAT trace which captures only 1 execution, cross trace captures multiple requests over time.

Inputs: user, description, max_traces, expiry_hours, +4 more.

enable_st05_traceA

Enable ST05 performance trace (SQL trace, buffer trace, etc.) for a specific user. By default enables SQL trace with stack trace. The trace runs continuously until disabled with disable_st05_trace.

Inputs: user, sql, buffer, enqueue, +5 more.

execute_programA

Execute an ABAP program/report on the SAP system and return the list output. The program must be activated. Returns the WRITE output as plain text.

Inputs: name (required), system_id.

execute_sqlA

Execute an ABAP SQL query on the SAP system and return results as a table. Use standard ABAP SQL syntax (e.g. SELECT vbeln, erdat FROM vbak UP TO 10 ROWS).

Inputs: query (required), system_id.

fetch_st22_dumpsA

Fetch ABAP runtime error dumps (ST22/short dumps) for a specific date. Returns dump time, user, runtime error type, and program. Queries the SNAP table and parses the encoded dump headers.

Inputs: date (required), user, max_results, system_id.

get_abap_programB

Fetch ABAP program/report source code from SAP system

Inputs: name (required), system_id.

get_binding_detailsB

Get OData service binding details (service URLs, versions, status)

Inputs: binding_name (required), system_id.

get_cds_viewA

Fetch CDS view DDL source definition from SAP system

Inputs: name (required), system_id.

get_classA

Fetch ABAP class source code from SAP system

Inputs: name (required), system_id.

get_cross_trace_activationsB

List all active ABAP Cross Trace activations. Shows activation IDs, user filters, enabled state, expiry, and component count.

Inputs: system_id.

get_cross_trace_recordsA

Get detailed records for a specific cross trace. Shows framework-level trace records with components, timestamps, and content.

Inputs: trace_id (required), system_id.

get_csrf_tokenA

Fetch a CSRF token and session cookie from the SAP system. Useful for making authenticated POST/PUT/DELETE requests to ADT or other SAP ICF services.

Inputs: system_id.

get_data_elementB

Fetch DDIC data element definition from SAP system

Inputs: name (required), system_id.

get_debugger_child_variablesB

Get child/nested variable values (structure components, table rows)

Inputs: variable_name (required), system_id.

get_debugger_sessionA

Check if a debugger session is currently attached. Returns session info without blocking.

Inputs: terminal_id, ide_id, user, system_id.

get_debugger_stackB

Get the current call stack in the debugger

Inputs: system_id.

get_debugger_variablesA

Get variable values in the current debug context. Returns value statements for each variable.

Inputs: variable_names (required), system_id.

get_domainB

Fetch DDIC domain definition from SAP system

Inputs: name (required), system_id.

get_function_groupB

Fetch ABAP function group source code from SAP system

Inputs: name (required), system_id.

get_function_moduleB

Fetch function module source code from SAP system

Inputs: function_group (required), function_name (required), system_id.

get_includeB

Fetch ABAP include source code from SAP system

Inputs: name (required), system_id.

get_interfaceB

Fetch ABAP interface source code from SAP system

Inputs: name (required), system_id.

get_packageA

Fetch ABAP package contents (list of objects with types and descriptions) from SAP system

Inputs: name (required), system_id.

get_st05_trace_stateA

Get the current ST05 performance trace state — shows which trace types are active, the user filter, and server info.

Inputs: system_id.

get_structureB

Fetch DDIC structure definition from SAP system

Inputs: name (required), system_id.

get_tableA

Fetch ABAP database table definition from SAP system

Inputs: name (required), system_id.

get_trace_db_accessC

Get database access statistics for a trace

Inputs: trace_id (required), system_id.

get_trace_hitlistB

Get performance hit list for a trace (most expensive calls)

Inputs: trace_id (required), system_id.

get_trace_statementsA

Get aggregated call tree with statement-level performance for a trace

Inputs: trace_id (required), system_id.

get_transactionA

Fetch ABAP transaction details (package, application component) from SAP system

Inputs: name (required), system_id.

get_transportB

Get full details of a transport request by number. Returns description, status, owner, target system, tasks, and object list.

Inputs: transport_number (required), system_id.

get_transport_infoC

Check transport info for an ABAP object. Returns available transports and lock status.

Inputs: uri (required), devclass (required), operation, system_id.

get_watchpointsB

List all active watchpoints in the current debug session.

Inputs: system_id.

insert_watchpointA

Set a watchpoint on a variable. Execution will pause when the variable's value changes. Must have an active debug session.

Inputs: variable_name (required), condition, system_id.

list_cross_tracesB

List captured ABAP Cross Trace results for a user. Shows trace IDs, request types (OData V2/V4, URL, RFC, etc.), and service names.

Inputs: user, system_id.

list_systemsA

List all configured SAP systems with their IDs, hostnames, and client numbers.

Inputs: no named parameters.

list_system_usersA

List SAP system users. Useful for transport ownership and user lookups.

Inputs: system_id.

list_tracesA

List ABAP runtime traces (SAT/SE30) for a user. Traces must be created via SAP GUI (transaction SAT or SE30) since the ADT REST API cannot profile programrun executions.

Inputs: user, system_id.

list_user_transportsA

List all modifiable transport requests for the current SAP user. Returns TR number, type, status, date, and description.

Inputs: system_id.

publish_service_bindingC

Publish an OData service binding to make it accessible

Inputs: binding_name (required), binding_version (required), system_id.

release_transportB

Release a transport request for import into target systems

Inputs: transport_number (required), system_id.

search_objectB

Search for ABAP repository objects by name pattern. Supports wildcards (*) for partial matches.

Inputs: query (required), max_results, system_id.

set_debugger_breakpointB

Set a breakpoint at a specific source location in the debugger

Inputs: uri (required), line (required), user, system_id.

set_debugger_variable_valueC

Set a variable value during debugging

Inputs: variable_name (required), value (required), system_id.

start_debugger_listenerA

Start an ABAP debugger listener. Opens a stateful session and waits for a debug event. Must call stop_debugger_listener when done.

Inputs: terminal_id, ide_id, user, system_id.

stop_debugger_listenerA

Stop the debugger listener and close the stateful debug session

Inputs: terminal_id, ide_id, user, system_id.

unpublish_service_bindingB

Unpublish an OData service binding

Inputs: binding_name (required), binding_version (required), system_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 66 tools

    Disambiguation5/5

    Each tool targets a specific operation on a distinct resource, with clear boundaries between debugging, development objects, tracing, transports, and system utilities. No overlapping functionality causes ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern. Debugger tools use a 'debugger_' prefix or include 'debugger' as a noun, and trace groups follow similar conventions, ensuring predictability.

    Tool Count2/5

    66 tools is far above the typical range (3-15) for an MCP server. Even considering the broad scope of SAP ADT, this number risks cognitive overload and violates the rubric's threshold of 25+ tools.

    Completeness4/5

    The tool set covers core CRUD operations for development objects (create, read, update) but lacks delete for classes, programs, etc. Debugging, tracing, transports, and OData are well-covered, with only minor omissions like object deletion.

    Related MCP Connectors