Skip to content
Back to search

cds-mcp

Model Context Protocol (MCP) server for AI-assisted development of CAP applications.

Safety scan

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

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/cap-js/mcp-server with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/cap-js/mcp-server'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cap-js--mcp-server/badge.svg)](/listings/cap-js--mcp-server)

HTML

<a href="/listings/cap-js--mcp-server"><img src="/api/listings/cap-js--mcp-server/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.

Configure your MCP client (Cline, opencode, Claude Code, GitHub Copilot, etc.) to start the server using the command `npx -y @cap-js/mcp-server` as in the following examples.

Usage in Claude Code

Register the server with [Claude Code](https://claude.com/claude-code).

**For all projects (user scope):**

claude mcp add --scope user cds-mcp -- npx -y @cap-js/mcp-server

**For the current project only (local scope, not committed):**

claude mcp add cds-mcp -- npx -y @cap-js/mcp-server

**For the current project only (committed to the repository):**

claude mcp add --scope project cds-mcp -- npx -y @cap-js/mcp-server

To set an environment variable, add `--env` before the server name:

claude mcp add --scope user --env CDS_MCP_MODEL=nomic-ai/nomic-embed-text-v1.5 cds-mcp -- npx -y @cap-js/mcp-server

Usage in VS Code

Example for VS Code extension [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev):

{
  "mcpServers": {
    "cds-mcp": {
      "command": "npx",
      "args": ["-y", "@cap-js/mcp-server"],
      "env": {}
    }
  }
}

Example for VS Code global [mcp.json](https://code.visualstudio.com/docs/copilot/customization/mcp-servers): > Note: GitHub Copilot uses the `mcp.json` file as source for it's Agent mode.

{
  "servers": {
    "cds-mcp": {
      "command": "npx",
      "args": ["-y", "@cap-js/mcp-server"],
      "env": {},
      "type": "stdio"
    },
    "inputs": []
  }
}

To set an environment variable, replace the server's empty `env` object with:

"env": {
  "CDS_MCP_MODEL": "nomic-ai/nomic-embed-text-v1.5"
}

See [VS Code Marketplace](https://marketplace.visualstudio.com/search?term=tag%3Aagent&target=VSCode&category=All%20categories&sortBy=Relevance) for more agent extensions.

Usage in OpenAI Codex

Register the server with [OpenAI Codex](https://openai.com/codex):

codex mcp add cds-mcp -- npx -y @cap-js/mcp-server

To set an environment variable, add `--env` before the command:

codex mcp add cds-mcp --env CDS_MCP_MODEL=nomic-ai/nomic-embed-text-v1.5 -- npx -y @cap-js/mcp-server

Usage in opencode

Add to `opencode.jsonc` in your project, or to `~/.config/opencode/opencode.jsonc` for global use:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "cds-mcp": {
      "type": "local",
      "command": ["npx", "-y", "@cap-js/mcp-server"],
      "environment": {
        "CDS_MCP_MODEL": "nomic-ai/nomic-embed-text-v1.5"
      },
      "enabled": true
    }
  }
}

This is the [opencode v1](https://opencode.ai/docs/mcp-servers/) format. In [opencode v2](https://opencode.ai/v2/docs/mcp-servers/), use the same config but nest the server under `"servers"` — `"mcp": { "servers": { "cds-mcp": { ... } } }` — or use the CLI instead:

opencode mcp add --global cds-mcp -- npx -y @cap-js/mcp-server

To set an environment variable:

opencode mcp add --global cds-mcp \
  --env CDS_MCP_MODEL=nomic-ai/nomic-embed-text-v1.5 \
  -- npx -y @cap-js/mcp-server

Environment Variables

> [!WARNING] > The following environment variables are still experimental.

| Variable | Description | | --- | --- | | `CDS_MCP_OFFLINE` | Set to `true` to use locally cached embeddings without checking for updates. Accepts `true` or `false`. | | `CDS_MCP_MODEL` | Non-empty embedding model name. | | `CDS_MCP_MANIFEST_TIMEOUT` | Manifest request timeout in positive integer milliseconds. Defaults to `15000`. | | `CDS_MCP_DOWNLOAD_TIMEOUT` | Bundle response-header timeout in positive integer milliseconds. Defaults to `30000`. | | `CDS_MCP_GENERIC_EMBEDDINGS` | Set to `true` to skip the runtime filter and search all runtimes. By default `search_docs` keeps only the chunks of the detected project runtime (Node.js or Java) plus the runtime-agnostic chunks. |

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.

.claude-plugin/plugin.json · Manifest · 12 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. {
  2. "name": "cds-mcp",
  3. "version": "0.1.0",
  4. "description": "Model Context Protocol (MCP) server for AI-assisted development of CAP applications.",
  5. "author": {
  6. "name": "SAP SE"
  7. },
  8. "homepage": "https://cap.cloud.sap/",
  9. "repository": "https://github.com/cap-js/mcp-server",
  10. "license": "Apache-2.0",
  11. "keywords": ["sap", "cap", "cds", "mcp"]
  12. }
README.md · README · 365 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. # Welcome to @cap-js/mcp-server
  2. [![REUSE status](https://api.reuse.software/badge/github.com/cap-js/mcp-server)](https://api.reuse.software/info/github.com/cap-js/mcp-server)
  3. ## About This Project
  4. A Model Context Protocol (MCP) server for the [SAP Cloud Application Programming Model (CAP)](https://cap.cloud.sap).
  5. Use it for AI-assisted development of CAP applications (_agentic coding_).
  6. The server helps AI models answer questions such as:
  7. - _Which CDS services are in this project, and where are they served?_
  8. - _What are the entities about and how do they relate?_
  9. - _How do I add columns to a select statement in CAP Node.js?_
  10. ## Table of Contents
  11. - [About This Project](#about-this-project)
  12. - [Requirements](#requirements)
  13. - [Setup](#setup)
  14. - [Usage in VS Code](#usage-in-vs-code)
  15. - [Usage in Claude Code](#usage-in-claude-code)
  16. - [Usage in OpenAI Codex](#usage-in-openai-codex)
  17. - [Usage in opencode](#usage-in-opencode)
  18. - [CLI Usage](#cli-usage)
  19. - [Environment Variables](#environment-variables)
  20. - [Available Tools](#available-tools)
  21. - [`search_model`](#search_model)
  22. - [`search_docs`](#search_docs)
  23. - [JavaScript API](#javascript-api)
  24. - [Support, Feedback, Contributing](#support-feedback-contributing)
  25. - [Security / Disclosure](#security--disclosure)
  26. - [Code of Conduct](#code-of-conduct)
  27. - [Licensing](#licensing)
  28. - [Acknowledgments](#acknowledgments)
  29. ## Requirements
  30. See [Getting Started](https://cap.cloud.sap/docs/get-started) on how to jumpstart your development and grow as you go with SAP Cloud Application Programming Model.
  31. ## Setup
  32. Configure your MCP client (Cline, opencode, Claude Code, GitHub Copilot, etc.) to start the server using the command `npx -y @cap-js/mcp-server` as in the following examples.
  33. ### Usage in Claude Code
  34. Register the server with [Claude Code](https://claude.com/claude-code).
  35. **For all projects (user scope):**
  36. ```sh
  37. claude mcp add --scope user cds-mcp -- npx -y @cap-js/mcp-server
  38. ```
  39. **For the current project only (local scope, not committed):**
  40. ```sh
  41. claude mcp add cds-mcp -- npx -y @cap-js/mcp-server
  42. ```
  43. **For the current project only (committed to the repository):**
  44. ```sh
  45. claude mcp add --scope project cds-mcp -- npx -y @cap-js/mcp-server
  46. ```
  47. To set an environment variable, add `--env` before the server name:
  48. ```sh
  49. claude mcp add --scope user --env CDS_MCP_MODEL=nomic-ai/nomic-embed-text-v1.5 cds-mcp -- npx -y @cap-js/mcp-server
  50. ```
  51. ### Usage in VS Code
  52. Example for VS Code extension [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev):
  53. ```json
  54. {
  55. "mcpServers": {
  56. "cds-mcp": {
  57. "command": "npx",
  58. "args": ["-y", "@cap-js/mcp-server"],
  59. "env": {}
  60. }
  61. }
  62. }
  63. ```
  64. Example for VS Code global [mcp.json](https://code.visualstudio.com/docs/copilot/customization/mcp-servers):
  65. > Note: GitHub Copilot uses the `mcp.json` file as source for it's Agent mode.
  66. ```json
  67. {
  68. "servers": {
  69. "cds-mcp": {
  70. "command": "npx",
  71. "args": ["-y", "@cap-js/mcp-server"],
  72. "env": {},
  73. "type": "stdio"
  74. },
  75. "inputs": []
  76. }
  77. }
  78. ```
  79. To set an environment variable, replace the server's empty `env` object with:
  80. ```json
  81. "env": {
  82. "CDS_MCP_MODEL": "nomic-ai/nomic-embed-text-v1.5"
  83. }
  84. ```
  85. See [VS Code Marketplace](https://marketplace.visualstudio.com/search?term=tag%3Aagent&target=VSCode&category=All%20categories&sortBy=Relevance) for more agent extensions.
  86. ### Usage in OpenAI Codex
  87. Register the server with [OpenAI Codex](https://openai.com/codex):
  88. ```sh
  89. codex mcp add cds-mcp -- npx -y @cap-js/mcp-server
  90. ```
  91. To set an environment variable, add `--env` before the command:
  92. ```sh
  93. codex mcp add cds-mcp --env CDS_MCP_MODEL=nomic-ai/nomic-embed-text-v1.5 -- npx -y @cap-js/mcp-server
  94. ```
  95. ### Usage in opencode
  96. Add to `opencode.jsonc` in your project, or to `~/.config/opencode/opencode.jsonc` for global use:
  97. ```jsonc
  98. {
  99. "$schema": "https://opencode.ai/config.json",
  100. "mcp": {
  101. "cds-mcp": {
  102. "type": "local",
  103. "command": ["npx", "-y", "@cap-js/mcp-server"],
  104. "environment": {
  105. "CDS_MCP_MODEL": "nomic-ai/nomic-embed-text-v1.5"
  106. },
  107. "enabled": true
  108. }
  109. }
  110. }
  111. ```
  112. This is the [opencode v1](https://opencode.ai/docs/mcp-servers/) format. In [opencode v2](https://opencode.ai/v2/docs/mcp-servers/), use the same config but nest the server under `"servers"` — `"mcp": { "servers": { "cds-mcp": { ... } } }` — or use the CLI instead:
  113. ```sh
  114. opencode mcp add --global cds-mcp -- npx -y @cap-js/mcp-server
  115. ```
  116. To set an environment variable:
  117. ```sh
  118. opencode mcp add --global cds-mcp \
  119. --env CDS_MCP_MODEL=nomic-ai/nomic-embed-text-v1.5 \
  120. -- npx -y @cap-js/mcp-server
  121. ```
  122. ### Environment Variables
  123. > [!WARNING]
  124. > The following environment variables are still experimental.
  125. | Variable | Description |
  126. | --- | --- |
  127. | `CDS_MCP_OFFLINE` | Set to `true` to use locally cached embeddings without checking for updates. Accepts `true` or `false`. |
  128. | `CDS_MCP_OFFLINE_DIR` | In offline mode, use this folder instead of the local cache. |
  129. | `CDS_MCP_MODEL` | Non-empty embedding model name. |
  130. | `CDS_MCP_MANIFEST_TIMEOUT` | Manifest request timeout in positive integer milliseconds. Defaults to `15000`. |
  131. | `CDS_MCP_DOWNLOAD_TIMEOUT` | Bundle response-header timeout in positive integer milliseconds. Defaults to `30000`. |
  132. | `CDS_MCP_GENERIC_EMBEDDINGS` | Set to `true` to skip the runtime filter and search all runtimes. By default `search_docs` keeps only the chunks of the detected project runtime (Node.js or Java) plus the runtime-agnostic chunks. |
  133. | `CDS_MCP_MAX_RESULTS` | Upper limit on the number of `search_docs` results, as a positive integer. Caps the per-call `maxResults`. |
  134. | `CDS_MCP_RERANK_ENABLED` | Set to `true` to rerank `search_docs` results with a local cross-encoder model. Accepts `true` or `false`; disabled by default. |
  135. | `CDS_MCP_RERANK_MODEL` | Non-empty cross-encoder model name used when reranking. Defaults to `Xenova/ms-marco-MiniLM-L-6-v2`. |
  136. | `CDS_MCP_RERANK_DTYPE` | Non-empty data type used to load the reranking model. Defaults to `q8`; set to `fp32` for models without `model_quantized.onnx`. |
  137. | `CDS_MCP_RERANK_EXTERNAL_DATA` | Set to `true` for reranking models whose ONNX weights are stored in external `.onnx_data` files. Accepts `true` or `false`. |
  138. | `CDS_MCP_RERANK_BATCH_SIZE` | Positive integer number of results to process in each reranking batch. Defaults to `1`. |
  139. ### Rules
  140. The following rules help the LLM use the server correctly:
  141. ```markdown
  142. - You MUST search for CDS definitions, like entities, fields and services (which include HTTP endpoints) with cds-mcp, only if it fails you MAY read \*.cds files in the project.
  143. - You MUST search for CAP docs with cds-mcp EVERY TIME you create, modify CDS models or when using APIs or the `cds` CLI from CAP. Do NOT propose, suggest or make any changes without first checking it.
  144. ```
  145. Add these rules to your existing global or project-specific [`AGENTS.md`](https://agents.md/) (specifics may vary based on respective MCP client).
  146. ### CLI Usage
  147. You can also use the tools directly from the command line.
  148. ```sh
  149. npm i -g @cap-js/mcp-server
  150. ```
  151. > [!WARNING]
  152. > When the package is installed globally, `npx` uses the installed version instead of downloading the latest from npm. You must update the package manually:
  153. > ```sh
  154. > npm update -g @cap-js/mcp-server
  155. > ```
  156. This will provide the command `cds-mcp`, with which you can invoke the tools directly as follows.
  157. ```sh
  158. # Search CAP documentation
  159. cds-mcp search_docs "how to add columns to a select statement in CAP Node.js" 1
  160. # Search for CDS model definitions
  161. cds-mcp search_model . Books entity
  162. ```
  163. ## Available Tools
  164. > [!NOTE]
  165. > Tools are meant to be used by AI models and do not constitute a stable API.
  166. The server provides these tools for CAP development:
  167. ### `search_docs`
  168. This tool uses vector embeddings to locally search through preprocessed CAP documentation, stored as embeddings. The process works as follows:
  169. 1. **Query processing:** Your search query is converted to an embedding vector.
  170. 2. **Similarity search:** The system finds documentation chunks with the highest semantic similarity to your query.
  171. This semantic search approach enables you to find relevant documentation even when your query does not use the exact keywords found in the docs, all locally on your machine.
  172. ### `search_model`
  173. This tool performs fuzzy searches against names of definitions from the compiled CDS model (Core Schema Notation).
  174. CDS compiles all your `.cds` files into a unified model representation that includes:
  175. - All definitions and their relationships
  176. - Annotations
  177. - HTTP endpoints
  178. The fuzzy search algorithm matches definition names and allows for partial matches, making it easy to find entities like "Books" even when searching for "book".
  179. ## JavaScript API
  180. Import the supported named exports from the package root:
  181. ```js
  182. import { createCapireEmbeddings, DEFAULT_MODEL } from '@cap-js/mcp-server'
  183. ```
  184. ### Generate capire embeddings from the command line
  185. Generate CAP documentation embeddings with a custom model.
  186. The CLI fetches `https://cap.cloud.sap/docs/llms-full.txt` automatically:
  187. ```sh
  188. cds-mcp createCapireEmbeddings --model nomic-ai/nomic-embed-text-v1.5
  189. ```
  190. See [Configuration](#configuration) for supported flags. Pass them after
  191. `cds-mcp createCapireEmbeddings`.
  192. Use `--output ./generated-embeddings` to select the output directory.
  193. ### Generate capire embeddings programmatically
  194. The API fetches CAP documentation from `https://cap.cloud.sap/docs/llms-full.txt` by default.
  195. Pass the chunking settings, custom model, and output settings to the API:
  196. ```js
  197. import { createCapireEmbeddings } from '@cap-js/mcp-server'
  198. const result = await createCapireEmbeddings(
  199. { minTokens: 10, maxHeadingDepth: 5 },
  200. {
  201. model: 'nomic-ai/nomic-embed-text-v1.5',
  202. capireMetadata: { commitId: 'documentation-revision', version: '1.0.0' }
  203. }
  204. )
  205. ```
  206. To generate multiple models programmatically, pass an array to
  207. `embeddingConfig.model`. The API returns an array of results in the same order.
  208. A single model name, or an omitted model, still returns one result object.
  209. To read a local file, use `chunkingConfig.input`. To supply Markdown directly,
  210. use `chunkingConfig.text`. An explicit input file takes precedence over supplied text.
  211. ```js
  212. await createCapireEmbeddings(
  213. { input: './guide.md', minTokens: 10 },
  214. { model: 'nomic-ai/nomic-embed-text-v1.5' }
  215. )
  216. ```
  217. ### Use generated embeddings in the MCP server
  218. Test your created embeddings with `cds-mcp`:
  219. ```sh
  220. CDS_MCP_OFFLINE=true CDS_MCP_OFFLINE_DIR="/absolute/path/to/generated/output" cds-mcp search_docs "How do I define a service?"
  221. ```
  222. To use your generated embeddings, configure your MCP client with the folder that contains them:
  223. ```json
  224. {
  225. "mcpServers": {
  226. "cds-mcp": {
  227. "command": "npx",
  228. "args": ["-y", "@cap-js/mcp-server"],
  229. "env": {
  230. "CDS_MCP_OFFLINE": "true",
  231. "CDS_MCP_OFFLINE_DIR": "/absolute/path/to/generated/output"
  232. }
  233. }
  234. }
  235. }
  236. ```
  237. ### Configuration
  238. The CLI and JavaScript API use these settings:
  239. | CLI flag | API option | Description |
  240. | --- | --- | --- |
  241. | `--input <file>` | `chunkingConfig.input` | Local CAP documentation file with the same heading and source annotation structure. Takes precedence over `chunkingConfig.text`. If neither is supplied, fetches `llms-full.txt`. |
  242. | — | `chunkingConfig.text` | Markdown supplied directly to the API. |
  243. | `--output <directory>` | `embeddingConfig.output` | Output directory; default `./embeddings`. |
  244. | `--results <file>` | — | Save a JSON result array (`dim`, `count`, `outDir`, `modelFolderName`) after all models succeed. Relative paths use the current working directory; the parent directory must exist. Generation failures leave an existing results file unchanged, but can leave files for earlier models. Without this flag, results appear alongside diagnostics on stdout. |
  245. | `--model <name>` | `embeddingConfig.model` | Embedding model. Repeat the flag or pass an API array for multiple models. Defaults to `CDS_MCP_MODEL` or `DEFAULT_MODEL` (`BAAI/bge-small-en-v1.5`). |
  246. | `--min-tokens <number>` | `chunkingConfig.minTokens` | Minimum chunk size in tokens. Integer greater than or equal to `0`; default `10`. |
  247. | `--max-heading-depth <number>` | `chunkingConfig.maxHeadingDepth` | Maximum heading depth. Integer greater than or equal to `1`; default `5`. |
  248. | `--capireMetadata <json-or-file>` | `embeddingConfig.capireMetadata` | JSON string or file containing an object with optional Capire metadata, such as `version`, `commitId`, `cdsDependency: { node, java }`, and caller-defined fields. CLI `commitId` must be a single directory name. |
  249. ## Support, Feedback, Contributing
  250. This project is open to feature requests/suggestions, bug reports, and so on, via [GitHub issues](https://github.com/cap-js/mcp-server/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
  251. ## Security / Disclosure
  252. If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/cap-js/mcp-server/security/policy) on how to report it. Please don't create GitHub issues for security-related doubts or problems.
  253. ## Code of Conduct
  254. We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/cap-js/.github/blob/main/CODE_OF_CONDUCT.md) at all times.
  255. ## Licensing
  256. Copyright 2025 SAP SE or an SAP affiliate company and @cap-js/cds-mcp contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/mcp-server).
  257. ## Acknowledgments
  258. - **onnxruntime-web** is used for creating embeddings locally.
  259. - **@huggingface/transformers.js** is used to compare the output of the WordPiece tokenizer.
  260. - **@modelcontextprotocol/sdk** provides the SDK for MCP.

Version history

  • v0.1.010/27/2026

Ratings and comments

Sign in to rate this skill.

Sign in

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