SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Examine the details of the Model Context Protocol on startup

By looking at what happens when we connect to an MCP adapter running in front of a CAP service, we learn more about the protocol and how we can improve our service annotations.

Overview

You will learn

  • How to use an MCP inspector
  • What the startup of an MCP client-server interation looks like
  • What the lowest common denominator set of tools are that are offered via CAP’s MCP adapter
DJ Adams D DJ Adams August 19, 2026
Created on August 18, 2026
Contributors

More from DJ Adams

See all 19 tutorials by DJ Adams →

Prerequisites

Prerequisites

You will need a development environment for CAP Node.js. See the tutorial Set up a self-contained development environment for CAP Node.js The assumptions in this tutorial are based on option 1 or option 2 in that tutorial, in that you have a VS Code (or GitHub Codespace) environment based on the foundation repository used in the setup described there, which also means that your starting directory will be /workspaces/cap-nodejs-dev-env. If you have your own CAP Node.js development environment setup, then please make the appropriate adjustments where necessary.

This tutorial is based on and follows on from the Add MCP capabilities to a CAP service tutorial, so please first complete that one before starting.

Steps

Intro

In CAP, MCP is “just another protocol”. But like the other protocols (such as OData and GraphQL) we should have some understanding of how MCP feels, what it looks like, and how it’s put to use.


Step 1 Start the CAP server

👉 To start, make sure you’re in the cap-add-mcp-capabilities/ project directory from the previous tutorial (mentioned earlier in the prerequisites), and start the CAP server up with DEBUG=mcp cds watch, which should emit log records including these:

Log
[mcp] - Adapter initialized { service: 'CatalogService' }
[cds] - serving CatalogService {
  at: [ '/odata/v4/catalog', '/mcp/catalog' ],
  decl: 'srv/cat-service.cds:2'
}
[mcp] - registering MCP services: [ 'CatalogService' ]
[mcp] - Written OpenCode config to: /home/node/.config/opencode/opencode.json
[cds] - server listening on { url: 'http://localhost:4004' }

From this log output we can discern that the MCP adapter (server) endpoint is at http://localhost:4004/mcp/catalog.

Step 2 Take a first look at the MCP inspector
+
Step 3 Create a catalog file
+
Step 4 Start up the inspector
+
Step 5 Connect the inspector to the server
+
Step 6 Examine the network requests
+
Step 7 Examine the protocol details
+
Step 8 Examine the tool details
+
Step 9 Try out the query tool
+
Step 10 Wrap-up and further info
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 10
1. Start the CAP server 2. Take a first look at the MCP inspector 3. Create a catalog file 4. Start up the inspector 5. Connect the inspector to the server 6. Examine the network requests 7. Examine the protocol details 8. Examine the tool details 9. Try out the query tool 10. Wrap-up and further info