mcp-abap-adt
> [!WARNING]
> **This MCP server is no longer actively maintained.** SAP has released an official ABAP MCP server โ please use that instead:
> [SAP Official ABAP MCP](https://portal.hyperspace.tools.sap/hyperspace-ai/mcp-registry/com.sap.adt%2Fmcp)
> [!NOTE]
> **๐งช EVALUATION & LEARNING PROJECT - SAP INTERNAL**
>
> This project serves dual purposes at SAP:
> 1. **Evaluation Platform**: Test how Model Context Protocol (MCP) can support AI-assisted ABAP development
> 2. **Practical Tool**: Enable SAP colleagues to use standard AI coding assistants (Claude Code CLI, Cline, Cursor, etc.) for ABAP development tasks
>
> **Project Status:**
> - โ
Actively maintained and feature-complete for evaluation purposes
> - โ
Open to contributions from SAP internal teams
> - โ
Suitable for development and testing environments
> - โ ๏ธ Implementation is pragmatic and focused on capability exploration
> - โ ๏ธ Not intended for production business-critical operations
>
> **Origin**: Originally forked from [mario-andreschak/mcp-abap-adt](https://github.com/mario-andreschak/mcp-abap-adt), now evolved with additional capabilities for SAP internal development scenarios.
>
> **For AI Agents**: See [AGENTS.md](AGENTS.md) for comprehensive guidance on using this MCP server with AI coding assistants. Agent-specific quick reference files in the `agents/` folder:
>
> - **Cline**: [agents/.clinerules](agents/.clinerules)
> - **Claude Desktop**: [agents/CLAUDE.md](agents/CLAUDE.md)
> - **Cursor**: [agents/.cursorrules](agents/.cursorrules)
> - **OpenCode**: [agents/.opencoderules](agents/.opencoderules)
> - **All Others**: Use [AGENTS.md](AGENTS.md) directly
>
> Find an [Example AGENTS.md file](Example_AGENTS.md) for ABAP projects. Place it as AGENTS.md in the root folder of an ABAP project. See [agents.md](https://agents.md/) for reference.
>
> [Enhancement proposals for the MCP server are collected here.](Enhancement%20Proposal.md)
>
> Found a bug or have a feature request? Please check our [GitHub Issues](https://github.tools.sap/D020426/mcp-abap-adt/issues) page to report issues or request new features.
---
# mcp-abap-adt: Your Gateway to ABAP Development Tools (ADT)
[](CHANGELOG.md)
[](LICENSE)
[](https://modelcontextprotocol.io)
[](https://github.tools.sap/D020426/mcp-abap-adt/actions/workflows/ci.yml)
[](https://codecov.io/gh/D020426/mcp-abap-adt)
<a href="https://glama.ai/mcp/servers/gwkh12xlu7">
<img width="380" height="200" src="https://glama.ai/mcp/servers/gwkh12xlu7/badge" alt="ABAP ADT MCP server" />
</a>
A Model Context Protocol (MCP) server that provides AI coding assistants with direct access to SAP ABAP systems through ABAP Development Tools (ADT). Think of it as a bridge that lets tools like Cline, Claude Code CLI, and other MCP clients interact with your ABAP system to retrieve source code, analyze structures, run tests, and more.
## ๐ Table of Contents
1. [Key Features](#key-features)
2. [Quick Start](#quick-start)
3. [Prerequisites](#prerequisites)
4. [Installation and Setup](#installation-and-setup)
5. [Authentication Guide](#authentication-guide)
6. [Multi-System Configuration](#multi-system-configuration)
7. [LLM Access Setup (SAP Internal)](#llm-access-setup-sap-internal)
8. [AI Agent Integration](#ai-agent-integration)
9. [Available Tools & Resources](#available-tools--resources)
10. [Running the Server Manually](#running-the-server-manually)
11. [Docker Deployment](#docker-deployment)
12. [Troubleshooting](#troubleshooting)
13. [Contributing & Support](#contributing--support)
## Project Philosophy
This server balances three objectives:
1. **Exploration First**: Test what's possible with MCP in ABAP development contexts
2. **Practical Value**: Provide immediate utility for AI-assisted ABAP development
3. **Learning Platform**: Serve as a reference for building domain-specific MCP servers
Implementation philosophy:
- **Pragmatic over perfect**: Features may be straightforward rather than architected for scale
- **Capability focused**: Prioritize exploring what AI assistants need over production hardening
- **Community driven**: Feedback and contributions shape the server's evolution
This approach allows rapid iteration on MCP capabilities while delivering real value to developers.
## Key Features
- ๐ **Comprehensive ABAP Object Access**: Retrieve programs, classes (including local includes: CCIMP, CCDEF, CCMAC, CCAU), interfaces, functions, tables, structures, and more
- ๐ **RAP Development Support**: Full support for CDS views, behavior definitions, service bindings, metadata extensions, and access control
- ๐ **Transport & Version Control**: List transport requests, view version history, and compare object versions across transports
- ๐ฆ **Batch Query Operations**: Query multiple tables or CDS views in a single call with advanced filtering and pagination
- ๐งช **Testing & Quality Assurance**: Execute unit tests, analyze coverage, validate syntax, and find object usages
- ๐๏ธ **Class Management**: Create, modify, activate, and delete ABAP classes with full include support (main, definitions, implementations, macros, test classes)
- ๐ **RAP BO Analysis**: Comprehensive analysis of RAP Business Objects via cacheable MCP resources
- ๐ **Multi-System Support**: Configure and work with multiple SAP systems (DEV, QAS, PRD) simultaneously with easy system switching
- ๐ค **AI Agent Ready**: Optimized for Cline, Claude Code CLI, Cursor, OpenCode, and other MCP-compatible clients
- โ๏ธ **ABAP Cloud Compliant**: Built-in guidance for ABAP Cloud (Tier 1) development standards
> [!IMPORTANT]
> **ABAP Debugging Not Supported**
>
> This Node.js-based MCP server does **not** support ABAP debugging capabilities. ABAP debugging requires RFC (Remote Function Call) protocol, which is only available through SAP's native libraries (JCo for Java, NW RFC SDK for C/C++).
>
> **Need debugging?** Use the Java-based MCP server [ai-sap-abap-adt](https://github.wdf.sap.corp/sap-managed-tm-ewm/ai-sap-abap-adt) which includes SAP JCo and provides full debugging support including:
> - Setting/managing breakpoints
> - Step-by-step execution (step into, step over, step out)
> - Variable inspection and modification
> - Call stack analysis
## Quick Start
**For experienced developers** - get up and running in 5 minutes:
```bash
# 1. Clone the repository
git clone https://github.tools.sap/D020426/mcp-abap-adt.git
# For external contributors: git clone https://github.com/mario-andreschak/mcp-abap-adt.git
cd mcp-abap-adt
# 2. Install dependencies and build
npm install && npm run build
# 3. Configure SAP connection
# Single system (simple):
cat > .env << EOF
SAP_URL=https://your-sap-system.com:8000
SAP_CLIENT=100
EOF
# Multiple systems (advanced):
# Copy .sap-systems.example.json to .sap-systems.json and configure
# See docs/multi-system-configuration.md for details
# 4. Authenticate with SAP
# See docs/Authentication.md for detailed guide
#
# Quick options:
# - SSO (Recommended): Built-in browser SSO launches Chrome automatically
# Or call SapBrowserLogin tool to proactively authenticate
# - Basic Auth: Add SAP_USERNAME/SAP_PASSWORD to .env
# 5. Add to your MCP client configuration (see AI Agent Integration section)
# 6. Start coding with AI assistance!
```
๐ **First time with MCP servers?** Continue reading for detailed step-by-step instructions.
## Prerequisites
Before you begin, ensure you have:
### SAP ABAP System Access
- System URL (e.g., `https://my-sap-system.com:8000`)
- Valid username and password
- SAP client number (e.g., `100`)
- ADT services activated in transaction `SICF` (specifically `/sap/bc/adt`)
- For `GetTableContents`: Custom service `/z_mcp_abap_adt/z_tablecontent` ([setup guide](https://community.sap.com/t5/application-development-blog-posts/how-to-use-rfc-read-table-from-javascript-via-webservice/ba-p/13172358))
### Development Tools
- **Git**: [Download Git](https://git-scm.com/downloads) or [GitHub Desktop](https://desktop.github.com/)
- **Node.js & npm**: [Download Node.js LTS](https://nodejs.org/en/download/) (includes npm)
**Verify installation:**
```bash
node -v # Should show version number
npm -v # Should show version number
```
## Installation and Setup
### 1. Clone the Repository
**Using Git (command line):**
```bash
cd Desktop # Or your preferred directory
git clone https://github.tools.sap/D020426/mcp-abap-adt.git
cd mcp-abap-adt
```
**Using GitHub Desktop:**
1. Open GitHub Desktop
2. File โ Clone Repository
3. URL tab โ Paste repository URL
4. Choose local path โ Clone
### 2. Install Dependencies
```bash
npm install
```
This downloads all required libraries (may take a few minutes).
### 3. Build the Project
```bash
npm run build
```
This compiles TypeScript code into executable JavaScript.
### 4. Configure SAP Connection
Create a `.env` file in the root directory:
```bash
SAP_URL=https://your-sap-system.com:8000
SAP_CLIENT=100
```
โ ๏ธ **Important**: Never commit `.env` to version control - keep this file secure!
### 5. Authenticate with SAP System
The server supports two authentication methods that are automatically selected based on your configuration.
๐ **Complete authentication guide**: [docs/Authentication.md](docs/Authentication.md)
#### Quick Setup Options
**Option 1 - SSO Authentication (Recommended for Production)**:
Best for corporate SAP systems with SSO. Built-in browser SSO requires no extra setup.
1. Leave `SAP_USERNAME` and `SAP_PASSWORD` unset in `.env`
2. On first request, Chrome launches automatically for SSO login
3. Or call the `SapBrowserLogin` tool to proactively authenticate
4. Cookies are cached to `$TMPDIR/mcp-abap-adt/<domain>.json` with 12h TTL
5. 401/403 responses auto-retry with re-authentication
**Legacy alternative**: The external `sap-auth-mcp-main` MCP server still works as a fallback (see [Authentication Guide](docs/Authentication.md#sso-authentication-recommended))
**Option 2 - Basic Authentication (Recommended for Dev/Test)**:
Simple setup using username and password. Add to your `.env` file:
```bash
SAP_URL=https://your-sap-system.com:8000
SAP_CLIENT=100
SAP_USERNAME=your_username
SAP_PASSWORD=your_password
```
#### How Authentication Works
The server automatically detects and uses the best authentication method:
1. **If credentials exist** (`SAP_USERNAME` and `SAP_PASSWORD` in `.env`) โ Uses Basic Auth
2. **If SSO cookies exist** (legacy cookie file or `$TMPDIR/mcp-abap-adt/<domain>.json`) โ Uses cached SSO cookies
3. **If neither exists** โ Launches Chrome for built-in browser SSO on first request
You'll see which method is active in the console logs:
```
[Auth] Using SSO Authentication (cookies from tmp/sap_cookies.json)
```
or
```
[Auth] Using Basic Authentication (credentials)
```
## Authentication Guide
For complete authentication setup, troubleshooting, and best practices, see the comprehensive guide:
๐ **[Authentication Guide](docs/Authentication.md)**
The guide covers:
- Built-in browser SSO (primary) and legacy sap-auth-mcp setup
- Basic authentication configuration
- Cookie file locations and formats
- Re-authentication procedures
- Security best practices
- Troubleshooting authentication issues
- CSRF token handling
## Multi-System Configuration
Want to work with multiple SAP systems (DEV, QAS, PRD) simultaneously? The server supports configuring multiple systems in a single configuration file with easy system switching.
๐ **[Multi-System Configuration Guide](docs/multi-system-configuration.md)**
**Quick example:**
Create `.sap-systems.json` in the project root:
```json
{
"version": "1.0",
"default": "DEV",
"systems": {
"DEV": {
"name": "Development",
"url": "https://dev-sap.example.com:443",
"client": "100",
"auth": { "type": "basic", "username": "${SAP_DEV_USER}", "password": "${SAP_DEV_PASS}" }
},
"QAS": {
"name": "Quality",
"url": "https://qas-sap.example.com:443",
"client": "200",
"auth": { "type": "sso", "cookiePath": "./tmp/qas_cookies.json" }
}
}
}
```
**Key features:**
- Configure multiple systems with different authentication methods
- Set a default system and switch between them at runtime
- Use `system` parameter on any tool to target a specific system
- Supports both Basic Auth and SSO per system
- Environment variable interpolation with `${ENV_VAR}` syntax
**New tools:**
- `ListSystems` - View all configured systems
- `SetDefaultSystem` - Change the active system
- `GetSystemInfo` - Shows multi-system configuration and status
See the [complete guide](docs/multi-system-configuration.md) for configuration details, examples, and troubleshooting.
## LLM Access Setup (SAP Internal)
> **SAP Employees**: Before configuring MCP tools in your development environment, you must set up the Hyperspace AI Proxy to access LLM capabilities.
Most AI coding assistants (Cline, Claude Code CLI, Cursor, etc.) require LLM access to function. At SAP, this is provided through the Hyperspace AI Proxy.
### Setting Up Hyperspace AI Proxy
**Complete setup guide**: [Hyperspace AI Proxy Documentation](https://pages.github.tools.sap/hAIperspace/hai-docs/)
**Quick Overview:**
1. **Install the hai CLI** - Command-line tool for managing LLM proxy
2. **Configure your AI coding assistant** - Connect your tool (Cline, Claude Code, Cursor, etc.) to the proxy
3. **Start the proxy** - Run the proxy service before using AI tools
**Tool-Specific Guides:**
- **Claude Code CLI**: [Configure Claude Code with hai](https://pages.github.tools.sap/hAIperspace/hai-docs/llm-proxy/recipes/claude/)
- **Cline**: [Configure Cline with hai](https://pages.github.tools.sap/hAIperspace/hai-docs/llm-proxy/recipes/cline/)
- **Cursor**: [Configure Cursor with hai](https://pages.github.tools.sap/hAIperspace/hai-docs/llm-proxy/recipes/cursor/)
- **Other Tools**: Check the [Hyperspace documentation](https://pages.github.tools.sap/hAIperspace/hai-docs/) for additional integrations
โ ๏ธ **Complete this setup first** before proceeding to configure the MCP server in your AI tool. Without LLM access, your AI coding assistant won't function.
## AI Agent Integration
This MCP server integrates with various AI coding assistants. Choose your preferred tool:
### Cline (VS Code Extension)
Cline is a VS Code extension that uses MCP servers for AI-assisted development.
**Setup:**
1. **Install Cline** extension in VS Code
2. **Open Cline Settings:**
- VS Code Settings (Ctrl+,)
- Search "Cline MCP Settings"
- Click "Edit in settings.json"
3. **Add Server Configuration:**
```json
{
"mcpServers": {
"mcp-abap-adt": {
"command": "node",
"args": ["C:/PATH_TO/mcp-abap-adt/dist/index.js"],
"disabled": false,
"autoApprove": []
}
}
}
```
4. **Test Connection:**
- Server appears in "MCP Servers" panel
- Ask Cline to retrieve ABAP source code
- Verify it uses the MCP server tools
๐ **For detailed Cline integration**, see [docs/Cline_Integration_Guide.md](docs/Cline_Integration_Guide.md)
### Claude Code CLI (SAP Internal)
> **SAP Employees Only**: Claude Code CLI is officially approved for productive code development at SAP when used with the Hyperspace LLM Proxy.
Claude Code CLI provides a command-line interface for AI-assisted coding.
**Prerequisites:**
- Claude Code CLI must be installed
- **hai CLI** must be installed and configured
- See [official Claude Code CLI guide](https://pages.github.tools.sap/hAIperspace/hai-docs/llm-proxy/recipes/claude/) for complete LLM proxy setup
**Setup:**
1. **Open Claude Code Settings:**
Open file `.claude.json` in your user home folder in your default editor (note: it might be hidden, make sure to view hidden files)
2. **Add MCP Server Configuration:**
Add to the `mcpServers` section (or add the whole section to the root of the json):
```json
{
"mcpServers": {
"mcp-abap-adt": {
"command": "node",
"args": ["C:/PATH_TO/mcp-abap-adt/dist/index.js"],
"disabled": false
}
}
}
```
Replace `C:/PATH_TO/` with the actual path to your cloned repository.
3. **Start Coding:**
```bash
# Terminal 1: Start the proxy (if not already running)
hai proxy start
# Terminal 2: Launch Claude Code
claude
```
4. **Test Connection:**
- Server loads automatically when Claude Code starts
- Ask Claude to retrieve ABAP source code
- Verify it uses the MCP server tools
**Important Notes:**
- โ
Production ready when used with Hyperspace LLM Proxy
- โ
Only use Anthropic models (Haiku, Sonnet, Opus)
- โ ๏ธ Keep hai proxy running while using Claude Code CLI
- โ ๏ธ Use absolute paths in MCP configuration
- โ ๏ธ Do not login - use proxy authentication configured in settings.json
**Troubleshooting:**
- **MCP server not loading**: Check path in settings.json, ensure `npm run build` was executed
- **hai proxy issues**: Run `hai proxy status`, restart with `hai proxy start`
- **Configuration issues**: See [manual configuration guide](https://pages.github.tools.sap/hAIperspace/hai-docs/llm-proxy/recipes/claude/)
๐ **Complete documentation**: [Hyperspace LLM Proxy Claude Code CLI Guide](https://pages.github.tools.sap/hAIperspace/hai-docs/llm-proxy/recipes/claude/)
### Other AI Agents
This server works with any MCP-compatible client:
- **Cursor**: See [agents/.cursorrules](agents/.cursorrules)
- **OpenCode**: See [agents/.opencoderules](agents/.opencoderules)
- **Claude Desktop**: See [agents/CLAUDE.md](agents/CLAUDE.md)
- **Universal Guide**: See [AGENTS.md](AGENTS.md)
## Available Tools & Resources
### MCP Resources
Resources provide **cacheable, token-efficient** access to ABAP objects. Always prefer resources over tools when available.
| Resource URI | Description | Token Usage | Documentation |
| --------------------------------- | -------------------------------- | ----------- | --------------------------------------------------------------- |
| `abap://packages/top-level/names` | Lightweight package names list | ~5K | [TopLevelPackagesResource.md](docs/TopLevelPackagesResource.md) |
| `abap://packages/top-level` | Complete top-level packages | ~35K | [TopLevelPackagesResource.md](docs/TopLevelPackagesResource.md) |
| `abap://package/{name}` | Detailed package information | ~2-5K | [PackageResource.md](docs/PackageResource.md) |
| `rap-bo-analysis:///{bo_name}` | Complete RAP BO analysis | ~20-50K | [RAP_Analysis_Resource.md](docs/RAP_Analysis_Resource.md) |
| `abap://class/{name}` | ABAP class source code | Varies | [Resources.md](docs/Resources.md) |
| `abap://cds/{name}` | CDS view source and metadata | Varies | [Resources.md](docs/Resources.md) |
| `abap://table/{name}` | Database table structure | Varies | [Resources.md](docs/Resources.md) |
| `cds-view-data:///{name}?params` | CDS view data with filtering | Varies | [Resources.md](docs/Resources.md) |
| `agent-guide://auto` | Auto-detect agent-specific guide | ~15K | [AGENTS.md](AGENTS.md) |
๐ **Complete resource documentation**: [docs/Resources.md](docs/Resources.md)
### Core ABAP Object Retrieval
Retrieve source code and definitions from your ABAP system.
| Tool | Description | Documentation |
| -------------------- | ---------------------------------------------------- | --------------------------------------------------- |
| `GetProgram` | Retrieve ABAP program source code | [GetProgram.md](docs/GetProgram.md) |
| `GetClass` | Retrieve ABAP class source (supports local includes) | [GetClass.md](docs/GetClass.md) |
| `GetClassInclude` | Retrieve specific class include (CCIMP, CCDEF, etc.) | [GetClassInclude.md](docs/GetClassInclude.md) |
| `GetInterface` | Retrieve ABAP interface source code | [GetInterface.md](docs/GetInterface.md) |
| `GetInclude` | Retrieve ABAP include program source | [GetInclude.md](docs/GetInclude.md) |
| `GetFunction` | Retrieve function module source code | [GetFunction.md](docs/GetFunction.md) |
| `GetFunctionGroup` | Retrieve entire function group source | [GetFunctionGroup.md](docs/GetFunctionGroup.md) |
| `GetTable` | Retrieve database table structure and metadata | [GetTable.md](docs/GetTable.md) |
| `GetStructure` | Retrieve DDIC structure definitions | [GetStructure.md](docs/GetStructure.md) |
| `GetDomain` | Retrieve domain definitions with data types and values | [GetDomain.md](docs/GetDomain.md) |
| `GetDataElement` | Retrieve data element definitions with labels | [GetDataElement.md](docs/GetDataElement.md) |
| `GetTypeInfo` | Retrieve ABAP type information | - |
| `GetPackage` | Retrieve package details and contained objects | [GetPackage.md](docs/GetPackage.md) |
| `GetPackageContents` | List objects within a package | [GetPackageContents.md](docs/GetPackageContents.md) |
| `GetTransaction` | Retrieve transaction code details | [GetTransaction.md](docs/GetTransaction.md) |
| `SearchObject` | Search for ABAP objects using wildcards (e.g., `Z*`) | [SearchObject.md](docs/SearchObject.md) |
### Data Query & Analysis
Query table and CDS view data with advanced filtering and batch operations.
| Tool | Description | Documentation |
| -------------------- | -------------------------------------------------------------- | --------------------------------------------------- |
| `GetTableContents` | Query table data with filtering, pagination, and batch support | [GetTableContents.md](docs/GetTableContents.md) |
| `GetCDSViewContents` | Query CDS view data with parameters and filtering | [GetCDSViewContents.md](docs/GetCDSViewContents.md) |
**Key Features:**
- Advanced WHERE conditions (equality operator)
- Column selection and ordering
- Pagination with offset
- Batch queries (multiple tables/views in one call)
- Column metadata inclusion
### Transport & Version Control
Manage transport requests and track version history across your ABAP landscape. **NEW**: Improved tools with automatic task/request hierarchy handling, formatted output, and **direct version comparison**.
| Tool | Description | Documentation |
| --------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------- |
| `GetTransportVersions` โญ | **Quick analysis**: Combines transport + version analysis in one command | [GetTransportVersions.md](docs/GetTransportVersions.md) |
| `CompareObjectVersions` โญ | **Compare versions**: Shows exactly what changed between two versions (unified diff, side-by-side, or summary) | [CompareObjectVersions.md](docs/CompareObjectVersions.md) |
| `ListUserTransports` | List ALL transport requests for a user (modifiable + released) with optional date filtering | [ListUserTransports.md](docs/ListUserTransports.md) |
| `GetTransportRequest` | Show transport hierarchy, objects, and next steps (formatted output) | [GetTransportRequest.md](docs/GetTransportRequest.md) |
| `GetVersionHistory` | View version history with transport hierarchy guidance | [GetVersionHistory.md](docs/GetVersionHistory.md) |
**Key Capabilities:**
- **Direct version comparison** - see exact changes with unified diff, side-by-side, or summary formats
- **Automatic task/parent request hierarchy detection** - no manual investigation needed
- **Intelligent version filtering** - automatically skips test transports and untransported versions
- **Formatted, human-readable output** - clear hierarchy visualization with guided next steps
- **Complete workflow documentation** - see [TRANSPORT_WORKFLOWS.md](docs/TRANSPORT_WORKFLOWS.md)
- **Date-filtered transport listing** - efficiently find recent transports with `from_date` parameter (avoids token waste)
- Filter transport requests by user, status, and target system
- View detailed transport contents including all objects, tasks, and locks
- View complete version history including dates, authors, and transport numbers
- Support for classes, programs, function groups, interfaces, CDS views, and more
**Typical Workflows:**
*Quick Analysis (Recommended):*
1. `GetTransportVersions` - One command to analyze what changed in a transport
- Automatically handles task โ parent request hierarchy
- Finds the relevant version and suggests comparison
2. `CompareObjectVersions` - See exactly what changed (one command instead of manual diff)
- Choose format: unified (git diff), side-by-side, or summary
*Step-by-Step Analysis:*
1. `GetTransportRequest` - Understand transport hierarchy and see all objects
2. `GetVersionHistory` - View version history (look for parent request if analyzing a task)
3. `CompareObjectVersions` - Compare versions directly to see exact changes
*Finding Changes by User:*
1. `ListUserTransports` - Find ALL transports for a specific user (add `from_date` parameter for recent transports)
2. `GetTransportVersions` - Analyze each transport quickly
3. `CompareObjectVersions` - Review changes in detail
๐ **Complete Workflow Guide**: See [docs/TRANSPORT_WORKFLOWS.md](docs/TRANSPORT_WORKFLOWS.md) for:
- SAP transport hierarchy explanation (Request โ Task โ Objects)
- 4 step-by-step workflows with examples
- Common pitfalls and how to avoid them
- Version numbering patterns for different object types
### RAP Development Tools
Full support for RESTful ABAP Programming (RAP) development.
| Tool | Description | Documentation |
| ----------------------- | ---------------------------------------------------- | --------------------------------- |
| `GetCDSView` | Retrieve CDS view source code and annotations | [RAP_Tools.md](docs/RAP_Tools.md) |
| `GetBehaviorDefinition` | Retrieve RAP behavior definition source | [RAP_Tools.md](docs/RAP_Tools.md) |
| `GetServiceDefinition` | Retrieve RAP service definition source | [RAP_Tools.md](docs/RAP_Tools.md) |
| `GetServiceBinding` | Retrieve RAP service binding details | [RAP_Tools.md](docs/RAP_Tools.md) |
| `GetMetadataExtension` | Retrieve metadata extension (UI annotations) | [RAP_Tools.md](docs/RAP_Tools.md) |
| `GetAccessControl` | Retrieve access control (DCL) definition | [RAP_Tools.md](docs/RAP_Tools.md) |
| `GetBehaviorForRapBo` | Retrieve interface behavior for RAP Business Objects | [RAP_Tools.md](docs/RAP_Tools.md) |
| `SearchRapBo` | Search RAP Business Objects by description | [RAP_Tools.md](docs/RAP_Tools.md) |
๐ **Complete RAP tools documentation**: [docs/RAP_Tools.md](docs/RAP_Tools.md)
### Class Management Tools
Create, modify, and manage ABAP classes directly.
| Tool | Description | Documentation |
| ------------------ | ---------------------------------------------------- | ----------------------------------------------- |
| `CreateClass` | Create new ABAP class in local package ($TMP) | [CreateClass.md](docs/CreateClass.md) |
| `CreateClassTests` | Create or replace test classes within existing class | [CreateClassTests.md](docs/CreateClassTests.md) |
| `ActivateClasses` | Activate one or multiple ABAP classes | [ActivateClasses.md](docs/ActivateClasses.md) |
| `CheckSyntax` | Validate ABAP source code syntax | [CheckSyntax.md](docs/CheckSyntax.md) |
| `DeleteLocalClass` | Delete local ABAP class (Z/Y classes only) | [DeleteLocalClass.md](docs/DeleteLocalClass.md) |
**Typical Workflow:**
1. `CheckSyntax` - Validate class source code
2. `CreateClass` - Create the class (auto_activate: false)
3. `CheckSyntax` - Validate test source code
4. `CreateClassTests` - Add unit tests
5. `RunClassTests` - Execute tests
6. `ActivateClasses` - Activate after tests pass
๐ **Auto-activation guide**: [docs/AutoActivation.md](docs/AutoActivation.md)
### Testing & Quality Assurance
Execute tests, analyze coverage, validate quality, and ensure ABAP Cloud compliance.
| Tool | Description | Documentation |
| --------------------- | ----------------------------------------------------------------- | --------------------------------------------------- |
| `GetClassTests` | Retrieve local test classes from a class | [GetClassTests.md](docs/GetClassTests.md) |
| `RunClassTests` | Execute unit tests and retrieve results | [RunClassTests.md](docs/RunClassTests.md) |
| `RunPackageTests` | Execute tests for all objects in a package | [RunPackageTests.md](docs/RunPackageTests.md) |
| `GetClassCoverage` | Run tests and retrieve code coverage metrics | [GetClassCoverage.md](docs/GetClassCoverage.md) |
| `GetObjectUsages` | Find where-used list for ABAP objects (classes, interfaces, etc.) | [GetObjectUsages.md](docs/GetObjectUsages.md) |
| `GetClassUsages` | Find where ABAP classes are used (convenience wrapper) | [GetClassUsages.md](docs/GetClassUsages.md) |
**Coverage Targets:**
- RAP Behavior Implementation: 80% minimum, 90% target
- Business Logic Classes: 70% minimum, 85% target
- Utility/Helper Classes: 60% minimum, 75% target
## Running the Server Manually
Typically, you don't run this server standalone - it's integrated into MCP clients. However, you can run it manually for testing:
### Standalone Mode
```bash
npm run start
```
Server starts and waits for MCP client connections.
### Development/Debug Mode (with Inspector)
```bash
npm run dev
```
Opens MCP Inspector at `http://localhost:5173` for interactive testing.
**Using the Inspector:**
1. Open the URL in your browser
2. Click "Connect" on the left
3. Click "Tools" โ "List Tools"
4. Select a tool (e.g., GetProgram)
5. Enter parameters and test
## Docker Deployment
Deploy the MCP server using Docker for containerized environments.
### Build and Run
```bash
# Build the image
docker build -t mcp-abap-adt .
# Run with environment variables
docker run -d \
-e SAP_URL=https://your-sap-system.com:8000 \
-e SAP_USERNAME=your_username \
-e SAP_PASSWORD=your_password \
-e SAP_CLIENT=100 \
-p 5173:5173 \
mcp-abap-adt
```
### Using Docker Compose
Create `docker-compose.yml`:
```yaml
version: "3.8"
services:
mcp-abap-adt:
build: .
environment:
- SAP_URL=https://your-sap-system.com:8000
- SAP_USERNAME=your_username
- SAP_PASSWORD=your_password
- SAP_CLIENT=100
ports:
- "5173:5173"
```
Run with:
```bash
docker-compose up -d
```
๐ **Advanced configuration**: See [Dockerfile](Dockerfile)
## Troubleshooting
### Common Issues
**Node.js/npm not found:**
- Verify installation: `node -v` and `npm -v`
- Ensure Node.js is in your system PATH
- Reinstall Node.js if needed
**npm install fails:**
- Check internet connection
- Delete `node_modules` folder and retry
- Configure proxy if behind corporate firewall: [npm proxy settings](https://docs.npmjs.com/cli/v7/using-npm/config#proxy)
**MCP client doesn't connect:**
- Verify correct absolute path in client configuration
- Ensure server is built: `npm run build`
- Restart your MCP client (VS Code, etc.)
- Check server logs for errors
**SAP connection errors:**
- Verify credentials in `.env` file
- Ensure SAP system is accessible from your network
- Check user authorizations for ADT services
- Verify ADT services are active in transaction `SICF`
- For self-signed certificates, set `NODE_TLS_REJECT_UNAUTHORIZED=0` (development only!)
**Tool-specific issues:**
- Check tool documentation in `docs/` folder
- Verify object names and parameters
- Review error messages for specific guidance
### Getting Help
- ๐ **Documentation**: Check `docs/` folder for detailed guides
- ๐ **Bug Reports**: [GitHub Issues](https://github.tools.sap/D020426/mcp-abap-adt/issues)
- ๐ก **Feature Requests**: [Enhancement Proposals](Enhancement%20Proposal.md)
- ๐ **Changelog**: [CHANGELOG.md](CHANGELOG.md)
## Contributing & Support
### Contributing
We welcome contributions from SAP internal teams and external developers:
**For SAP Internal Contributors:**
1. **Report Issues**: Use [GitHub Issues](https://github.tools.sap/D020426/mcp-abap-adt/issues)
2. **Suggest Features**: Add to [Enhancement Proposals](Enhancement%20Proposal.md)
3. **Submit Code**: See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines (coming soon)
4. **Share Feedback**: Help us improve MCP capabilities for ABAP development
**Development Setup:**
```bash
# Install dependencies and setup hooks
npm install
# Run tests
npm test
# Run all checks (format, lint, typecheck, tests)
npm run validate
```
**CI/CD Configuration:**
The project uses GitHub Actions for continuous integration. Required GitHub secrets:
- `CODECOV_TOKEN` (optional): Token for uploading test coverage to Codecov
- Get from: https://codecov.io/
- If not configured, coverage upload will be skipped but builds will still succeed
- Set in repository Settings โ Secrets and variables โ Actions
**For External Contributors:**
- This fork focuses on SAP-internal evaluation scenarios
- For the upstream project, see [mario-andreschak/mcp-abap-adt](https://github.com/mario-andreschak/mcp-abap-adt)
- Feature contributions welcome that enhance MCP evaluation capabilities
**Project Goals:**
- Explore how MCP can improve AI-assisted ABAP development
- Serve as a reference implementation for MCP server development
- Enable practical use of AI coding assistants for ABAP tasks
### Documentation
- **AI Agent Guide**: [AGENTS.md](AGENTS.md) - Comprehensive guide for AI coding assistants
- **Agent-Specific Guides**: `agents/` folder - Optimized guides for specific AI agents
- **Tool Documentation**: `docs/` folder - Detailed documentation for each tool
- **Example Project**: [Example_AGENTS.md](Example_AGENTS.md) - Sample AGENTS.md for ABAP projects
### Standards & Best Practices
- **ABAP Standards**: [docs/ABAP_Standards.md](docs/ABAP_Standards.md)
- **CDS Performance**: [docs/CDS_View_Performance.md](docs/CDS_View_Performance.md)
- **RAP Development**: [docs/RAP_Tools.md](docs/RAP_Tools.md)
### Version Information
- **Current Version**: 1.1.0
- **License**: MIT
- **Changelog**: [CHANGELOG.md](CHANGELOG.md)
---
_This MCP server bridges the gap between AI coding assistants and SAP ABAP systems, enabling intelligent, context-aware development workflows._
TDQS
Scored across 65 tools
Most tools are distinct by ABAP object type and action, but several overlaps exist: GetClassCoverage vs RunClassTests both run unit tests, GetClassTests vs GetClassInclude both expose test classes, GetObjectUsages vs the deprecated GetClassUsages are redundant, and transport/version tools (GetVersionHistory, GetTransportVersions, GetTransportRequest) have intersecting purposes. Descriptions help, but boundaries are occasionally blurry.
The dominant pattern is PascalCase Verb+Object (GetProgram, CreateClass, ExportClassToFile, RunClassTests), which is predictable and readable. Minor deviations include SapBrowserLogin (starts with a noun phrase) and RunATC (verb+acronym), but the set is largely consistent.
With 65 tools, this server far exceeds the ideal 3โ15 range and lands in the extreme-mismatch category (50+ tools). Even for a broad ADT integration, the volume creates significant choice overload for an agent selecting among many similar read, export, and test tools.
The surface covers a wide lifecycle: read/search objects, create/replace, activate, export/import, run tests/ATC, inspect transports, compare versions, and check syntax. Minor gaps remain around delete/update for non-class artifacts and a few specialized administrative operations, but core development workflows are well supported.