io.github.marianfoo/mcp-sap-docs

平台与服务

by marianfoo

用于统一检索 SAP 文档的高速 MCP server,覆盖 SAPUI5、CAP、OpenUI5、wdi5,并支持 BM25 全文搜索。

SAP 文档分散不好找时,用它可统一检索 SAPUI5、CAP、OpenUI5 和 wdi5;高速 MCP 服务配合 BM25 全文搜索,找资料更快更准。

什么是 io.github.marianfoo/mcp-sap-docs

用于统一检索 SAP 文档的高速 MCP server,覆盖 SAPUI5、CAP、OpenUI5、wdi5,并支持 BM25 全文搜索。

README

MCP SAP Docs (Upstream)

Public Hosted Endpoint

Ready to use — no setup required

VariantURL
SAP Docshttp://mcp-sap-docs.marianzeis.de/mcp
ABAPhttps://mcp-abap.marianzeis.de/mcp

mcp-sap-docs is the upstream repository for two MCP server variants:

  • sap-docs variant: broad SAP docs scope (UI5, CAP, Cloud SDK, ABAP docs, etc.)
  • abap variant: ABAP-focused scope (fewer sources, ABAP lint enabled)

Both variants run from the same codebase and differ by configuration (MCP_VARIANT / .mcp-variant).

Current State

  • Upstream source of truth: mcp-sap-docs
  • One-way sync target: abap-mcp-server
  • Search API is unified across variants:
    • query, k, includeOnline, includeSamples, abapFlavor, sources
  • Shared tools in both variants:
    • search — unified search across offline docs + optional online sources (SAP Help, SAP Community, Software Heroes)
    • fetch — retrieve full document or community post content by ID
    • abap_feature_matrix — check ABAP feature availability across SAP releases
    • sap_community_search — dedicated SAP Community search (blogs, Q&A); use when search results are insufficient, especially for specific errors or workarounds
    • sap_search_objects — search SAP released objects by name/component/type from the official SAP/abap-atc-cr-cv-s4hc API release state repo; use for clean core compliance discovery
    • sap_get_object_details — full release state details for a specific SAP object (class, table, interface, etc.) including clean core level, successor objects, and optional compliance verdict
    • 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 from the Discovery Center including pricing plans, product roadmap, documentation links, and key features
  • ABAP-only tool:
    • abap_lint (enabled only when variant is abap)

Variant Selection

Resolution order:

  1. MCP_VARIANT environment variable
  2. .mcp-variant file in repo root
  3. 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

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:

  • 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).

See docs/HYBRID-SEARCH.md for full details, size impact, and tuning.

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=false in each search request

Example search request body:

json
{
  "query": "RAP draft",
  "k": 8,
  "includeOnline": false
}

Docker (offline-only)

Run the container with host binding and call search with includeOnline=false:

bash
docker run --rm -p 3122:3122 \
  -e MCP_VARIANT=sap-docs \
  -e MCP_PORT=3122 \
  -e MCP_HOST=0.0.0.0 \
  mcp-sap-docs

For strict air-gapped execution, disable container networking:

bash
docker run --rm --network none -p 3122:3122 \
  -e MCP_VARIANT=sap-docs \
  -e MCP_PORT=3122 \
  -e MCP_HOST=0.0.0.0 \
  mcp-sap-docs

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 search usage.

Quick Start (Local)

bash
npm ci
npm run setup
npm run build

Start server modes:

bash
# MCP stdio
npm start

# HTTP status/dev server
npm run start:http

# MCP streamable HTTP
npm run start:streamable

Default ports by variant:

  • sap-docs: HTTP 3001, streamable 3122
  • abap: HTTP 3002, streamable 3124

Health checks:

bash
curl -sS http://127.0.0.1:3122/health | jq .
curl -sS http://127.0.0.1:3001/status | jq .

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.sh only initializes variant-allowed submodules
  • build-index only includes variant-allowed libraries
  • build-fts only indexes variant-allowed libraries

This keeps abap faster and smaller without maintaining a separate build script set.

Docker

Build image for a variant:

bash
# sap-docs image
docker build --build-arg MCP_VARIANT=sap-docs -t mcp-sap-docs .

# abap image
docker build --build-arg MCP_VARIANT=abap -t abap-mcp-server .

Run streamable server:

bash
# sap-docs
docker run --rm -p 3122:3122 \
  -e MCP_VARIANT=sap-docs \
  -e MCP_PORT=3122 \
  mcp-sap-docs

# abap
docker run --rm -p 3124:3124 \
  -e MCP_VARIANT=abap \
  -e MCP_PORT=3124 \
  abap-mcp-server

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:

  1. Push to mcp-sap-docs/main
  2. Workflow clones abap-mcp-server
  3. Tracked upstream files are synced (with exclude rules)
  4. ABAP overlay is applied
  5. .mcp-variant is forced to abap
  6. ABAP package identity is patched
  7. Commit is pushed to abap-mcp-server/main

Required secret in mcp-sap-docs repo:

  • ABAP_REPO_SYNC_TOKEN

Commit message controls:

  • [skip-sync] skips sync workflow

Deployment Model

  • mcp-sap-docs: upstream implementation + sync trigger
  • abap-mcp-server: deployment trigger remains push-to-main in that repository

This preserves ABAP deployment automation while keeping one shared upstream codebase.

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: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

Additional Docs

  • docs/ARCHITECTURE.md
  • docs/DEV.md
  • docs/TESTS.md
  • docs/UPSTREAM-ONE-WAY-SYNC-IMPLEMENTATION.md
  • REMOTE_SETUP.md

常见问题

io.github.marianfoo/mcp-sap-docs 是什么?

用于统一检索 SAP 文档的高速 MCP server,覆盖 SAPUI5、CAP、OpenUI5、wdi5,并支持 BM25 全文搜索。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.8k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.8k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.8k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.1k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.9k

评论