You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP server for SAP Cloud Application Programming Model (`@cap-js/mcp-server`) is a Model Context Protocol server for AI-assisted development (_vibe coding_) of CAP applications.
8
+
MCP server for SAP Cloud Application Programming Model (`@cap-js/mcp-server`) is a Model Context Protocol server for AI-assisted development (_agentic coding_) with CAP applications.
11
9
12
-
The server is supposed to help AI models answer questions like
10
+
The server helps AI models answer questions like:
13
11
14
12
-_Which CDS services are there in this project and where are they served?_
15
13
-_What are the entities about?_
16
14
-_How do they relate?_
15
+
-_How do I add columns to a select statement in CAP Node.js?_
16
+
17
+
## Available Tools
18
+
19
+
The server provides two main tools for CAP development:
20
+
21
+
### `search_model`
22
+
23
+
Search for CDS definitions (entities, services, actions) including:
17
24
18
-
## Requirements
25
+
- Model structure and relationships
26
+
- Annotations and metadata
27
+
- HTTP endpoints and OData URLs
28
+
- File locations
19
29
20
-
See [Getting Started](https://cap.cloud.sap/docs/get-started) on how to jumpstart your development and grow as you go with SAP Cloud Application Programming Model.
30
+
### `search_docs`
31
+
32
+
Search CAP documentation for:
33
+
34
+
- Code snippets and examples
35
+
- API usage patterns
36
+
- Best practices
37
+
- Implementation guides
21
38
22
39
## Setup
23
40
@@ -30,14 +47,26 @@ npm i -g @cap-js/mcp-server@.
30
47
31
48
## Usage
32
49
33
-
Configure your MCP Client (Cline, Codex, opencode, etc.) to use the server with command `cds-mcp`.
34
-
The following rules help to guide the LLM to use the servers correctly:
50
+
Configure your MCP client (Cline, Codex, opencode, etc.) to use the server with command `cds-mcp`.
51
+
The following rules help guide the LLM to use the server correctly:
35
52
36
53
```markdown
37
54
- 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.
38
55
- You MUST search for CAP docs with cds-mcp EVERY TIME you modify CDS models or when using APIs from CAP. Do NOT propose, suggest or make any changes without first checking it.
39
56
```
40
57
58
+
### CLI Usage
59
+
60
+
You can also use the tools directly from the command line:
61
+
62
+
```sh
63
+
# Search for CDS model definitions
64
+
cds-mcp search_model . Books entity
65
+
66
+
# Search CAP documentation
67
+
cds-mcp search_docs "how to add columns to a select statement in CAP Node.js"
68
+
```
69
+
41
70
### Usage in VS Code
42
71
43
72
**Register the server** once: run command `MCP: Add Server...`.
@@ -76,24 +105,40 @@ Don't forget to add the rules to `~/.config/opencode/AGENTS.md`, or in your proj
76
105
You can test the server with the _MCP Inspector tool_:
See the [MCP Inspector docs](https://modelcontextprotocol.io/docs/tools/inspector) for more.
84
112
85
-
## Support, Feedback, Contributing
113
+
## How It Works
114
+
115
+
The server provides two complementary search mechanisms optimized for different use cases:
116
+
117
+
### `search_model` - Compiled Model Search
118
+
119
+
This tool performs fuzzy search against the compiled CDS model (CSN - Core Schema Notation). When you run a CAP project, CDS compiles all your `.cds` files into a unified model representation that includes:
120
+
121
+
- All entities, services, actions, and their relationships
122
+
- Resolved annotations and metadata
123
+
- Generated HTTP endpoints and OData URLs
124
+
- Cross-references between definitions
125
+
126
+
The fuzzy search algorithm matches definition names and allows for typos or partial matches, making it easy to find entities like "Books" even when searching for "book" or "boks".
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/cap-js/mcp-server/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
130
+
This tool uses vector embeddings to search through CAP documentation content stored locally. The process works as follows:
88
131
89
-
## Security / Disclosure
132
+
1.**Pre-processing**: CAP documentation is chunked into semantic sections and converted to vector embeddings using a local embedding model
133
+
2.**Query processing**: Your search query is also converted to an embedding vector
134
+
3.**Similarity search**: The system finds documentation chunks with the highest semantic similarity to your query
90
135
91
-
If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/cap-js/mcp-server/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
136
+
This approach enables semantic search - you can find relevant documentation even when your query doesn't contain exact keywords from the docs.
92
137
93
-
## Code of Conduct
138
+
## How to Obtain Support
94
139
95
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/cap-js/.github/blob/main/CODE_OF_CONDUCT.md) at all times.
140
+
In case you find a bug, please report an [incident](https://cap.cloud.sap/docs/resources/#support-channels) on SAP Support Portal.
96
141
97
-
## Licensing
142
+
## License
98
143
99
-
Copyright 2025 SAP SE or an SAP affiliate company and mcp-server contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/mcp-server).
144
+
This package is provided under the terms of the [SAP Developer License Agreement](https://cap.cloud.sap/resources/license/developer-license-3_2_CAP.txt).
0 commit comments