abap-mcp

abap-mcp

An MCP server that connects AI assistants to SAP systems via the ADT REST API, enabling read, write, syntax-check, and activation of ABAP code directly from the chat.

Category
访问服务器

README

abap-mcp — Read & write ABAP from Claude, Cursor & any MCP client

An MCP (Model Context Protocol) server that connects AI assistants (Claude Desktop, Claude Code, Cursor, …) directly to a SAP system over the standard ADT (ABAP Development Tools) HTTP API. Your AI can read, search, syntax-check — and, when you enable it, write, activate, and refactor real ABAP — without leaving the chat.

No SDK bloat. Pure Python standard library — starts in seconds even behind aggressive corporate antivirus, and runs on any Python 3.x.


Why this exists

ABAP developers are the last ones to get good AI tooling. Copilots can write ABAP text, but they can't see your system or touch your code. This bridges that gap using the same ADT REST API Eclipse uses — so it works against any modern SAP NetWeaver / S/4HANA system you can already reach.

It's the missing link between an LLM and a live SAP repository.


Safe by default

Out of the box the server is read-only. Write tools stay dormant until you explicitly opt in with SAP_ALLOW_WRITE=1 in your .env — and even then, every write additionally requires an explicit confirm flag and a transport request, with a syntax check before each save. So you can hand it to your AI and let it explore your system with zero risk, then flip the switch when you're ready to let it build.


What it can do

Read (always on):

  • abap_ping — connectivity / auth check
  • abap_search — find objects across the repository
  • abap_read_class / abap_read_program / abap_read_include / abap_read_function / abap_read_uri
  • abap_sql — read-only SELECT against tables
  • abap_syntax_check — validate source without saving
  • smartform_info / sapscript_info — inspect forms

Write & generate (enable with SAP_ALLOW_WRITE=1):

Tool What it does
abap_update_source / abap_patch_source Save full source, or do a surgical find-and-replace edit on a large include without retyping it
abap_create_object Create new classes / programs / interfaces / includes / function groups
abap_activate Activate objects (handles function-group includes correctly)
abap_classrun Run an IF_OO_ADT_CLASSRUN class — the Eclipse "F9" — and get console output
abap_create_enhancement Inject an implicit enhancement (source hook) without modifying the standard object
abap_cust_maintain Maintain customizing tables (SM30-style), transport-aware, dry-run by default
abap_create_dynpro Create dynpros / screens headlessly (no GUI screen painter)
abap_note_status / abap_note_download / abap_note_implement Inspect, download and (dry-run or apply) SAP Notes via the Note Assistant API
abap_create_transport Create transport requests from the AI
Modification-Assistant bypass Auto-detects the ADT 405 ExceptionResourceIsModified lock failure on Z-copies of standard objects and transparently falls back to RPY_PROGRAM_UPDATE so the write still succeeds

Note Assistant apply is dry-run by default and refuses to run against a production system id.


Setup (60 seconds)

git clone <repo>
cd abap-mcp
cp .env.example .env      # fill in host, client, user, password

.env:

SAP_BASE_URL=http://your-sap-host.example.com:8000
SAP_CLIENT=100
SAP_USER=YOUR_SAP_USER
SAP_PASSWD=YOUR_PASSWORD
SAP_LANG=EN
SAP_ALLOW_WRITE=0          # set to 1 to enable the write/generate tools

Register with Claude Code / Desktop:

claude mcp add abap-mcp --scope user -- python /path/to/server.py

Or in any MCP client, point it at python server.py over stdio.

Ask your assistant: "ping the SAP system and list all Z-classes whose name starts with ZCL_."


Requirements

  • Python 3.8+ (no pip dependencies)
  • Network access to a SAP system's ADT endpoint (/sap/bc/adt/*)
  • A SAP user with developer authorizations (and a transport for writes)

Disclaimer

Use against systems you are authorized to develop on. Writes go through standard SAP authorization, transport and syntax checks, but you are responsible for what you commit. Not affiliated with or endorsed by SAP SE.

License

MIT. Free to use, modify and share.


Built by João Pace — SAP × AI. If this saves you time, a ⭐ on the repo helps others find it. Found a rough edge or want a connector for your system? Open an issue or reach out on LinkedIn.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选