mcp-server · cap-js — MCP server for CAP: model and docs lookup
Lets your AI agent inspect a CDS project and search the CAP documentation, so its answers rest on the real model instead of guesses.
claude mcp add mcp-server -- npx -y @cap-js/mcp-serverWhat mcp-server does
The server answers questions about a SAP Cloud Application Programming Model project: which CDS services exist, where they are exposed, what the entities mean and how they connect. A second tool digs through CAP docs, covering things like adding columns to a select in Node.js.
Two tools ship with it: search_model and search_docs. By default the doc search drops chunks tied to the other runtime and keeps the shared ones, unless it cannot tell whether the project runs on Node.js or Java. Behaviour is tuned through environment variables: CDS_MCP_OFFLINE for cached embeddings, CDS_MCP_MAX_RESULTS to cap output, RERANK_ENABLED for local reranking.
Startup takes one command, npx -y @cap-js/mcp-server, with no separate process to host. Put the suggested rules into AGENTS.md so the agent queries cds-mcp before touching *.cds files. Skip that step and it may rewrite your data model blind.
What it helps with
- List the CDS services in a project and their HTTP endpoints
- Work out what entities exist and how they relate
- Check CAP syntax before editing a CDS model
- Keep doc hits to the project runtime, Node.js or Java
Example prompts for the agent
- Which CDS services does this project have and where are they served?
- Show me how the entities in the model are related
How to install mcp-server
Platform CLI
claude mcp add mcp-server -- npx -y @cap-js/mcp-serverPlatform CLI
codex mcp add cap-js-mcp-server -- npx -y @cap-js/mcp-serverConfig file
{
"mcpServers": {
"cap-js-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cap-js/mcp-server"
]
}
}
}Config file
{
"servers": {
"cap-js-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cap-js/mcp-server"
]
}
}
}Platform CLI
gemini mcp add cap-js-mcp-server npx -y @cap-js/mcp-serverStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-server
How do I install mcp-server in Claude Code?
Run claude mcp add mcp-server -- npx -y @cap-js/mcp-server. It registers the server under the name mcp-server.
How do I install mcp-server in Claude Code?
Run codex mcp add cap-js-mcp-server -- npx -y @cap-js/mcp-server.
What does mcp-server do?
It lets an agent query the CDS model of your CAP project and pull matching passages from the CAP documentation. Both come as two tools: search_model and search_docs.
Similar MCP servers
All MCP servers for Agent setup: memory, context, orchestration →mcp-server by other authors comes first.