Skip to main content
Glama
RJTechRamjee

ABAP Transport Analyzer MCP Server

by RJTechRamjee

AI-Powered ABAP Transport Analyzer - MCP Server

An intelligent Model Context Protocol (MCP) server that automates SAP transport code review, change analysis, and risk detection using the SAP ADT (ABAP Development Tools) REST API.

Features

  • Transport Metadata Retrieval - Fetch transport request details, owner, status, and object list

  • Automated Code Diff Analysis - Generate unified diffs for ABAP objects (Classes, Reports, Interfaces, Function Modules)

  • Risk Detection - Identify security risks, breaking changes, and code quality issues

  • Natural Language Summaries - LLM-optimized structured analysis reports

  • Version Management - Compare active code against previous versions from SAP

  • Error Handling - Graceful handling of authorization, network, and parsing errors

Related MCP server: SAP Released Objects Server

Prerequisites

  • Node.js 18+

  • SAP S/4HANA system with ADT enablement (SAP Note 2162659 or later)

  • SAP User Account with authorizations:

    • S_TRANSPRT (Transport Management)

    • S_DEVELOP (ABAP Development)

  • Environment Variables for SAP connection (see Configuration section)

Installation

1. Clone or Download Project

git clone <repository-url>
cd my-abap-mcp-server

2. Install Dependencies

npm install

3. Configure Environment

Copy .env.example to .env and update with your SAP system details:

cp .env.example .env

Edit .env:

SAP_HOST=https://your-sap-system.example.com:44300
SAP_CLIENT=100
SAP_USER=your_abap_user
SAP_PASSWORD=your_secure_password

4. Build TypeScript

npm run build

5. Start the Server

# Development mode (with auto-reload)
npm run dev

# Production mode
npm start

Configuration

Environment Variables

Variable

Description

Example

Required

SAP_HOST

Full URL to SAP S/4HANA system with ADT enabled

https://saphana.corp.com:44300

✅ Yes

SAP_CLIENT

SAP client number

100

Optional (default: 100)

SAP_USER

ABAP user with S_TRANSPRT and S_DEVELOP auth

DEVELOPER01

✅ Yes

SAP_PASSWORD

User password (store securely in vault for production)

P@ssw0rd123

✅ Yes

SSL Certificate Handling

If your SAP system uses self-signed certificates, the server currently accepts them. For production, replace the HTTPS agent configuration in src/index.ts:

// Current (development only)
httpsAgent: new https.Agent({ rejectUnauthorized: false })

// For production with trusted CA
httpsAgent: new https.Agent({ 
  ca: fs.readFileSync('/path/to/ca-bundle.pem')
})

Available Tools

1. get_transport_metadata

Retrieves transport request header information and object list.

Input:

{
  "transportId": "S4HK900123"
}

Output:

{
  "transportId": "S4HK900123",
  "description": "Fix pricing calculation in SD module",
  "owner": "ABAPDEV",
  "status": "Released",
  "createdDate": "2026-06-28T10:30:00Z",
  "targetSystem": "PROD",
  "objectCount": 3
}

2. analyze_transport_changes

Performs detailed code diff analysis and risk assessment for all objects in a transport.

Input:

{
  "transportId": "S4HK900123"
}

Output: Markdown-formatted report including:

  • Executive summary (objects analyzed, risk counts)

  • Per-object change analysis with diffs

  • Risk factor classification (HIGH/MEDIUM/LOW)

  • Recommendations and mitigation steps

Usage Examples

Integrate with Claude or other LLM

# Example with Claude API
import anthropic

client = anthropic.Anthropic()

response = client.messages.create(
  model="claude-3-5-sonnet-20241022",
  max_tokens=2048,
  tools=[
    {
      "name": "get_transport_metadata",
      "description": "Get transport request metadata",
      "input_schema": { ... }
    },
    {
      "name": "analyze_transport_changes",
      "description": "Analyze code changes in transport",
      "input_schema": { ... }
    }
  ],
  messages=[
    {
      "role": "user",
      "content": "What changed in transport S4HK900123?"
    }
  ]
)

Direct CLI Usage (with jq)

# Test connection
curl -X POST http://localhost:3000/tools/get_transport_metadata \
  -H "Content-Type: application/json" \
  -d '{"transportId": "S4HK900123"}'

Supported ABAP Object Types

The analyzer extracts and analyzes these ABAP object types:

  • CLAS - ABAP Classes

  • PROG - ABAP Reports/Programs

  • INTF - ABAP Interfaces

  • FUGR - Function Groups

  • FUNC - Function Modules

  • TABL - Database Tables (schema changes)

  • VIEW - Database Views

  • TYPE - Type Definitions

  • ENPD - Enhancement Points

  • ENHS - Enhancements

Risk Detection Rules

The analyzer identifies the following risk categories:

