by fr0ster
Provides an MCP server for SAP ABAP Development Tools (ADT) that enables full CRUD operations, JWT/XSUAA and service‑key authentication across SAP BTP ABAP Cloud and on‑premise ECC/S/4HANA systems.
Mcp Abap Adt delivers a model‑context‑protocol (MCP) server exposing ABAP ADT capabilities. It connects AI agents or other clients to real ABAP repositories, allowing deep analysis and high‑level development while respecting system‑side validation.
npx mcp-abap-adt --help
~/.config/mcp-abap-adt/service-keys/ (or the Windows equivalent) and reference it with the --mcp=<destination> flag.npx mcp-abap-adt --transport=stdio --mcp=TRIALnpx mcp-abap-adt --transport=http --http-port=8080npx mcp-abap-adt --transport=sse --sse-port=3001@mcp-abap-adt/configurator) or manually via JSON/TOML.Q: Do I need a full ABAP Cloud tenant to use the server? A: No. It works with on‑premise ECC/S/4HANA via HTTP or RFC and with ABAP Cloud using JWT/XSUAA.
Q: Can I run the server without installing it globally?
A: Yes. Use npx mcp-abap-adt to execute the package directly.
Q: Where are service‑key files stored?
A: ~/.config/mcp-abap-adt/service-keys/<destination>.json on Unix/macOS or %USERPROFILE%\Documents\mcp-abap-adt\service-keys\<destination>.json on Windows.
Q: How do I switch between stdio and HTTP transports?
A: Provide the --transport flag (stdio, http, or sse) when starting the server.
Q: Is there support for legacy systems that cannot use HTTP?
A: Yes, the server can connect via RFC by setting --connection-type=rfc and providing the corresponding credentials.
mcp-abap-adt is an MCP server for ABAP ADT in SAP ECC/S/4HANA (on-premise) and SAP BTP ABAP Cloud systems. It gives agents controlled access to real ABAP repositories through ADT, so analysis and changes are grounded in system data instead of assumptions. It is built for AI-assisted pair programming (AIPNV: AI Pairing, Not Vibing), not autopilot vibe coding.
Primary workflows:
Why teams use it:
Authorization & Destinations (Important): A destination is the filename of a service key stored locally. You place service keys in the service-keys directory, and use --mcp=<destination> to select which one to use. This is the primary auth model for on‑prem and BTP systems. See Authentication & Destinations.
You can configure MCP clients either manually (JSON/TOML) or via the configurator CLI (@mcp-abap-adt/configurator, repo: mcp-abap-adt-conf).
Install the server and configure your client using the configurator:
npm install -g @mcp-abap-adt/core
npm install -g @mcp-abap-adt/configurator
# stdio (destination)
mcp-conf --client cline --name abap --mcp TRIAL
# HTTP (streamable HTTP)
mcp-conf --client copilot --name abap --transport http --url http://localhost:3000/mcp/stream/http --mcp trial
Full configurator usage (separate repo): CLIENT_INSTALLERS.md.
Destination: a local service key filename. You store service keys in the standard service-keys directory, and pass the filename (without extension) via --mcp=<destination> to select which system to use.
See docs/user-guide/TERMINOLOGY.md for the full list.
Destination-based auth is the default. Drop service keys into the standard platform folder and use the filename as your destination:
mcp-abap-adt --transport=stdio --mcp=TRIAL
Standard service key paths:
~/.config/mcp-abap-adt/service-keys/<destination>.json%USERPROFILE%\\Documents\\mcp-abap-adt\\service-keys\\<destination>.jsonFor full details (paths, .env, direct headers), see Authentication & Destinations.
The project provides two main usage patterns:
Run as a standalone MCP server with stdio, HTTP, or SSE transport:
mcp-abap-adt # stdio (default)
mcp-abap-adt --transport=http # HTTP mode
mcp-abap-adt --transport=sse # SSE mode
Embed MCP server into existing applications (e.g., SAP CAP/CDS, Express):
import { EmbeddableMcpServer } from '@mcp-abap-adt/core/server';
const server = new EmbeddableMcpServer({
connection, // Your AbapConnection instance
logger, // Optional logger
exposition: ['readonly', 'high'], // Handler groups to expose
});
await server.connect(transport);
mcp-conf from @mcp-abap-adt/configurator (repo: mcp-abap-adt-conf, docs: CLIENT_INSTALLERS.md)Key examples of high-value workflows and tools:
GetWhereUsed, DescribeByList, GetObjectStructure, GetObjectInfo, SearchObject, GetPackageTree, GetPackageContentsGetAbapAST, GetAbapSemanticAnalysis, GetIncludesList, GetProgFullCodeCreateBehaviorDefinition, UpdateBehaviorDefinition, CreateBehaviorImplementation, UpdateBehaviorImplementation, CreateServiceDefinition, UpdateServiceDefinition, CreateMetadataExtension, UpdateMetadataExtensionCreateView, UpdateView, GetView, DeleteViewCreateClass, UpdateClass, GetClass, DeleteClass, CreateInterface, UpdateInterface, GetInterface, DeleteInterfaceCreateFunctionGroup, UpdateFunctionGroup, GetFunctionGroup, DeleteFunctionGroup, CreateFunctionModule, UpdateFunctionModule, GetFunctionModule, DeleteFunctionModuleCreateTransport, GetTransport, ActivateObjectPublished in the official MCP Registry and listed on Glama.ai.
GetDomain, CreateDomain, UpdateDomain - Create, retrieve, and update ABAP domainsGetDataElement, CreateDataElement, UpdateDataElement - Create, retrieve, and update ABAP data elementsGetTable, CreateTable, GetTableContents - Create and retrieve ABAP database tables with data previewGetStructure, CreateStructure - Create and retrieve ABAP structuresGetView, CreateView, UpdateView - Create and manage CDS Views and Classic ViewsGetClass, CreateClass, UpdateClass - Create, retrieve, and update ABAP classesGetProgram, CreateProgram, UpdateProgram - Create, retrieve, and update ABAP programsGetBehaviorDefinition, CreateBehaviorDefinition, UpdateBehaviorDefinition - Create and manage ABAP Behavior Definitions with support for Managed, Unmanaged, Abstract, and Projection typesCreateMetadataExtension, UpdateMetadataExtension - Create and manage ABAP Metadata ExtensionsActivateObject - Universal activation for any ABAP objectCreateTransport, GetTransport - Create and retrieve transport requestsGetEnhancements, GetEnhancementImpl, GetEnhancementSpot - Enhancement discovery and analysisGetIncludesList - Recursive include discoveryGetInactiveObjects - Monitor inactive objects waiting for activationRuntimeCreateProfilerTraceParameters, RuntimeListProfilerTraceFiles, RuntimeGetProfilerTraceData, RuntimeListDumps, RuntimeGetDumpById - Profiling and dump analysis with JSON payloadsRuntimeListFeeds, RuntimeListSystemMessages, RuntimeGetGatewayErrorLog - Feed reader, SM02 system messages, Gateway error logGetSqlQuery - Execute custom SQL queries via ADT Data Preview APIℹ️ ABAP Cloud limitation: Direct ADT data preview of database tables is blocked by SAP BTP backend policies. The server returns a descriptive error when attempting such operations. On-premise systems continue to support data preview.
@mcp-abap-adt/configurator (repo: mcp-abap-adt-conf) provides the mcp-conf CLI to auto-configure clientsThis project uses two npm packages:
These packages are automatically installed via npm install and are published to npm.
After installing globally with npm install -g, you can run from any directory:
# Show help
mcp-abap-adt --help
# Default HTTP mode (works without .env file)
mcp-abap-adt
# HTTP mode on custom port
mcp-abap-adt --http-port=8080
# Use stdio mode (for MCP clients, requires .env file or --mcp parameter)
mcp-abap-adt --transport=stdio
# Use stdio mode with auth-broker (--mcp parameter)
mcp-abap-adt --transport=stdio --mcp=TRIAL
# Use env destination from platform sessions store
mcp-abap-adt --env=trial
# Use explicit .env file path
mcp-abap-adt --env-path=/path/to/my.env
# SSE mode (requires .env file or --mcp parameter)
mcp-abap-adt --transport=sse --sse-port=3001
# SSE mode with auth-broker (--mcp parameter)
mcp-abap-adt --transport=sse --mcp=TRIAL
# Build and run locally
npm run build
npm start
# HTTP mode
npm run start:http
# SSE mode
npm run start:sse
# Legacy v1 server (for backward compatibility)
npm run start:legacy
Env resolution:
--env-path=<path|file> (or MCP_ENV_PATH) for explicit .env file.
my.env): resolved from current working directory.--env=<destination> for destination file in standard sessions store:
~/.config/mcp-abap-adt/sessions/<destination>.env%USERPROFILE%\\Documents\\mcp-abap-adt\\sessions\\<destination>.env.env in current working directory.Example .env file:
SAP_URL=https://your-sap-system.com
SAP_CLIENT=100
SAP_AUTH_TYPE=basic
SAP_USERNAME=your-username
SAP_PASSWORD=your-password
For JWT authentication (SAP BTP):
SAP_URL=https://your-btp-system.com
SAP_CLIENT=100
SAP_AUTH_TYPE=jwt
SAP_JWT_TOKEN=your-jwt-token
For legacy systems (RFC):
SAP_URL=https://your-legacy-system.com
SAP_CLIENT=100
SAP_AUTH_TYPE=basic
SAP_USERNAME=your-username
SAP_PASSWORD=your-password
SAP_CONNECTION_TYPE=rfc
See RFC Setup Guide for prerequisites (SAP NW RFC SDK).
Generate .env from Service Key (JWT):
# Install the connection package globally (one-time setup)
npm install -g @mcp-abap-adt/connection
# Generate .env file from service key JSON
mcp-auth auth -k path/to/service-key.json
This will automatically create/update .env file with JWT tokens and connection details.
.env comments rule: only full-line comments are supported (lines that start with #).
Inline comments are not parsed, so keep comments on separate lines.
Claude recommendation: place the service key in the service-keys directory and use --mcp=<destination> (avoid manual JWT tokens).
Authentication:
--auth-broker - Force use of auth-broker (service keys), ignore .env file--auth-broker-path=<path> - Custom path for auth-broker service keys and sessions--browser-auth-port=<port> - Override OAuth browser callback port (default: 5000 for HTTP, 4000 for SSE, 4001 for stdio)--connection-type=<http|rfc> - SAP connection transport: http (default) or rfc (legacy systems)--unsafe - Enable file-based session storage (persists tokens to disk). By default, sessions are stored in-memory (secure, lost on restart)When --mcp=<destination> is specified, automatic fallback loading of ./.env is skipped.
Examples:
# Use auth-broker with file-based session storage (persists tokens)
mcp-abap-adt --auth-broker --unsafe
# Use auth-broker with in-memory session storage (default, secure)
mcp-abap-adt --auth-broker
# Custom path for service keys and sessions
mcp-abap-adt --auth-broker --auth-broker-path=~/prj/tmp/ --unsafe
See Client Configuration for complete configuration options.
AUTH_LOG_LEVEL=error|warn|info|debug — sets base log level for handler logger; DEBUG_AUTH_LOG=true also enables debug.HANDLER_LOG_SILENT=true — fully disables handler logging.DEBUG_CONNECTORS=true — verbose connection logging in high-level handlers.DEBUG_HANDLERS=true — enables verbose logs for selected read-only/system handlers.npm test
TEST_LOG_LEVEL=error|warn|info|debug — controls test logger verbosity (DEBUG_TESTS/DEBUG_ADT_TESTS/DEBUG_CONNECTORS force debug).TEST_LOG_FILE=/tmp/adt-tests.log — writes test logs to a file (best-effort).TEST_LOG_SILENT=true — disables test logging pipeline (console output muted).TEST_LOG_COLOR=true — adds colored/prefixed tags to test log lines.console.* in tests are routed through the test logger with a [test] prefix.npm run build
# Generate tool documentation
npm run docs:tools
# See tools/README.md for more developer utilities
Thank you to all contributors! See CONTRIBUTORS.md for the complete list.
Acknowledgment: This project was originally inspired by mario-andreschak/mcp-abap-adt. We started with the core concept and then evolved it into an independent project with our own architecture and features.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"mcp-abap-adt": {
"command": "npx",
"args": [
"mcp-abap-adt"
],
"env": {}
}
}
}claude mcp add mcp-abap-adt npx mcp-abap-adt