jpnqs

Bookshop MCP Example

Community jpnqs
Updated

Sample implementation of CAP based MCP server https://cap.cloud.sap/docs/guides/protocols/mcp

Bookshop MCP Example

A minimal CAP bookshop sample that exposes its service via the Model Context Protocol (MCP), letting AI agents and LLM tools query it directly.

Official CAP MCP docs: https://cap.cloud.sap/docs/guides/protocols/mcp

Setup

npm install

Run

cds watch

The MCP server starts automatically and is registered with local MCP clients (Claude Code, Opencode).

How it works

The CatalogService in srv/cat-service.cds is annotated with @mcp, which is all that's needed to expose it as an MCP server:

annotate CatalogService with @mcp;

The adapter creates three tools per service:

Tool Purpose
describe Returns the data model (entities, actions, functions)
query Reads data — supports select, where, orderBy, limit, etc.
call_action Invokes unbound actions/functions (e.g. submitOrder, checkAvailability)

Try it

With Claude Code or Opencode running, just ask:

list books with authors and genres

Inspect tools

npm run inspector

Opens the MCP Inspector at http://localhost:5173. Connect to http://localhost:4004/mcp/browse to browse tools interactively.

MCP Server · Populars

MCP Server · New

    longsizhuo

    openInvest

    基于multiple LLM的风险投资助手

    Community longsizhuo
    CCCpan

    Gebaini

    中国数据核验 MCP Server | 身份核验/企业查询/车辆信息/OCR识别/风险评估 | 10个Tool覆盖5大类 | 微信: chenganp | 邮箱: [email protected]

    Community CCCpan
    ucsandman

    DashClaw

    🛡️The governance runtime for AI agents. Intercept actions, enforce guard policies, require approvals, and produce audit-ready decision trails.

    Community ucsandman
    ClementRingot

    SAP Released Objects Server

    Server for SAP Cloudification Repository - Clean Core Level A/B/C/D filtering

    Community ClementRingot
    raintree-technology

    docpull

    Convert the public web into AI-ready Markdown with a local Python CLI/SDK/MCP crawler.