HIGH Severity

  • Missing AUTHORITY-CHECK for database modification operations (INSERT/UPDATE/DELETE)

  • API breaking changes (visibility changed to PRIVATE)

  • Modifications to standard SAP objects

MEDIUM Severity

  • Hardcoded numeric values or hex constants

  • Significant code deletions (>20 lines, >70% of changes)

  • New external method/function calls with potential dependency issues

LOW Severity

  • Code style improvements

  • Comment updates

API Error Responses

Error

Status

Cause

Solution

Authorization Failed

401

Invalid credentials or insufficient SAP authorization

Verify SAP user has S_TRANSPRT, S_DEVELOP authorities

Transport Not Found

404

Transport ID doesn't exist or is not accessible

Confirm transport ID is correct and released

XML Parse Error

500

ADT response format unexpected

Check SAP system release compatibility

Timeout

504

SAP backend unresponsive (>15s)

Check SAP system health, retry request

Testing

Run the test suite:

# Run all tests
npm test

# Run with coverage
npm test -- --coverage

# Run specific test file
npm test -- tests/mcp-server.test.ts

# Watch mode (auto-rerun on file changes)
npm test -- --watch

Logging

The server writes debug logs to debug.log in the project root. This file is NOT part of the MCP protocol output to prevent corruption.

Monitor logs in real-time:

# On Windows PowerShell
Get-Content debug.log -Wait -Tail 20

# On macOS/Linux
tail -f debug.log

Logs include:

  • Transport metadata parsing details

  • XML structure analysis

  • Object extraction trace

  • HTTP request/response summaries

Deployment

Docker

Build and run in a Docker container:

docker build -t abap-mcp-server .
docker run -e SAP_HOST=https://... -e SAP_USER=... -e SAP_PASSWORD=... abap-mcp-server

Kubernetes

Deploy to K8s cluster (see k8s-deployment.yaml):

kubectl apply -f k8s-deployment.yaml

Cloud Platforms

  • AWS Lambda - Package with Layers for node_modules

  • Azure Functions - Use Node.js runtime

  • Google Cloud Run - Containerize and deploy

Development

Project Structure

my-abap-mcp-server/
├── src/
│   └── index.ts                 # Main MCP server implementation
├── tests/
│   ├── mcp-server.test.ts       # TypeScript unit tests
│   └── mcp-server.test.js       # JavaScript unit tests
├── dist/                        # Compiled JavaScript (generated)
├── .env.example                 # Environment template
├── package.json                 # Dependencies & scripts
├── tsconfig.json                # TypeScript configuration
├── jest.config.js               # Test runner configuration
├── nodemon.json                 # Auto-reload configuration
└── README.md                    # This file

Build Commands

# Compile TypeScript to JavaScript
npm run build

# Start development server with auto-reload
npm run dev

# Run production server
npm start

# Run tests
npm test

Code Style

  • Language: TypeScript with strict mode enabled

  • Formatting: Follows Node.js conventions

  • Linting: (TODO: Add ESLint)

Troubleshooting

Connection Issues

Problem: "Missing SAP connection credentials in .env file"

Solution:

  • Verify .env file exists in project root

  • Check all required variables are set: SAP_HOST, SAP_USER, SAP_PASSWORD

  • Ensure no trailing spaces or quotes in .env values

Problem: "Authorization Failed: Invalid SAP credentials"

Solution:

  • Verify SAP user password is correct

  • Check user has S_TRANSPRT and S_DEVELOP authorizations

  • In SAP, go to SUIM transaction and verify role assignments

Problem: "Transport Not Found: Transport ID does not exist"

Solution:

  • Confirm transport ID is spelled correctly (case-sensitive in some systems)

  • Verify transport is released (check status in SE10/SE09)

  • Ensure user has authorization to view the transport

Performance Issues

Problem: Analysis takes >5 seconds per object

Solutions:

  • Check SAP system performance (SE30, SM50)

  • Verify network latency to SAP system (ping test)

  • Consider implementing caching for frequently accessed transports

  • Analyze smaller transports first (split large ones)

XML Parsing Errors

Problem: "Failed to parse XML response for transport"

Solution:

  • Check debug.log for the actual XML structure returned

  • Verify SAP system release (S/4HANA 2020 or later recommended)

  • Review SAP Note 2162659 for ADT configuration

Security Considerations

⚠️ Important Security Notes:

  1. Credential Management

    • Never commit .env file to version control

    • Use environment variables or secret vaults in production

    • Rotate SAP credentials regularly

    • Use OAuth2 if available (future enhancement)

  2. Data Privacy

    • ABAP source code retrieved may contain sensitive business logic

    • Ensure logs are protected with appropriate access controls

    • Only share diffs with authorized personnel

    • Consider data classification policies before transmission

  3. Network Security

    • Always use HTTPS for SAP connections

    • Validate SSL certificates in production (not disabled)

    • Firewall restrict access to MCP server endpoints

    • Implement rate limiting for production use

  4. Authorization

    • Audit user access to transports regularly

    • Limit MCP server access to authorized LLM agents

    • Monitor for suspicious transport analysis patterns

    • Log all tool invocations for compliance

