Skip to content
Back to search

mcp-sap-docs

MCP SAP Docs (Upstream)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/marianfoo--mcp-sap-docs/badge.svg)](/listings/marianfoo--mcp-sap-docs)

HTML

<a href="/listings/marianfoo--mcp-sap-docs"><img src="/api/listings/marianfoo--mcp-sap-docs/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

[![Add to Werkbank][werkbank-badge]][werkbank-install]

Or add it to any MCP client that supports streamable HTTP:

{
  "mcpServers": {
    "sap-docs": {
      "type": "http",
      "url": "https://mcp-sap-docs.marianzeis.de/mcp"
    }
  }
}

No API key or login required — the server is public and read-only.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 439 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # MCP SAP Docs (Upstream)
  2. 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.
  3. ## Install
  4. [![Add to Werkbank][werkbank-badge]][werkbank-install]
  5. Or add it to any MCP client that supports streamable HTTP:
  6. ```json
  7. {
  8. "mcpServers": {
  9. "sap-docs": {
  10. "type": "http",
  11. "url": "https://mcp-sap-docs.marianzeis.de/mcp"
  12. }
  13. }
  14. }
  15. ```
  16. No API key or login required — the server is public and read-only.
  17. ## Public Hosted Endpoint
  18. > **Ready to use — no setup required**
  19. >
  20. > | Variant | URL |
  21. > |---------|-----|
  22. > | SAP Docs | `http://mcp-sap-docs.marianzeis.de/mcp` |
  23. > | ABAP | `https://mcp-abap.marianzeis.de/mcp` |
  24. ## Variants
  25. `mcp-sap-docs` is the upstream repository for two MCP server variants that share one codebase and differ by configuration (`MCP_VARIANT` / `.mcp-variant`):
  26. | Variant | Scope | Extra tools |
  27. |---------|-------|-------------|
  28. | `sap-docs` | Broad SAP docs: UI5, CAP, Cloud SDK, ABAP, BTP, AI, Terraform | Discovery Center tools |
  29. | `abap` | ABAP-focused: ABAP keyword docs, RAP, cheat sheets, style guides | `abap_lint` |
  30. ## Documentation Sources
  31. ### Offline sources (local index, always available)
  32. | Source | Description |
  33. |--------|-------------|
  34. | `abap-docs-standard` | Official ABAP Keyword Documentation — on-premise / full syntax |
  35. | `abap-docs-cloud` | Official ABAP Keyword Documentation — ABAP Cloud / BTP (restricted syntax) |
  36. | `abap-cheat-sheets` | Practical ABAP/RAP code snippets and examples |
  37. | `abap-fiori-showcase` | Annotation-driven RAP + OData V4 + Fiori Elements feature showcase |
  38. | `abap-platform-rap-opensap` | openSAP "Building Apps with RAP" course samples |
  39. | `cloud-abap-rap` | ABAP Cloud + RAP example projects |
  40. | `abap-platform-reuse-services` | RAP reuse services examples (number ranges, mail, Adobe Forms, …) |
  41. | `sap-styleguides` | SAP Clean ABAP Style Guide and best practices |
  42. | `dsag-abap-leitfaden` | DSAG ABAP Leitfaden (German) development guidelines |
  43. | `btp-cloud-platform` | SAP BTP concepts, development, security, administration |
  44. | `sap-artificial-intelligence` | SAP AI Core and SAP AI Launchpad documentation |
  45. | `ui5` | SAPUI5 / OpenUI5 framework documentation |
  46. | `cap` | SAP Cloud Application Programming Model (CAP) documentation |
  47. | `cloud-sdk` | SAP Cloud SDK documentation |
  48. | `terraform-provider-btp` | SAP Terraform Provider for BTP — resources and data sources |
  49. | `architecture-center` | SAP Architecture Center reference architectures and guidance |
  50. | `wdi5` | wdi5 (WebdriverIO + UI5) testing framework documentation |
  51. ### Additional SAP Docs sources
  52. The `sap-docs` profile also indexes the following official documentation. These sources use the existing Markdown/MDX pipeline and link to their upstream files.
  53. | Source IDs | Coverage |
  54. |------------|----------|
  55. | `btp-connectivity` | Destinations, Cloud Connector, principal propagation, HTTP/RFC |
  56. | `cloud-sdk-python`, `cloud-sdk-ai-python` | Python BTP and AI SDK documentation and examples |
  57. | `odata-vocabularies` | OData annotation terms and types; experimental labels are retained |
  58. | `btp-job-scheduling-service`, `btp-cloud-logging` | Application jobs and observability |
  59. | `btp-cloud-identity-services`, `btp-cloud-identity-integration` | Identity Authentication, Identity Provisioning, and system integration |
  60. | `btp-integration-suite`, `btp-event-mesh` | Consolidated Integrations and APIs guide, plus Event Mesh |
  61. | `btp-business-application-studio` | Dev spaces, development, and troubleshooting |
  62. | `btp-continuous-integration-and-delivery`, `btp-cloud-transport-management` | Managed pipelines and cloud transports |
  63. 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.
  64. 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](docs/source-expansion-plan.md) for validation and scope.
  65. ### Online sources (live queries, enabled by default)
  66. | Source | Description |
  67. |--------|-------------|
  68. | SAP Help Portal | Official SAP product documentation (broad scope) |
  69. | SAP Community | Community blogs, Q&A, and troubleshooting posts |
  70. | Software Heroes | ABAP/RAP articles and tutorials (EN + DE, deduplicated) |
  71. ## Available Tools
  72. ### Shared tools (both variants)
  73. | Tool | Description |
  74. |------|-------------|
  75. | `search` | Unified search (BM25 with optional semantic ranking) across offline docs and optional online sources. Supports `query`, `k`, `includeOnline`, `includeSamples`, `abapFlavor`, `sources` parameters. |
  76. | `fetch` | Retrieve full document content by ID returned from `search`. |
  77. | `abap_feature_matrix` | Check ABAP feature availability across SAP releases (7.40–LATEST) using the [Software Heroes feature matrix](https://software-heroes.com/en/abap-feature-matrix). |
  78. | `sap_community_search` | 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. |
  79. | `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](https://github.com/SAP/abap-atc-cr-cv-s4hc) release state repo. Useful for clean core compliance discovery. |
  80. | `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. |
  81. ### `sap-docs` variant only
  82. | Tool | Description |
  83. |------|-------------|
  84. | `sap_discovery_center_search` | Search the SAP Discovery Center service catalog for BTP services by keyword, category, or license model. |
  85. | `sap_discovery_center_service` | Get comprehensive BTP service details: pricing plans, product roadmap, documentation links, and key features. Accepts a service UUID or name. |
  86. | `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](.claude/skills/ui5-version-upgrade/SKILL.md) and `@ui5/mcp-server` for a full upgrade workflow. |
  87. ### `abap` variant only
  88. | Tool | Description |
  89. |------|-------------|
  90. | `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. |
  91. ## Architecture Overview
  92. - Upstream source of truth: `mcp-sap-docs`
  93. - One-way sync target: `abap-mcp-server`
  94. - Search defaults to **BM25 keyword ranking**; optional semantic scores are combined via Reciprocal Rank Fusion (RRF)
  95. - Embeddings model: `Xenova/all-MiniLM-L6-v2` (~90 MB, cached in `dist/models/`)
  96. ## Variant Selection
  97. Resolution order:
  98. 1. `MCP_VARIANT` environment variable
  99. 2. `.mcp-variant` file in repo root
  100. 3. fallback: `sap-docs`
  101. Examples:
  102. ```bash
  103. # Run as full sap-docs profile
  104. MCP_VARIANT=sap-docs npm run setup
  105. MCP_VARIANT=sap-docs npm run build
  106. MCP_VARIANT=sap-docs npm run start:streamable
  107. # Run as ABAP profile
  108. MCP_VARIANT=abap npm run setup
  109. MCP_VARIANT=abap npm run build
  110. MCP_VARIANT=abap npm run start:streamable
  111. ```
  112. ## Search Behavior
  113. `search` performs fused retrieval over:
  114. - Offline FTS index (local submodule content)
  115. - Optional online sources (`includeOnline=true`):
  116. - SAP Help
  117. - SAP Community
  118. - Software Heroes content search (EN/DE merge + dedupe)
  119. Ranking and filtering highlights:
  120. - **BM25 search with optional semantic ranking** — keyword and meaning, fused via RRF
  121. - Reciprocal Rank Fusion (RRF) across offline and online sources
  122. - Source-level boosts from metadata
  123. - `includeSamples` can remove sample-heavy sources
  124. - `abapFlavor` (`standard` / `cloud` / `auto`) filters official ABAP docs libraries while keeping non-ABAP sources
  125. - `sources` can restrict offline libraries explicitly
  126. ## Fetch content limits
  127. Community post bodies are returned as Markdown, including code, links, images and
  128. tables. Clients that previously parsed raw Community HTML must consume Markdown.
  129. Document IDs, source URLs and response schemas are unchanged.
  130. If conversion fails, that post keeps its original HTML with a notice; other
  131. posts in the same batch are still returned.
  132. SAP Help and Community fetches default to 75,000 characters. Shortened results
  133. include `metadata.truncation` with exact loss counts. Self-hosted servers can set
  134. `MAX_CONTENT_LENGTH` before startup; see [content size limits](docs/CONTENT-SIZE-LIMITS.md).
  135. Each outbound SAP Help or Community HTTP request has a 10-second timeout, including
  136. reading its response body. Self-hosted servers can set `SAP_HELP_TIMEOUT_MS` and
  137. `SAP_COMMUNITY_TIMEOUT_MS` before startup. Values must be whole milliseconds from
  138. 1 to 2,147,483,647; invalid values use the default. A tool call that retrieves a
  139. document in several requests can take longer than one request timeout.
  140. ## Hybrid Search
  141. Offline search defaults to BM25 keyword ranking. Optional semantic ranking uses
  142. `Xenova/all-MiniLM-L6-v2` to reorder the lexical candidates; it does not search outside
  143. that candidate pool. Enable it explicitly with `EMBEDDING_WEIGHT=0.7` after building
  144. complete document and section embeddings and evaluating your own queries.
  145. Embeddings are stored in `docs.sqlite`, with the model cached in `dist/models/`.
  146. Old or partial embedding artifacts fall back to lexical ranking with a rebuild warning.
  147. See [docs/HYBRID-SEARCH.md](docs/HYBRID-SEARCH.md) for setup, limitations and costs.
  148. ## Offline-Only Mode
  149. `search` includes online sources by default. To run offline-only, use:
  150. - local index/submodules only (`npm run setup` + `npm run build`)
  151. - `includeOnline=false` in each `search` request
  152. Example `search` request body:
  153. ```json
  154. {
  155. "query": "RAP draft",
  156. "k": 8,
  157. "includeOnline": false
  158. }
  159. ```
  160. ### Docker (offline-only)
  161. Run the container with host binding and call `search` with `includeOnline=false`:
  162. ```bash
  163. docker run --rm -p 3122:3122 \
  164. -e MCP_VARIANT=sap-docs \
  165. -e MCP_PORT=3122 \
  166. -e MCP_HOST=0.0.0.0 \
  167. mcp-sap-docs
  168. ```
  169. For strict air-gapped execution, disable container networking:
  170. ```bash
  171. docker run --rm --network none -p 3122:3122 \
  172. -e MCP_VARIANT=sap-docs \
  173. -e MCP_PORT=3122 \
  174. -e MCP_HOST=0.0.0.0 \
  175. mcp-sap-docs
  176. ```
  177. Notes:
  178. - With `--network none`, online fetches are impossible by runtime isolation.
  179. - Startup may log warnings for online prefetch attempts (for example ABAP feature matrix); this does not prevent offline `search` usage.
  180. ## Quick Start (Local)
  181. ```bash
  182. npm ci
  183. npm run setup
  184. npm run build
  185. ```
  186. `npm run setup` updates the selected variant's documentation sources to their
  187. configured branch tips and builds the index, including embeddings. Nested
  188. submodules stay at the commits recorded by those sources. To omit optional nested
  189. repositories (for example when their upstream URLs require SSH credentials), use
  190. `SKIP_NESTED_SUBMODULES=1 npm run setup` in Bash, including Git Bash on Windows.
  191. `npm run setup:submodules` instead checks out the repository's recorded source
  192. commits. It does not fetch the latest documentation or apply variant filtering.
  193. Run `npm run setup` when refreshing an existing installation.
  194. Start server modes:
  195. ```bash
  196. # MCP stdio
  197. npm start
  198. # HTTP status/dev server
  199. npm run start:http
  200. # MCP streamable HTTP
  201. npm run start:streamable
  202. ```
  203. Default ports by variant:
  204. - `sap-docs`: HTTP `3001`, streamable `3122`
  205. - `abap`: HTTP `3002`, streamable `3124`
  206. Health checks:
  207. ```bash
  208. curl -sS http://127.0.0.1:3122/health | jq .
  209. curl -sS http://127.0.0.1:3001/status | jq .
  210. ```
  211. Use variant-specific ports when running `abap` profile.
  212. ## Build and Setup Scripts
  213. Script names remain shared (`setup`, `build`, `start`, `start:streamable`).
  214. Behavior changes by variant config:
  215. - `setup.sh` only initializes variant-allowed submodules
  216. - `build-index` only includes variant-allowed libraries
  217. - `build-fts` only indexes variant-allowed libraries
  218. This keeps `abap` faster and smaller without maintaining a separate build script set.
  219. ## Docker
  220. Build image for a variant:
  221. ```bash
  222. # sap-docs image
  223. docker build --build-arg MCP_VARIANT=sap-docs -t mcp-sap-docs .
  224. # abap image
  225. docker build --build-arg MCP_VARIANT=abap -t abap-mcp-server .
  226. ```
  227. Run streamable server:
  228. ```bash
  229. # sap-docs
  230. docker run --rm -p 3122:3122 \
  231. -e MCP_VARIANT=sap-docs \
  232. -e MCP_PORT=3122 \
  233. mcp-sap-docs
  234. # abap
  235. docker run --rm -p 3124:3124 \
  236. -e MCP_VARIANT=abap \
  237. -e MCP_PORT=3124 \
  238. abap-mcp-server
  239. ```
  240. ## SAP BTP Cloud Foundry
  241. For BTP CF, the recommended `sap-docs` path is to deploy the maintained
  242. `ghcr.io/marianfoo/mcp-sap-docs:sap-docs` image with MTA. Cloud Foundry only
  243. pulls and runs the prepared image, including embedding artifacts. Ranking remains
  244. lexical unless a positive `EMBEDDING_WEIGHT` is explicitly configured.
  245. See [docs/BTP-CF-DEPLOYMENT.md](docs/BTP-CF-DEPLOYMENT.md) for the public-first
  246. deployment guide. Start with
  247. [Deployment Options and Tradeoffs](docs/BTP-CF-DEPLOYMENT.md#deployment-options-and-tradeoffs)
  248. to choose between MTA, direct `cf push`, custom registry images, and refresh
  249. setup.
  250. ## One-Way Sync to `abap-mcp-server`
  251. This repository contains direct sync automation:
  252. - Workflow: `.github/workflows/sync-to-abap-main.yml`
  253. - Script: `scripts/sync-to-abap.sh`
  254. Flow:
  255. 1. Release Please publishes a release in `mcp-sap-docs` after its release PR is merged
  256. 2. The release workflow explicitly dispatches the ABAP sync workflow
  257. 3. The sync workflow clones `abap-mcp-server`
  258. 4. Tracked upstream files are synced (with exclude rules), then the ABAP overlay is applied
  259. 5. `.mcp-variant` is forced to `abap` and ABAP package identity is patched
  260. 6. A sync commit is pushed to `abap-mcp-server/main`
  261. 7. That push triggers the ABAP deployment workflow
  262. The sync workflow also supports manual runs, including dry runs and a custom target branch.
  263. Only pushes to the downstream `main` branch trigger automatic deployment.
  264. Required secret in `mcp-sap-docs` repo:
  265. - `ABAP_REPO_SYNC_TOKEN`: a dedicated token with access to push code and workflow
  266. changes to `abap-mcp-server`. Keep this separate from `GITHUB_TOKEN`, whose
  267. pushes do not trigger subsequent workflows.
  268. ## Deployment Model
  269. - `mcp-sap-docs`: owns release versions and dispatches its deployment and ABAP sync when a release is created
  270. - `abap-mcp-server`: deploys on pushes to `main`, including upstream sync commits, or via `workflow_dispatch`
  271. The downstream repository does not publish GitHub releases. Its deployment must
  272. therefore listen for sync pushes, not `release: published`. Upstream releases
  273. control when automatic syncs occur.
  274. The ABAP deployment workflow is maintained in
  275. `sync/abap.overlay/.github/workflows/deploy-abap-mcp-server.yml`. Change that
  276. upstream overlay so the fix persists across future syncs.
  277. After merging a deployment fix, publish the next upstream release or manually run
  278. `sync-to-abap-main.yml` against upstream `main`. Confirm that the downstream deploy
  279. run succeeds and that `https://mcp-abap.marianzeis.de/health` reports the version in
  280. the synced ABAP `package.json`; a successful sync alone does not confirm deployment.
  281. ## PM2 Runtime
  282. `ecosystem.config.cjs` is variant-aware and resolves:
  283. - process names
  284. - ports
  285. - deploy path
  286. from `config/variants/*.json`.
  287. ## Validation Commands
  288. ```bash
  289. npm run build:tsc
  290. npm run test:url-generation
  291. npm run test:integration
  292. npm run test:software-heroes
  293. npm run test:discovery-center # mocked Discovery Center REST contract tests
  294. npm run test:discovery-center:live # opt-in live API smoke test
  295. npm run test:sap-objects # SAP Released Objects unit tests
  296. # Variant-specific build checks
  297. MCP_VARIANT=sap-docs npm run build:index
  298. MCP_VARIANT=abap npm run build:index
  299. MCP_VARIANT=sap-docs npm run build:fts
  300. MCP_VARIANT=abap npm run build:fts
  301. ```
  302. ## Additional Docs
  303. - `docs/ARCHITECTURE.md`
  304. - `docs/DEV.md`
  305. - `docs/TESTS.md`
  306. - `docs/UPSTREAM-ONE-WAY-SYNC-IMPLEMENTATION.md`
  307. - `REMOTE_SETUP.md`
  308. [werkbank-badge]: assets/add-to-werkbank.svg
  309. [werkbank-install]: https://getwerkbank.com/install-mcp?name=sap-docs&config=eyJ0eXBlIjoic3RyZWFtYWJsZV9odHRwIiwidXJsIjoiaHR0cHM6Ly9tY3Atc2FwLWRvY3MubWFyaWFuemVpcy5kZS9tY3AiLCJkZXNjcmlwdGlvbiI6IlNBUCBkb2N1bWVudGF0aW9uLCBub3RlcyBhbmQgY29tbXVuaXR5IHNlYXJjaCJ9
  310. ### Curated SAP tutorials
  311. The SAP Docs profile includes 32 additional official tutorials in
  312. `sap-tutorials-ai`, `sap-tutorials-hana`, and `sap-tutorials-integration`:
  313. AI Core orchestration V2 and grounding, HANA Cloud SQLScript and CAP, Integration
  314. Suite MCP Gateway, and Cloud Transport Management. The existing Fiori OPA guide
  315. is still available separately.
  316. Use product and task terms, for example `SAP HANA Cloud SQLScript stored procedure
  317. tutorial` or `SAP Integration Suite MCP Gateway tutorial`. Use `sources` to narrow
  318. an ambiguous search; leave it unset for cross-source discovery. Tutorials provide
  319. worked examples and retain their prerequisites; product and SDK documentation
  320. remain the reference for detailed API behavior.
  321. The explicit selection is in [`config/tutorials.json`](config/tutorials.json).
  322. Fetched tutorials include readable option labels, absolute asset/prerequisite
  323. links, and their published page URL. The unpublished transport overview links to
  324. its official GitHub source. Source content and its original attribution are
  325. preserved; the original tutorial repository's license still applies.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.