Add MCP capabilities to a CAP service
A fifteen-minute walkthrough of turning a plain CAP service into an MCP server: annotate the service with @mcp, install @cap-js/mcp@cap-js/mcpA CAP plugin that serves an @mcp-annotated service over MCP with three generated tools, describe, query and call_action, and writes its endpoint into the local agent's configuration in development.sap official, cap, and it is served alongside OData at /mcp/<path>. The part worth reading it for is what happens next — cds watch writes the endpoint into the local agent's own configuration file, so OpenCode or Claude Code can call the service without anyone editing JSON by hand. It is built on the tiny-sample facet, so there is nothing to prepare, and it shows the protocol traffic rather than only the result. Written while the adapter was in beta, and it says so.
Where it sits
Who is behind it
Developer Advocate
In the atlas: contributes to 20, wrote 22@qmacroauthor
Properties
About this work
For mcp-servers
Details
Graph
Source
History
- Entered the atlasDiscovered via Added by hand.
For your agent
- Ref
content:sap-tutorial-add-mcp-capabilities-to-a-cap-service- JSON
- /content/sap-tutorial-add-mcp-capabilities-to-a-cap-service.json
- MCP
- Connecting an agent