Roadmap

  • Support for multiple SAP systems (multi-tenant)

  • OAuth2 authentication support

  • Transport comparison (side-by-side analysis)

  • Caching layer for performance optimization

  • Advanced risk rules (custom, configurable)

  • Batch transport analysis

  • HTML/PDF report generation

  • Slack/Teams integration for alerts

  • Kubernetes Helm charts

  • Performance metrics & monitoring (Prometheus)

Support & Contribution

  • Issues: Report bugs via GitHub Issues

  • Questions: Open Discussions tab

  • Contributions: See CONTRIBUTING.md for guidelines

  • License: ISC

References


Last Updated: 2026-07-05
Version: 1.0.0
Maintainer: ABAP Development Team

Available Tools

2 tools
analyze_transport_changesA

Performs detailed analysis of transport changes: generates unified diffs for all objects, detects risk factors (missing auth checks, hardcoded values, breaking changes), and provides LLM-optimized structured analysis. Implements FR-2 and FR-3 requirements.

ParametersJSON Schema
NameRequiredDescriptionDefault
transportIdYesThe Workbench Transport Request number (e.g., DEVK900123)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description must fully disclose behavior. It does state that the tool generates diffs, detects risk factors, and provides structured analysis, which are key behaviors. However, it doesn't explicitly state whether the tool is read-only or if any prerequisites exist, or what the exact output format is beyond 'structured analysis', leaving some ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences and front-loaded with the primary action. The first sentence is dense but packs the main details, while the second sentence about FR-2/FR-3 is extra context that adds traceability but is not essential; overall it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description does a good job of describing what the tool does and what it returns (diffs, risk factors, structured analysis). It lacks some specifics like one might expect, but for a single-parameter tool, the coverage is quite thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema fully describes the single parameter transportId with an example format (e.g., DEVK900123), achieving 100% schema coverage. The description does not add any additional parameter semantics, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Performs' and identifies the resource as 'transport changes', then details the exact analyses performed (unified diffs, risk factors, structured analysis). This clearly distinguishes it from the sibling tool get_transport_metadata, which likely only fetches metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly states that the tool performs 'detailed analysis' and lists specific outputs, implying it should be used when deep analysis is needed. It doesn't explicitly mention when to use the sibling tool, but the contrast with get_transport_metadata is clear from the name and the 'detailed analysis' phrasing, providing clear context without exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_transport_metadataB

Retrieves transport request metadata including description, owner, status, and complete list of modified objects. Implements FR-1 requirements.

ParametersJSON Schema
NameRequiredDescriptionDefault
transportIdYesThe Workbench Transport Request number (e.g., DEVK900123)

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden. It uses 'Retrieves' to imply read-only behavior and enumerates the returned data, which is useful. However, it does not disclose potential side effects, authorization needs, rate limits, or edge cases, and the 'Implements FR-1 requirements' line adds no behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences and front-loaded with the primary purpose. The first sentence is direct and informative. The second sentence ('Implements FR-1 requirements') is peripheral project context but does not materially bloat the description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has low schema complexity and no output schema, so the description partially compensates by listing return content. However, it does not explain how it differs from the sibling tool, and the absence of any usage guidance leaves a notable completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides full documentation for the single parameter (transportId) with a format example (DEVK900123). Since schema description coverage is 100%, the description adds no additional parameter semantics, matching the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Retrieves transport request metadata' and lists specific data items (description, owner, status, complete list of modified objects). It identifies a specific verb and resource, but does not explicitly differentiate from the sibling tool 'analyze_transport_changes', which could also involve modified objects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling tool. The description does not include any exclusions, prerequisites, or alternative recommendations, leaving the agent without clear selection criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedanalyze_transport_changes
    • First observedget_transport_metadata

TDQS

A3.7/5.0
Disambiguation5/5

The two tools are clearly distinct: one retrieves metadata (description, owner, status, objects), the other performs deep change analysis (diffs, risk factors). There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow the same verb_noun pattern: get_transport_metadata and analyze_transport_changes. The verbs are specific and consistent, making the naming predictable and readable.

Tool Count3/5

With only 2 tools, the server feels slightly thin. While each tool is meaningful and covers a distinct aspect of transport analysis, the count is at the low end of what is typically expected for a tool server.

Completeness5/5

For the stated purpose of analyzing ABAP transports, the two tools cover the full workflow: retrieving metadata and performing detailed change analysis with risk detection. There are no obvious gaps for this narrow domain.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

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/RJTechRamjee/my-abap-mcp-server'

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