
Mcp Sap Docs
io.github.marianfoo由 GitHub 帳號 marianfoo 發布v0.3.9更新於 Oct 24, 2026
Fast MCP server for unified SAP docs search (SAPUI5, CAP, OpenUI5, wdi5) with BM25 full-text search
概覽
讓助理透過統一索引搜尋並取得 SAP 文件,涵蓋 ABAP、UI5、CAP、BTP 及社群來源。
- 可以做什麼
- 提供對本機索引的 SAP 文件以及選用的線上來源(如 SAP Help、SAP Community 和 Software Heroes)的統一混合搜尋(BM25 加語意嵌入)。工具包括 search、fetch、ABAP 功能矩陣、SAP Community 搜尋,以及帶 clean core 資訊的 SAP 已發佈物件查詢。sap-docs 變體額外提供 Discovery Center 服務搜尋和 UI5 版本差異;abap 變體額外提供 abaplint 靜態分析。
- 適用情境
- 適合助理需要回答 SAP 開發問題、查詢 ABAP 或 UI5 API、確認版本可用性,或尋找社群解決方案的場景。若你從事 SAP 技術工作並需要文件檢索而非一般網頁搜尋,可考慮使用。
- 執行需求
- 以本機 Node.js 程序(npm 套件 mcp-sap-docs)透過 stdio 執行,也可透過公開託管的 HTTP 端點存取。本機使用需要執行 npm 安裝、setup 和 build 步驟,以複製文件子模組並建置 SQLite 索引;嵌入模型會快取在本機。未宣告需要 API 金鑰或登入。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Sap Docs,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP SAP Docs (Upstream)
An MCP server that gives AI assistants (Claude, Cursor, ChatGPT, etc.) access to SAP documentation through a unified search and fetch interface. It combines local full-text search and optional semantic ranking over git-cloned SAP docs with optional live queries to SAP Help, SAP Community, and Software Heroes — all exposed as MCP tools.
Install
Or add it to any MCP client that supports streamable HTTP:
No API key or login required — the server is public and read-only.
Public Hosted Endpoint
Ready to use — no setup required
Variants
mcp-sap-docs is the upstream repository for two MCP server variants that share one codebase and differ by configuration (MCP_VARIANT / .mcp-variant):
Documentation Sources
Offline sources (local index, always available)
Additional SAP Docs sources
The sap-docs profile also indexes the following official documentation. These sources use the existing Markdown/MDX pipeline and link to their upstream files.
Integration Suite indexes docs/ISuite_Integrations_APIs and docs/ISuite_Event_Mesh. Parallel Cloud Integration/API Management guide copies are excluded to avoid repeated content and mixed navigation terminology. Python SDK sources include current docs-python content; historical version folders are excluded.
SAP-docs repositories carry CC-BY-4.0 notices; SAP Cloud SDK, AI SDK, and OData vocabularies carry Apache-2.0 notices. The source checkouts retain their upstream license files, and search/fetch results link to the original documents. See source expansion plan for validation and scope.
Online sources (live queries, enabled by default)
Available Tools
Shared tools (both variants)
sap-docs variant only
abap variant only
Architecture Overview
- Upstream source of truth:
mcp-sap-docs - One-way sync target:
abap-mcp-server - Search defaults to BM25 keyword ranking; optional semantic scores are combined via Reciprocal Rank Fusion (RRF)
- Embeddings model:
Xenova/all-MiniLM-L6-v2(~90 MB, cached indist/models/)
Variant Selection
Resolution order:
MCP_VARIANTenvironment variable.mcp-variantfile in repo root- fallback:
sap-docs
Examples:
Search Behavior
search performs fused retrieval over:
- Offline FTS index (local submodule content)
- Optional online sources (
includeOnline=true):- SAP Help
- SAP Community
- Software Heroes content search (EN/DE merge + dedupe)
Ranking and filtering highlights:
- BM25 search with optional semantic ranking — keyword and meaning, fused via RRF
- Reciprocal Rank Fusion (RRF) across offline and online sources
- Source-level boosts from metadata
includeSamplescan remove sample-heavy sourcesabapFlavor(standard/cloud/auto) filters official ABAP docs libraries while keeping non-ABAP sourcessourcescan restrict offline libraries explicitly
Fetch content limits
Community post bodies are returned as Markdown, including code, links, images and tables. Clients that previously parsed raw Community HTML must consume Markdown. Document IDs, source URLs and response schemas are unchanged. If conversion fails, that post keeps its original HTML with a notice; other posts in the same batch are still returned.
SAP Help and Community fetches default to 75,000 characters. Shortened results
include metadata.truncation with exact loss counts. Self-hosted servers can set
MAX_CONTENT_LENGTH before startup; see content size limits.
Hybrid Search
Offline search defaults to BM25 keyword ranking. Optional semantic ranking uses
Xenova/all-MiniLM-L6-v2 to reorder the lexical candidates; it does not search outside
that candidate pool. Enable it explicitly with EMBEDDING_WEIGHT=0.7 after building
complete document and section embeddings and evaluating your own queries.
Embeddings are stored in docs.sqlite, with the model cached in dist/models/.
Old or partial embedding artifacts fall back to lexical ranking with a rebuild warning.
See docs/HYBRID-SEARCH.md for setup, limitations and costs.
Offline-Only Mode
search includes online sources by default. To run offline-only, use:
- local index/submodules only (
npm run setup+npm run build) includeOnline=falsein eachsearchrequest
Example search request body:
Docker (offline-only)
Run the container with host binding and call search with includeOnline=false:
For strict air-gapped execution, disable container networking:
Notes:
- With
--network none, online fetches are impossible by runtime isolation. - Startup may log warnings for online prefetch attempts (for example ABAP feature matrix); this does not prevent offline
searchusage.
Quick Start (Local)
npm run setup updates the selected variant's documentation sources to their
configured branch tips and builds the index, including embeddings. Nested
submodules stay at the commits recorded by those sources. To omit optional nested
repositories (for example when their upstream URLs require SSH credentials), use
SKIP_NESTED_SUBMODULES=1 npm run setup in Bash, including Git Bash on Windows.
npm run setup:submodules instead checks out the repository's recorded source
commits. It does not fetch the latest documentation or apply variant filtering.
Run npm run setup when refreshing an existing installation.
Start server modes:
Default ports by variant:
sap-docs: HTTP3001, streamable3122abap: HTTP3002, streamable3124
Health checks:
Use variant-specific ports when running abap profile.
Build and Setup Scripts
Script names remain shared (setup, build, start, start:streamable).
Behavior changes by variant config:
setup.shonly initializes variant-allowed submodulesbuild-indexonly includes variant-allowed librariesbuild-ftsonly indexes variant-allowed libraries
This keeps abap faster and smaller without maintaining a separate build script set.
Docker
Build image for a variant:
Run streamable server:
SAP BTP Cloud Foundry
For BTP CF, the recommended sap-docs path is to deploy the maintained
ghcr.io/marianfoo/mcp-sap-docs:sap-docs image with MTA. Cloud Foundry only
pulls and runs the prepared image, including embedding artifacts. Ranking remains
lexical unless a positive EMBEDDING_WEIGHT is explicitly configured.
See docs/BTP-CF-DEPLOYMENT.md for the public-first
deployment guide. Start with
Deployment Options and Tradeoffs
to choose between MTA, direct cf push, custom registry images, and refresh
setup.
One-Way Sync to abap-mcp-server
This repository contains direct sync automation:
- Workflow:
.github/workflows/sync-to-abap-main.yml - Script:
scripts/sync-to-abap.sh
Flow:
- Release Please publishes a release in
mcp-sap-docsafter its release PR is merged - The release workflow explicitly dispatches the ABAP sync workflow
- The sync workflow clones
abap-mcp-server - Tracked upstream files are synced (with exclude rules), then the ABAP overlay is applied
.mcp-variantis forced toabapand ABAP package identity is patched- A sync commit is pushed to
abap-mcp-server/main - That push triggers the ABAP deployment workflow
The sync workflow also supports manual runs, including dry runs and a custom target branch.
Only pushes to the downstream main branch trigger automatic deployment.
Required secret in mcp-sap-docs repo:
ABAP_REPO_SYNC_TOKEN: a dedicated token with access to push code and workflow changes toabap-mcp-server. Keep this separate fromGITHUB_TOKEN, whose pushes do not trigger subsequent workflows.
Deployment Model
mcp-sap-docs: owns release versions and dispatches its deployment and ABAP sync when a release is createdabap-mcp-server: deploys on pushes tomain, including upstream sync commits, or viaworkflow_dispatch
The downstream repository does not publish GitHub releases. Its deployment must
therefore listen for sync pushes, not release: published. Upstream releases
control when automatic syncs occur.
The ABAP deployment workflow is maintained in
sync/abap.overlay/.github/workflows/deploy-abap-mcp-server.yml. Change that
upstream overlay so the fix persists across future syncs.
After merging a deployment fix, publish the next upstream release or manually run
sync-to-abap-main.yml against upstream main. Confirm that the downstream deploy
run succeeds and that https://mcp-abap.marianzeis.de/health reports the version in
the synced ABAP package.json; a successful sync alone does not confirm deployment.
PM2 Runtime
ecosystem.config.cjs is variant-aware and resolves:
- process names
- ports
- deploy path
from config/variants/*.json.
Validation Commands
Additional Docs
docs/ARCHITECTURE.mddocs/DEV.mddocs/TESTS.mddocs/UPSTREAM-ONE-WAY-SYNC-IMPLEMENTATION.mdREMOTE_SETUP.md
Curated SAP tutorials
The SAP Docs profile includes 32 additional official tutorials in
sap-tutorials-ai, sap-tutorials-hana, and sap-tutorials-integration:
AI Core orchestration V2 and grounding, HANA Cloud SQLScript and CAP, Integration
Suite MCP Gateway, and Cloud Transport Management. The existing Fiori OPA guide
is still available separately.
Use product and task terms, for example SAP HANA Cloud SQLScript stored procedure tutorial or SAP Integration Suite MCP Gateway tutorial. Use sources to narrow
an ambiguous search; leave it unset for cross-source discovery. Tutorials provide
worked examples and retain their prerequisites; product and SDK documentation
remain the reference for detailed API behavior.
The explicit selection is in config/tutorials.json.
Fetched tutorials include readable option labels, absolute asset/prerequisite
links, and their published page URL. The unpublished transport overview links to
its official GitHub source. Source content and its original attribution are
preserved; the original tutorial repository's license still applies.
來源:README.md,提交 0d0ba07
工具
0版本歷史
1- v0.3.9最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分