
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 分