Fast MCP server for unified SAP docs search (SAPUI5, CAP, OpenUI5, wdi5) with BM25 full-text search
io.github.marianfoo/mcp-sap-docs MCP Server
An MCP server that provides AI assistants with access to SAP documentation via a unified search and fetch interface. It combines local full-text (and semantic) indexing over git-cloned SAP docs with optional live queries to SAP Help, SAP Community, and Software Heroes.
🛠️ Key Features
Unified SAP docs search and fetch interface
Local index over git-cloned documentation (full-text + semantic)
Optional live queries to SAP Help, SAP Community, and Software Heroes
Exposes functionality as MCP tools
🚀 Use Cases
Search within SAPUI5, CAP, OpenUI5, and wdi5 documentation
Retrieve relevant SAP documentation content for assistant workflows
Use live sources when local results are insufficient
⚡ Developer Benefits
Streamable HTTP integration for MCP clients
Structured MCP tool access for assistant applications
⚠️ Limitations
Live querying depends on external sources (SAP Help, SAP Community, Software Heroes)
An MCP server that gives AI assistants (Claude, Cursor, ChatGPT, etc.) access to SAP documentation through a unified search and fetch interface. It combines a local full-text + semantic index over git-cloned SAP docs with optional live queries to SAP Help, SAP Community, and Software Heroes — all exposed as MCP tools.
Dedicated SAP Community search via the Khoros LiQL API — returns full content of top posts. Use when search results are insufficient for specific errors or workarounds.
sap_search_objects
Search SAP released objects (classes, interfaces, tables, CDS views, …) by name/component/type from the official SAP/abap-atc-cr-cv-s4hc release state repo. Useful for clean core compliance discovery.
sap_get_object_details
Full release state details for a specific SAP object including clean core level (A/B/C/D), successor objects, and optional compliance verdict.
sap-docs variant only
Tool
Description
sap_discovery_center_search
Search the SAP Discovery Center service catalog for BTP services by keyword, category, or license model.
sap_discovery_center_service
Get comprehensive BTP service details: pricing plans, product roadmap, documentation links, and key features. Accepts a service UUID or name.
ui5_version_diff
List all matching FEATURE / FIX / DEPRECATED changes and SAPUI5 What's New entries for a version or range from a local all-changes bundle (dist/data/ui5-lib-diff/all-changes.json). npm run setup refreshes it automatically; use npm run download:ui5-lib-diff during setup/rebuild for a manual refresh. Pair with the ui5-version-upgrade skill and @ui5/mcp-server for a full upgrade workflow.
abap variant only
Tool
Description
abap_lint
Run static code analysis on ABAP source code using abaplint. Auto-detects file type from code patterns. Returns findings with line numbers, severity, and rule keys.
Embeddings model: Xenova/all-MiniLM-L6-v2 (~90 MB, cached in dist/models/)
Variant Selection
Resolution order:
MCP_VARIANT environment variable
.mcp-variant file in repo root
fallback: sap-docs
Examples:
bash
# Run as full sap-docs profile
MCP_VARIANT=sap-docs npm run setup
MCP_VARIANT=sap-docs npm run build
MCP_VARIANT=sap-docs npm run start:streamable
# Run as ABAP profile
MCP_VARIANT=abap npm run setup
MCP_VARIANT=abap npm run build
MCP_VARIANT=abap npm run start:streamable
Hybrid BM25 + Semantic (embedding) search — keyword and meaning, fused via RRF
Reciprocal Rank Fusion (RRF) across offline and online sources
Source-level boosts from metadata
includeSamples can remove sample-heavy sources
abapFlavor (standard / cloud / auto) filters official ABAP docs libraries while keeping non-ABAP sources
sources can restrict offline libraries explicitly
Hybrid Search
The offline search combines BM25 (FTS5 keyword matching) with semantic similarity
(dense embeddings via Xenova/all-MiniLM-L6-v2). This allows natural-language and
paraphrase queries to find relevant docs even when the exact keywords are missing.
Example: "how to check if a user has permission" finds AUTHORITY-CHECK docs.
Embeddings are pre-computed at build time and stored in docs.sqlite.
The model (~90 MB) is cached in dist/models/ (gitignored, in-project).
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 semantic image.
Release Please publishes a release in mcp-sap-docs after 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-variant is forced to abap and 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 to abap-mcp-server. Keep this separate from GITHUB_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 created
abap-mcp-server: deploys on pushes to main, including upstream sync commits, or via workflow_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
bash
npm run build:tsc
npm run test:url-generation
npm run test:integration
npm run test:software-heroes
npm run test:discovery-center # mocked Discovery Center REST contract tests
npm run test:discovery-center:live # opt-in live API smoke test
npm run test:sap-objects # SAP Released Objects unit tests# Variant-specific build checks
MCP_VARIANT=sap-docs npm run build:index
MCP_VARIANT=abap npm run build:index
MCP_VARIANT=sap-docs npm run build:fts
MCP_VARIANT=abap npm run build:fts