mcp-rap-migrator

mcp-rap-migrator

MCP server that migrates SAP Module Pool programs to RAP applications interactively, using AI and SAP ADT REST APIs with human approval at each step.

Category
Visit Server

README

mcp-rap-migrator

AI Agent that migrates SAP Module Pool programs → RAP applications, interactively.

Built on MCP (Model Context Protocol) + Anthropic Claude + SAP ADT REST APIs.


Architecture

Human Developer
    ↕ approves every step
Orchestrator Agent (Claude claude-sonnet-4-6)
    ↕ system prompt = MIGRATION_GUIDE.md (loaded once, token-efficient)
mcp-rap-migrator (THIS server) — write/transform tools
    ↕ delegates read-only calls to
mcp-abap-adt (mario-andreschak) — GetProgram, GetInclude, SearchObject
    ↕ both call
SAP ADT REST API  /sap/bc/adt/
    ↕
SAP ABAP System (S/4HANA or BTP ABAP)

Why TWO MCP servers?

Server Responsibility Reason
mcp-abap-adt Read: GetProgram, GetClass, SearchObject Already built, battle-tested, reuse it
mcp-rap-migrator (this) Write + Transform: analyze, generate, write, activate New — wraps ADT write APIs + AI code generation

Tools (this server)

Tool Purpose Step
analyze_module_pool Read + parse Module Pool → structured JSON 1
generate_rap_skeleton JSON analysis → CDS/BDef/Impl ABAP code strings 2
human_checkpoint MANDATORY gate — shows human: what got, analysis, next action Every step
create_transport Create Workbench Transport Request in SAP 3
write_abap_object PUT one ABAP object source via ADT REST 4
validate_and_activate Activate objects, return syntax errors 5

Token Efficiency Design

  • MIGRATION_GUIDE.md loaded once as system prompt — not re-sent every call
  • analyze_module_pool returns compact JSON (not raw ABAP source)
  • human_checkpoint shows only first 30 lines of code previews
  • Errors: only the error message, not the full XML response body
  • CSRF token reused across calls — not re-fetched every request

Prerequisites

  1. SAP system with /sap/bc/adt active in SICF
  2. Also install: mcp-abap-adtnpx -y @smithery/cli install @mario-andreschak/mcp-abap-adt --client cline
  3. Node.js 20+ and npm

Setup

git clone <this-repo>
cd mcp-rap-migrator
npm install
npm run build
cp .env.example .env
# Edit .env with your SAP credentials

Configure in Cline / Claude Desktop

{
  "mcpServers": {
    "mcp-abap-adt": {
      "command": "node",
      "args": ["C:/PATH/mcp-abap-adt/dist/index.js"],
      "env": {
        "SAP_URL": "https://your-sap.com:8000",
        "SAP_USERNAME": "user",
        "SAP_PASSWORD": "pass",
        "SAP_CLIENT": "100"
      }
    },
    "mcp-rap-migrator": {
      "command": "node",
      "args": ["C:/PATH/mcp-rap-migrator/dist/index.js"],
      "env": {
        "SAP_URL": "https://your-sap.com:8000",
        "SAP_USERNAME": "user",
        "SAP_PASSWORD": "pass",
        "SAP_CLIENT": "100"
      }
    }
  }
}

Usage

In Cline or Claude Code, with MIGRATION_GUIDE.md loaded as system prompt:

Migrate the module pool program SAPMZ_DEMO to RAP. 
Use package ZMIGRATED and prefix ZR_.

The agent will:

  1. Analyze the program → show you what it found → ask permission
  2. Generate all RAP objects → show code preview → ask permission
  3. Create a transport → write each object one-by-one → checkpoint each
  4. Activate all → show results → checkpoint

You control every step.

Extending

Add new tools in src/tools/ and register them in src/index.ts.

Ideas:

  • generate_odata_service — expose the RAP BO as an OData V4 service
  • run_atc_check — run ABAP Test Cockpit on generated objects
  • compare_behavior — run both old + new, compare DB results

mcp-rap-migrator

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured