# cap-js

> cap-js is an open-source MCP server for developer tools. Searches a CAP project's CDS model and CAP docs to support AI-assisted SAP development. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, VS Code, macOS, Windows, Linux
- **Repository:** https://github.com/cap-js/mcp-server
- **MCP Registry name:** io.github.cap-js/mcp-server
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-21

## About

This server is aimed at agentic coding on SAP Cloud Application Programming Model projects. It answers questions such as which CDS services a project has and where they are served, how entities relate, and how to extend a select statement in CAP Node.js.

Documentation search runs locally. The query is turned into an embedding and compared with preprocessed CAP docs stored as embeddings, and by default only chunks for the detected runtime (Node.js or Java) plus runtime-agnostic chunks are kept. Optional settings cover an offline mode, a choice of embedding model, a cap on results and a local reranking model. The README marks these variables as experimental and says the tools are meant for AI models and are not a stable API.

The README also supplies rules to paste into an AGENTS.md file, telling the model to search CDS definitions through the server before reading .cds files and to check the docs every time it changes models or uses the cds CLI. Setup examples cover Claude Code, VS Code with Cline or Copilot, OpenAI Codex and opencode, and a cds-mcp command can call the tools from a terminal.

## Features

- **CDS model search:** Finds entities, fields and services, including HTTP endpoints, in the project's CDS definitions.
- **Local doc search:** Searches preprocessed CAP documentation with embeddings, filtered to the project's runtime.
- **Optional reranking:** A local cross-encoder model can rerank documentation results when enabled.
- **Offline mode:** Uses locally cached embeddings without checking for updates.
- **Command-line use:** The cds-mcp command runs the same tools directly from a terminal.
- **Agent rules:** Ships suggested AGENTS.md rules so models check CAP docs before editing.

## Good for

- Ask which services a CAP project exposes
- Understand how entities in a CDS model relate
- Look up CAP Node.js API usage while coding
- Give a coding agent reliable CAP documentation
- Query a CDS model from the terminal

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `search_model`: Searches CDS definitions such as entities, fields and services in the project.
- `search_docs`: Searches preprocessed CAP documentation using local vector embeddings.

## FAQ

### How do I start cap-js?

Configure your MCP client to run npx -y @cap-js/mcp-server.

### Which tools does cap-js expose?

search_model for CDS definitions and search_docs for CAP documentation.

### Can cap-js run offline?

Yes, set CDS_MCP_OFFLINE to true to use locally cached embeddings.

### Is the tool interface stable?

The README says the tools are meant for AI models and do not constitute a stable API.

### Is cap-js free?

Yes. cap-js is open source, so you can use and self-host it for free.

### How do I add cap-js to Claude Code?

Run this command in your terminal: claude mcp add mcp-server -- npx -y @cap-js/mcp-server

### What are the best alternatives to cap-js?

The closest alternatives to cap-js are ARC-1, Lens MCP, Llmmcp, Copado Agentia and Codelens MCP.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [ARC-1](https://ai-powered.com/mcp/arc-1-2): ARC-1 is an open-source MCP server for developer tools.
- [Lens MCP](https://ai-powered.com/mcp/lens-mcp-2): Lens MCP is an open-source MCP server for developer tools.
- [Llmmcp](https://ai-powered.com/mcp/llmmcp): Llmmcp is an open-source MCP server for developer tools.
- [Copado Agentia](https://ai-powered.com/mcp/copado-agentia): Copado Agentia is an MCP server for developer tools.
- [Codelens MCP](https://ai-powered.com/mcp/codelens-mcp): Codelens MCP is an open-source MCP server for developer tools.
- [AI-Powered directory](https://ai-powered.com/mcp/ai-powered-directory): AI-Powered directory is a free MCP server for developer tools.
- [Plug and Ship](https://ai-powered.com/mcp/plug-and-ship): Plug and Ship is an open-source MCP server for developer tools.
- [Ref Tools MCP](https://ai-powered.com/mcp/ref-tools-mcp-2): Ref Tools MCP is an MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/cap-js
