Skip to main content
Glama
jpnqs

Bookshop MCP Example

by jpnqs

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

Related MCP server: CAP MCP Plugin

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.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    MCP server for SAP CAP that enables AI-assisted development by searching CDS model definitions and CAP documentation.
    Last updated
    71,275
    105
    Apache 2.0
  • A
    license
    -
    quality
    A
    maintenance
    A CAP plugin that automatically generates MCP servers from your CAP services, transforming OData services into AI-accessible resources, tools, and prompts with minimal configuration.
    Last updated
    1,796
    62
    Apache 2.0
  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that exposes tools for querying a bookstore inventory, allowing AI agents to search and retrieve book information via the Model Context Protocol.
    Last updated
    312
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jpnqs/cap-bookshop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server