abap-mcp
An offline MCP server for SAP ABAP that provides static analysis, ABAP Cloud readiness checks, and RAP scaffolding using abaplint, enabling AI agents to analyze and generate ABAP code without a live SAP system.
README
abap-mcp
MCP server for SAP ABAP — offline static analysis, ABAP Cloud readiness, and RAP scaffolding. No SAP system. No credentials. Works on ABAP source wherever your AI agent works: a git checkout, an abapGit export, a code review, CI.
Built on abaplint (the open-source ABAP parser/linter) and the Model Context Protocol. TypeScript, 100% local — the server makes zero network calls and reads no user files: sources go in as text, findings come back as structured JSON. (The released-API list and abaplint's rule data are package-bundled assets that ship inside the install — no network, no user filesystem, at runtime.)
Why this exists
Every other ABAP MCP server is either a bridge to a live SAP system (ADT/RFC — needs credentials, a system, and trust) or a documentation search. But AI coding agents spend most of their time where the files are — editing abapGit repos, reviewing diffs, generating code — long before anything reaches a system. This server gives agents the missing feedback loop at that layer:
- "Does this ABAP parse? Is it clean?" →
lint_abap - "How far is this classic report from ABAP Cloud?" →
check_cloud_readiness - "Is MARA a released API? What do I use instead?" →
check_released_api - "Start me a correct RAP business object." →
scaffold_rap_bo - "What's in this 4,000-line class?" →
get_abap_outline
Quickstart
# Claude Code
claude mcp add abap-mcp -- npx -y abap-mcp
# or any MCP client (.mcp.json / mcp.json):
{
"mcpServers": {
"abap-mcp": { "command": "npx", "args": ["-y", "abap-mcp"] }
}
}
From a clone instead:
npm install && npm run build
claude mcp add abap-mcp -- node /path/to/abap-mcp/dist/cli.js
Then ask your agent things like "lint this class against ABAP Cloud", "is zold_report cloud-ready?", or "scaffold a RAP BO for entity Booking on table zbooking, draft enabled".
CLI — same engine, no AI required
Every tool is also a subcommand, so it works in terminals and CI where no MCP client exists:
npx abap-mcp lint src/ # lint files or whole directories
npx abap-mcp readiness src/ --fail-below 80 # repo-level ABAP Cloud readiness, CI-gateable
npx abap-mcp scaffold --entity Travel --table ztravel --key travel_id --out ./out
npx abap-mcp outline src/zcl_monster.clas.abap # navigate big objects
npx abap-mcp released MARA I_Product # released-API status + CDS successor
npx abap-mcp explain exit_or_check # rule rationale
Directories are walked recursively (abapGit naming), batched automatically, and readiness
merges batches into one scored, categorized repo report. Exit codes are CI-friendly
(1 on error findings / failed threshold).
Recipes, agents & CI
docs/COOKBOOK.md — practical recipes: the fix-until-clean loop,
PR review without a transport, whole-repo migration triage, CI gates, per-persona use cases.
examples/claude-code/ — drop-in agentic workflows: an
abap-code-reviewer subagent, an abap-cloud-migrator sweep loop (readiness score as the
loop condition), per-repo .mcp.json, and a GitHub Actions quality gate for abapGit repos.
Tools
| Tool | What it does |
|---|---|
lint_abap |
abaplint static analysis over ABAP/CDS/BDEF sources → structured findings with rule docs links. Presets: style (default, snippet-friendly), full, syntax-only; per-rule overrides. |
check_cloud_readiness |
Dual-parse diff (classic baseline vs Cloud): statements that are valid today but illegal in ABAP Cloud become categorized blockers (dynpro, list output, native SQL, …) with a transparent score; code broken at the baseline is reported separately, not counted as migration work. Now also surfaces a separate, dated released-API cross-check (releasedApiFindings): direct access to non-released classic tables and deprecated-API usage found in the source, with CDS successor hints — informational, not folded into the score. |
check_released_api |
Looks up objects (tables, CDS views, function modules, classes, …) in SAP's bundled Cloudification snapshot → released / deprecated / not-released per object, plus a curated CDS successor for common classic tables. The released-API half of readiness, offline. |
scaffold_rap_bo |
Generates the canonical RAP managed-BO stack (root view, behavior definition strict(2) + optional draft, behavior class + handler locals, projection, metadata extension, OData V4 service definition) plus suggested table DDL, activation order and next steps. |
list_abap_rules |
Browse abaplint's ~180 rules (filter by text or tag). |
explain_abap_rule |
One rule in depth — rationale (often Clean ABAP), examples, docs URL. |
format_abap |
Offline pretty-printer (keyword case + indentation). |
get_abap_outline |
Classes/methods/visibility/interfaces/FORMs of a source — navigate big objects without reading them whole. |
Honesty box — what this is not
- Not ATC. The objective readiness score is still language-level: statements ABAP Cloud
removed. Released-API coverage is now partial and offline:
check_released_apiand thereleasedApiFindingsin readiness reflect SAP's published Cloudification list as of the bundled snapshot date — they cover tables and function modules referenced in your source, not every API, and are only as current as the snapshot. A target system's own released-API list (ATC checkAPI_RELEASE_STATE_CHECK/SAP_CP_READINESS) remains authoritative; treat an "absent from the list" result as "not released as of the snapshot", not as proof. - Scaffold validation is tiered. Generated classes and CDS views are round-tripped through
abaplint at Cloud level before they're returned (the generator and the linter share one
parser). Behavior/service definitions are outside abaplint's checked surface — they are
golden-tested canonical templates, and ADT activation is the final arbiter. Each generated
file is labeled
validated: "abaplint" | "template". - Text-in only, by design. No user-filesystem walking, no network — the entire attack
surface is a parser over strings you explicitly pass. (The released-API snapshot and abaplint's
rule data are package-bundled assets imported from the install, not fetched or read from your
disk.) For linting whole directories, use the abaplint CLI in CI, or the
mcp-kit
wrap-abaplintrecipe this server grew out of.
Develop
npm install
npm run check # typecheck + 122 tests + build — the CI gate
node dist/cli.js # stdio MCP server
npx @modelcontextprotocol/inspector --cli node dist/cli.js --method tools/list
Tool descriptions are CI-graded (a rubric test enforces verb-first names, when-to-use, non-goals, described params, worked examples — the mcp-kit discipline; the full mcp-kit lint scores all eight tools 100/100).
Design
The decision log — why offline, why abaplint, why a dual-parse readiness diff, why the
scaffolder validates its own output, what was deliberately left out — lives in
docs/DESIGN.md.
Credits
- abaplint by Lars Hvam — the parser and rule engine underneath every tool here (MIT).
- SAP/abap-atc-cr-cv-s4hc — SAP's official ABAP
Cloudification Repository (object release list), Apache-2.0. The bundled released-API
snapshot (
src/data/released-apis.json, snapshot 2026-06-10) is a compact transform of that data, redistributed under Apache-2.0 with attribution; see docs/DESIGN.md andscripts/build-released-api-index.mjsfor the pipeline. - mcp-kit — the production-MCP patterns this server follows (typed tool specs, transport discipline, description lint).
MIT © Akshay Palimkar. Not affiliated with or endorsed by SAP SE. "SAP", "ABAP" and "RAP" are trademarks of SAP SE; this is an independent open-source tool for developers working with them.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。