# Cap JS MCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/cap-js/mcp-server  
**GitHub Stars:** 118  
**npm Downloads (last month):** 282742  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-server-107

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

## Tools
Capabilities this server exposes over MCP:

- **search_docs** — This tool uses vector embeddings to locally search through preprocessed CAP documentation, stored as embeddings. The process works as follows:
- **search_model** — This tool performs fuzzy searches against names of definitions from the compiled CDS model (Core Schema Notation).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## What cap-js/mcp-server does

cap-js/mcp-server supplies two MCP tools for AI-assisted development with SAP Cloud Application Programming Model applications. `search_docs` retrieves relevant passages from preprocessed CAP documentation using semantic similarity rather than exact keyword matching. `search_model` looks up definitions in the compiled CDS model, making it useful for finding entities, services, fields, relationships, annotations, and HTTP endpoints.

The server is intended for questions such as identifying services and their routes, understanding how entities relate, or checking the CAP-specific approach to a Node.js query. Its tools are designed for AI clients and are not presented as a stable programming API.

## How it works

Documentation queries are converted into embedding vectors and compared with locally stored documentation chunks. The documentation search can select content for the detected project runtime, keeping Node.js or Java material along with runtime-independent content. `CDS_MCP_GENERIC_EMBEDDINGS` can disable that runtime filtering. Optional local reranking can further reorder documentation results with a cross-encoder model.

Model searches operate on the unified representation produced when CDS compiles the project’s `.cds` files. Fuzzy matching supports partial or approximate definition names, so a query such as `book` can find a definition named `Books`.

## Setup and configuration

An MCP client can start the server with:

```sh
npx -y @cap-js/mcp-server
```

The documented configurations include Claude Code, VS Code MCP configuration, Cline, OpenAI Codex, and opencode. It can also be installed globally with `npm i -g @cap-js/mcp-server`, which provides the `cds-mcp` command:

```sh
cds-mcp search_docs "how to add columns to a select statement in CAP Node.js" 1
cds-mcp search_model . Books entity
```

Global installations must be updated manually with `npm update -g @cap-js/mcp-server`; otherwise, `npx` uses the installed package version.

Environment settings are experimental. `CDS_MCP_OFFLINE=true` uses cached embeddings without checking for updates. `CDS_MCP_MODEL` selects the embedding model, while timeout variables control manifest and bundle-download requests. Result limits, runtime filtering, and optional reranking can also be configured through the documented `CDS_MCP_*` variables.

## Tools and capabilities

- `search_docs` performs local semantic search over preprocessed CAP documentation.
- `search_model` performs fuzzy searches against names in the compiled CDS model.
- Documentation results can be capped with `CDS_MCP_MAX_RESULTS`.
- Reranking can be enabled with `CDS_MCP_RERANK_ENABLED=true` and configured with a cross-encoder model and runtime options.
- The compiled model search exposes project definitions and related model information, including service endpoints.

_Full upstream README: https://allmcps.com/mcp/mcp-server-107/readme_

