Home / Servers

@cap-js/mcp-server

by cap-js

Welcome to @cap-js/mcp-server

REUSE status

About This Project

A Model Context Protocol (MCP) server for the SAP Cloud Application Programming Model (CAP). Use it for AI-assisted development of CAP applications (agentic coding).

The server helps AI models answer questions such as:

  • Which CDS services are in this project, and where are they served?
  • What are the entities about and how do they relate?
  • How do I add columns to a select statement in CAP Node.js?

Table of Contents

Requirements

See Getting Started on how to jumpstart your development and grow as you go with SAP Cloud Application Programming Model.

Setup

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 VS Code

Example for VS Code extension Cline:

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

Example for VS Code global mcp.json:

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": []
  }
}

See VS Code Marketplace for more agent extensions.

Usage in opencode

Example for opencode:

{
  "mcp": {
    "cds-mcp": {
      "type": "local",
      "command": ["npx", "-y", "@cap-js/mcp-server"],
      "enabled": true
    }
  }
}

Rules

The following rules help the LLM use the server correctly:

- 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.
- 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.

Add these rules to your existing global or project-specific AGENTS.md (specifics may vary based on respective MCP client).

CLI Usage

You can also use the tools directly from the command line.

npm i -g @cap-js/mcp-server

This will provide the command cds-mcp, with which you can invoke the tools directly as follows.

# Search for CDS model definitions
cds-mcp search_model . Books entity

# Search CAP documentation
cds-mcp search_docs "how to add columns to a select statement in CAP Node.js" 1

Available Tools

[!NOTE] Tools are meant to be used by AI models and do not constitute a stable API.

The server provides these tools for CAP development:

search_model

This tool performs fuzzy searches against names of definitions from the compiled CDS model (Core Schema Notation). CDS compiles all your .cds files into a unified

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105