What it does
@cap-js/mcp-server bridges SAP Cloud Application Programming Model (CAP) projects with AI models, enabling agentic coding assistance. It exposes the compiled CDS (Core Schema Notation) model—encompassing all entities, fields, services, and HTTP endpoints—through fuzzy search, and provides semantic search over CAP documentation via vector embeddings. Both tools run locally, allowing AI to answer questions like "which CDS services are defined here" and "how do I add columns to a select statement" without leaving your editor.
Who it's for
Backend engineers and full-stack developers building CAP applications on SAP BTP who use AI coding assistants. Relevant if you're working in VS Code with Cline, using GitHub Copilot in Agent mode, or running Claude Code with MCP support, and want the AI to understand your CAP project structure and documentation.
Common use cases
- Query the compiled CDS model to list entities, services, and their relationships
- Find CAP documentation sections relevant to your current development task via natural language
- Have an AI agent modify
.cdsmodels with context-awareness of existing definitions - Generate boilerplate CAP code (query logic, service implementations) with accurate field and service references
- Ask the AI to explain how CDS definitions map to HTTP endpoints
Setup pitfalls
- Configuration differs by MCP client; VS Code, Cline, opencode, and GitHub Copilot each require different config formats
- Reads and writes the filesystem to index
.cdsfiles and cache embeddings—ensure the MCP client sandbox permits this - Initial run includes embedding CAP documentation, which requires disk space and may take time on first invocation
- AI models must be instructed to search the CDS model first before reading
.cdsfiles; omitting this rule causes incomplete or hallucinated definitions