Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ABAP MCPgenerate a CDS view for sales order header with customer join"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ABAP MCP – AI-Powered SAP Development
An ABAP Model Context Protocol (MCP) server that brings AI-driven coding assistance to SAP ABAP development. Works with VS Code Copilot, Claude Desktop, Cursor, and any MCP-compatible client. Supports multiple LLM backends including GitHub Copilot, OpenAI, Anthropic Claude, Azure OpenAI, and local models via Ollama.
Architecture
┌──────────────────────────────────────────────────────────────────┐
│ VS Code / IDE │
│ │
│ ┌─────────────────────┐ ┌──────────────────────────────────┐ │
│ │ GitHub Copilot Chat│ │ MCP Client (Claude Desktop, │ │
│ │ @abap participant │ │ Cursor, etc.) │ │
│ └──────────┬──────────┘ └──────────────┬───────────────────┘ │
│ │ │ │
│ ┌──────────▼──────────────────────────────▼───────────────────┐ │
│ │ VS Code Extension (abap-mcp-copilot) │ │
│ │ • Copilot @abap chat agent │ │
│ │ • MCP client wrapper │ │
│ │ • Editor commands (analyze, format) │ │
│ └──────────────────────────┬────────────────────────────────--┘ │
└─────────────────────────────│────────────────────────────────────┘
│ stdio / SSE
┌─────────────────────────────▼────────────────────────────────────┐
│ ABAP MCP Server (Node.js) │
│ │
│ Tools: Resources: │
│ • abap_analyze • abap://syntax-reference │
│ • abap_generate • abap://best-practices │
│ • abap_explain │
│ • abap_refactor │
│ • abap_search ◄──────── SAP ADT REST API │
│ • abap_unit_test │
│ • abap_format │
│ • abap_docs │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Generic LLM Provider Layer │ │
│ │ ┌──────────┐ ┌──────────┐ ┌────────────┐ ┌─────────────┐ │ │
│ │ │ OpenAI │ │Anthropic │ │Azure OpenAI│ │ Ollama │ │ │
│ │ │ GPT-4o │ │ Claude │ │ GPT-4o │ │ CodeLlama │ │ │
│ │ └──────────┘ └──────────┘ └────────────┘ └─────────────┘ │ │
│ │ ┌────────────────┐ │ │
│ │ │ GitHub Copilot │ │ │
│ │ └────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘Features
MCP Tools
Tool | Description |
| Deep code analysis: syntax, performance, security, Clean ABAP, cyclomatic complexity. Optionally integrates SAP Code Inspector via ADT. |
| Generate production-ready ABAP from natural language – classes, CDS views, RAP behaviors, OData services, unit tests, and more. |
| Plain-English explanation of any ABAP code. Adjustable audience level (beginner → expert). Optional line-by-line annotations. |
| Refactor towards Clean ABAP: extract methods, modernize syntax, improve naming, add error handling, convert to OOP. |
| Search ABAP repository objects in a connected SAP system (requires ADT credentials). |
| Generate ABAP Unit Test classes using ABAP Unit + Test Double Framework. Optionally run existing tests via ADT. |
| Format code: 2-space indentation, uppercase keywords, replace deprecated syntax ( |
| Comprehensive documentation for ABAP keywords, statements, classes, and SAP concepts with version-specific notes. |
MCP Resources
Resource URI | Content |
| ABAP data types, modern 7.4+ syntax, constructor expressions, string templates |
| Clean ABAP naming, DB access patterns, exception design, unit testing |
VS Code Extension (@abap Copilot Agent)
Use @abap in Copilot Chat with these slash commands:
@abap /analyze ← analyze the current file
@abap /generate a CDS view for sales order header with customer join
@abap /explain ← explain selected code or whole file
@abap /refactor ← clean up current file
@abap /test ← generate unit tests for current class
@abap /docs FOR ALL ENTRIES
@abap /format ← format and fix deprecated syntax
@abap how do I implement a BAdi? ← free-form ABAP questionLLM Providers
Provider | Config | Notes |
GitHub Copilot |
| Uses your existing Copilot subscription via VS Code |
OpenAI |
| GPT-4o recommended |
Anthropic |
| Claude Sonnet 4.6 recommended |
Azure OpenAI |
| Enterprise deployments |
Ollama |
| Local inference with CodeLlama, DeepSeek-Coder |
Quick Start
1. Install dependencies
npm install2. Configure environment
cp config/example.env .env
# Edit .env with your LLM credentials and optional SAP connection3. Build and run
npm run build
npm start # stdio mode (for Claude Desktop / Cursor)4. Connect to Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"abap": {
"command": "node",
"args": ["/path/to/ABAP_MCP/dist/server/index.js"],
"env": {
"LLM_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-..."
}
}
}
}5. Install the VS Code Extension
cd vscode-extension
npm install
npm run compile
# Press F5 to launch Extension Development Host, or package with vsceThen in VS Code settings, configure:
{
"abapMcp.llmProvider": "copilot",
"abapMcp.sapBaseUrl": "https://your-sap-system:8000",
"abapMcp.sapUser": "DEVELOPER"
}SAP System Connection (Optional)
The SAP connection uses the ABAP Development Tools (ADT) REST API, available on any SAP system with ABAP 7.5+ or S/4HANA.
Required SAP authorizations:
S_ADT_RES– ADT resource accessS_DEVELOP– ABAP Workbench authorizationS_CODE_INS– Code Inspector (forrunCodeInspector: true)
Set credentials:
SAP_BASE_URL=https://my-sap.example.com:8000
SAP_USER=DEVELOPER
SAP_PASSWORD=secret
SAP_CLIENT=100
SAP_LANGUAGE=ENDevelopment
npm run dev # Run server in development mode (tsx, no build)
npm run build:watch # Watch mode TypeScript compilation
npm run typecheck # Type-check without building
npm test # Run unit testsProject Structure
ABAP_MCP/
├── src/
│ ├── server/
│ │ ├── index.ts # MCP server entry point
│ │ ├── tools/ # MCP tool handlers
│ │ │ ├── analyze.ts # abap_analyze
│ │ │ ├── generate.ts # abap_generate
│ │ │ ├── explain.ts # abap_explain
│ │ │ ├── refactor.ts # abap_refactor
│ │ │ ├── search.ts # abap_search
│ │ │ ├── unit-test.ts # abap_unit_test
│ │ │ ├── format.ts # abap_format
│ │ │ └── docs.ts # abap_docs
│ │ └── resources/ # MCP resources
│ │ ├── abap-syntax.ts # ABAP syntax reference
│ │ └── best-practices.ts # Clean ABAP guidelines
│ ├── sap/
│ │ ├── adt-client.ts # SAP ADT REST API client
│ │ └── types.ts # ABAP domain types
│ ├── llm/
│ │ ├── provider.ts # Generic LLM interface + ABAP system prompt
│ │ ├── factory.ts # Provider factory (reads env config)
│ │ ├── openai.ts # OpenAI adapter
│ │ ├── anthropic.ts # Anthropic adapter
│ │ ├── azure-openai.ts # Azure OpenAI adapter
│ │ ├── copilot.ts # GitHub Copilot adapter
│ │ └── ollama.ts # Ollama (local) adapter
│ └── utils/
│ ├── config.ts # Zod-validated env config
│ └── logger.ts # Winston logger
├── vscode-extension/
│ ├── package.json # VS Code extension manifest
│ └── src/
│ ├── extension.ts # Extension activation, commands
│ ├── copilot-agent.ts # @abap Copilot chat participant
│ └── mcp-client.ts # MCP client wrapper
└── config/
├── example.env # Configuration template
└── mcp.json # MCP server config templateAdding a New LLM Provider
Create
src/llm/my-provider.tsimplementingLLMProvider:
export class MyProvider implements LLMProvider {
readonly name = 'my-provider';
readonly model: string;
async complete(messages, options) { /* ... */ }
async *stream(messages, options) { /* ... */ }
async healthCheck() { /* ... */ }
}Register it in
src/llm/factory.tsunder a newcase.Add the new provider to the
LLM_PROVIDERenum insrc/utils/config.ts.Add a VS Code setting entry in
vscode-extension/package.json.
License
MIT
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.