
Mcp Abap Abap Adt Api
io.github.mario-andreschak由 GitHub 账号 mario-andreschak 发布v0.1.1更新于 Oct 24, 2026
MCP server wrapping abap-adt-api for ABAP ADT development workflows against SAP systems
概览
让助手通过 ADT API 读取、编辑、激活和传输 SAP 系统中的 ABAP 对象。
- 可以做什么
- 封装 abap-adt-api 库,把 SAP ABAP 开发工具操作暴露为工具。它可以搜索 ABAP 对象、读写源代码、锁定和解锁对象、执行语法检查、激活对象、管理传输、运行查询、调试、重构,以及使用 Git 和分析功能。大结果以分页 resultId 返回,可通过 readResultPage 读取。
- 适用场景
- 当助手需要直接处理 SAP 开发系统中的 ABAP 代码或 DDIC 对象时使用,例如查看源代码、修改并激活更改,或运行临时查询。它面向单个受信任的操作者,而非共享或多用户场景。
- 运行要求
- 需要本地 Node.js 运行时(Node 22.22.2+ 或 24.15.0+),并通过 node 以 dist/index.js 的绝对路径启动源码构建。必需的环境变量:SAP_URL、SAP_USER、SAP_PASSWORD,可选 SAP_CLIENT 和 SAP_LANGUAGE。需要能访问 SAP 系统,且用户具备 ADT 授权;私有 CA 可通过 NODE_EXTRA_CA_CERTS 提供。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Abap Abap Adt Api,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ABAP ADT API MCP server
This server preserves 127 existing SAP ABAP tools and adds readResultPage for large results. Object CRUD, locking, activation, transports, queries, debugging, refactoring, Git and analysis share one SAP session owned by a trusted local stdio client. SAP authorizations determine what that session can read or change.
Installation and protocol
Use Node22.22.2+ or24.15.0+. Run npm ci and npm run build, then configure your MCP client to launch node with the absolute path to dist/index.js. Existing npm/registry releases do not contain this PR until the owner releases it. No release is published here.
Public TypeScript MCP2.0.0 supports modern2026-07-28 discovery and legacy2025-11-25 initialization, validated tools, cancellation and proper errors. This package exposes stdio; it is not an HTTP listener or MCP OAuth provider. Missing credentials still allow discovery. healthcheck reports local configuration and session recovery state, not verified SAP connectivity.
Environment comes from the MCP client. Dotenv loads only when SAP_ENV_FILE explicitly names a file. SAP_URL is an origin without a path, query or embedded credentials. For a private CA set NODE_EXTRA_CA_CERTS before launching Node. TLS verification cannot be disabled. Loopback HTTP is allowed for fixtures; a trusted private HTTP deployment requires SAP_ALLOW_HTTP=1 and exposes credentials to that network.
An authorized broker's static SAP_BEARER_TOKEN can replace the password. Rotate it by restarting the process; this does not implement XSUAA grants or prove tenant acceptance. No password-grant flow is introduced.
Session and limits
Only one operation runs at a time; overlaps receive a busy error. Debugger listeners also occupy this session until completed or cancelled. SAP_REQUEST_TIMEOUT_MS defaults to60000 and accepts100..120000, including login and every underlying HTTP request. Cancellation closes real sockets. The client does not follow redirects, inherit environment proxies, retry mutations or automatically reauthenticate a stateful call. An interrupted write may already have changed SAP: inspect writes and locks, then explicitly login, dropSession or logout to recover. Shutdown attempts a bounded logout; unreachable SAP can retain state until its own expiry.
HTTP stays on the configured origin under /sap/, with 2MiB requests,4MiB responses and verified TLS. XML entity declarations are rejected. Input JSON is bounded by bytes, nesting, arrays and field contracts. This is a trusted operator tool, not an OS sandbox or multi-user service. Git tools can ask SAP to contact a remote Git service with supplied credentials; those operations depend on SAP and remote permissions.
Schemas are derived from pinned abap-adt-api8.4.3 declarations, including objects, arrays and overloads. Previously documented JSON strings for object arguments remain accepted, parsed and validated. Unknown top-level arguments are rejected. scripts/generate-input-contracts.mjs and its report record the mapping; rerun and review on dependency updates. Its TypeScript6 compiler API is development-only; TypeScript7 builds the application.
Source snapshots from getObjectSource/successful setObjectSource can feed syntaxCheckCode when code is omitted (issue#2). The per-runtime cache is limited to8MiB,64entries and five minutes. Mutating/session operations clear old snapshots. Snapshots are the last observed text, not a guarantee against external edits. Explicit empty text is checked as an equivalent blank line because upstream rejects an empty string; results report emptySourceNormalized. Source options accept structured or JSON objects, including active/inactive versions. Existing line paging remains available. Class includes fetch class metadata first; a public-request adapter handles valid single-link class XML rejected by the upstream parser. Maps preserve their entries in JSON.
Above64KiB, results return an opaque resultId, a JSON page, nextOffset and expiry. Use readResultPage, concatenate pages and JSON-parse to recover the original tool result. Paging never repeats SAP requests or writes. At most four 4MiB results live for five minutes; mutations/session resets clear them. Expired results need an intentional repeat of the original read. Larger results fail clearly. Query/search/ATC defaults are100 with caps of1000 where available; an API may return an extra sentinel row. Other large structures use generic paging.
Validation and deployment acceptance
Tests use real local HTTP/XML fixtures and installed modern/legacy protocol exchanges. Linux/Windows Node22/24 and non-root Docker run in CI. No SAP production credentials or writes are used. For an authorized read-only deployment canary set SAP_LIVE_TEST=1 and optional SAP_LIVE_SOURCE_URL, then run npm run verify:live. This checks login/discovery/optional source reading, not every SAP write/debug/Git/transport feature. Validate those on a development system. Permissions, credentials, API availability and support through the end of2026 remain deployment checks.
Existing PRs19/20/21/22 overlap errors, result sizing, class includes and login; all remain open for owner review. PR15's state restoration and refactoring JSON work already exists on the starting branch. PR10's proposed XSUAA implementation is not merged here.
References: abap-adt-api, MCP2026-07-28, Node private CA configuration.
Existing tool workflow reference
Original workflow examples follow. Runtime, schema and installation behavior above supersedes older client-specific examples.
Custom Instruction
Use this Custom Instruction to explain the tool to your model:
Troubleshooting
npxcan't find the package / client won't start it: ensure Node.js is installed and on your PATH (node -v,npm -v). On Windows try"command": "npx.cmd", or use a source build with an absolute path tonode dist/index.js.- SAP connection errors: verify your credentials (
SAP_URL,SAP_USER,SAP_PASSWORD,SAP_CLIENT), confirm the system is reachable, that your user has ADT authorizations, and that/sap/bc/adtis active inSICF. - TLS / self-signed certificate errors: configure
NODE_EXTRA_CA_CERTSwith the absolute path to a trusted CA certificate before Node starts. Verification stays enabled.
Contributing
Contributions are welcome! Please follow these steps to contribute:
-
Fork the Repository
-
Create a New Branch
-
Commit Your Changes
-
Push to the Branch
-
Open a Pull Request
License
This project is licensed under the MIT License.
来源:README.md,提交 1602da7
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分