abap-adt-mcp

buettnerjulian/abap-adt-mcp

3.2

If you are the rightful owner of abap-adt-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This Model Context Protocol (MCP) server enhances ABAP development by integrating modern tools with SAP systems.

Tools
5
Resources
0
Prompts
0

ABAP ADT MCP Server

Note: This repository is an AI-assisted creation, combining and enhancing features from the original implementations.


🌟 Overview

Transform your ABAP development workflow with this Model Context Protocol (MCP) server. Designed to bridge the gap between modern development tools and SAP ABAP systems, this server provides comprehensive access to ABAP Development Tools (ADT) REST APIs.

✨ Key Capabilities

  • Source Code Access - Retrieve classes, programs, functions, and includes
  • 📊 Data Dictionary Integration - Explore tables, structures, and type definitions
  • 🔎 Smart Search & Analysis - Find objects and analyze dependencies
  • 📈 Runtime Insights - Access traces and runtime dump analysis
  • 🎯 Developer-Friendly - Seamless integration with modern IDEs

🏗️ Architecture Overview

This server implements a modular handler architecture where each ABAP operation is managed by dedicated handlers located in src/handlers/. The central registry (src/toolDefinitions.ts) orchestrates tool mappings, schemas, and descriptions.

📂 Handler Categories

🧩 Core ABAP Objects
HandlerPurposeKey Features
GetClassABAP class retrievalComplete source code with metadata
GetProgramReport program accessFull program source and structure
GetFunctionFunction module detailsInterface and implementation code
GetFunctionGroupFunction group managementGroup structure and includes
GetIncludeInclude program accessShared code components
GetInterfaceInterface definitionsContract specifications
📚 Data Dictionary (DDIC)
HandlerPurposeKey Features
GetTableTable structure analysisField definitions and metadata
GetStructureStructure definitionsType hierarchies
GetDDIC_CDSCDS view accessModern view definitions
GetDDIC_DataElementsElement metadataBase type information
GetDDIC_DomainsDomain specificationsValue constraints
🔍 Search & Analysis
HandlerPurposeKey Features
SearchObjectQuick object discoveryPattern-based searching
GetWhereUsedDependency analysisUsage relationship mapping
API_ReleasesRelease informationVersion compatibility data
🏢 System Integration
HandlerPurposeKey Features
GetPackagePackage managementOrganizational structure
GetTransactionTransaction detailsT-code information
GetMessageClassMessage handlingError and info messages
📊 Runtime Analysis
HandlerPurposeKey Features
DataPreviewLive data inspectionReal-time table/view data
GetRuntimeDumpsError analysisSystem failure diagnostics
GetABAPTracesPerformance monitoringExecution trace analysis

🚀 Quick Start Guide

Prerequisites Checklist ✅

Before diving in, ensure you have:

  • SAP ABAP System Access

    • System URL (e.g., https://sap-system.company.com:44300)
    • Valid credentials (username/password)
    • Client number (e.g., 100)
    • ADT services activated in SICF transaction
  • Development Environment

🛠️ Installation Methods

Step 1: Repository Setup

Choose your preferred method to get the source code:

# Via Git command line
git clone https://github.com/buettnerjulian/abap-adt-mcp.git
cd abap-adt-mcp

# Or download and extract ZIP from GitHub

Step 2: Dependency Installation

# Install all required packages
npm install

# Build the TypeScript project
npm run build

Step 3: Environment Configuration

Create a .env file in the project root with your SAP system details:

# SAP System Configuration
SAP_URL=https://your-sap-system.com:44300
SAP_USERNAME=your_username
SAP_PASSWORD="your_password"  # Use quotes if password contains special characters
SAP_CLIENT=100

# Optional: Skip TLS verification for development
# NODE_TLS_REJECT_UNAUTHORIZED=0

🔐 Security Note: Never commit your .env file to version control. It's already included in .gitignore.


🏃‍♂️ Running the Server

Development Mode (Recommended for Testing)

Launch the server with the MCP Inspector for interactive testing:

npm run dev

This opens a browser interface at http://localhost:6274 where you can:

  • Test individual tools
  • Inspect requests/responses
  • Debug connection issues

Production Mode

For integration with MCP clients:

npm run start

The server runs in headless mode, ready for client connections.


�️ Troubleshooting Guide

Common Issues & Solutions

❌ Node.js Installation Problems
# Verify installation
node -v  # Should show version number
npm -v   # Should show version number

# If missing, download from https://nodejs.org
❌ Build Failures
# Clean and rebuild
rm -rf node_modules dist
npm install
npm run build
❌ SAP Connection Issues
  1. Check ADT Services

    • Verify /sap/bc/adt is active in SICF
    • Test URL in browser: https://your-sap-system.com:8000/sap/bc/adt/discovery
  2. Authentication Problems

    • Verify credentials in .env
    • Test with SAP GUI login
    • Check client number
  3. SSL/Certificate Issues

    # For development only - disable TLS verification
    export NODE_TLS_REJECT_UNAUTHORIZED=0
    
❌ General Integration Problems
  1. Permission Issues

    • Ensure file permissions allow execution
    • Check antivirus software blocking
  2. Manual Testing

    # Test server directly
    npx @modelcontextprotocol/inspector node dist/index.js
    

🙏 Acknowledgments

This project builds upon the work from:


📄 License

MIT License - see file for details.


Happy ABAP Development! 🎯