---
id: mcp-tools
name: MCP Tools
version: 1.0.0
summary: |
  Internal stateless MCP server that exposes read-only Catalog tools and
  reusable AI prompts to BookWorm AI clients.
scope: internal
owners:
  - ai-capabilities-team
services:
  - id: mcp-server
    version: 1.0.0
relationships:
  - id: product-catalog-system
    version: 1.0.0
    label: reads book, category, and author data through Catalog API
  - id: rating-system
    version: 1.0.0
    label: supplies Rating agents with book data and analysis prompts
  - id: identity-provider
    version: 1.0.0
    label: authenticates and authorizes MCP requests
repository:
  language: C#
  url: https://github.com/foxminchan/BookWorm
badges:
  - content: Internal
    backgroundColor: gray
    textColor: gray
    icon: LockClosedIcon
---

## System Purpose & Boundary

MCP Tools provides a stateless, read-only Model Context Protocol (MCP) integration layer within the [[domain|conversational]] domain for BookWorm's internal AI clients ([[system|chat-system]] and [[system|rating-system]]). It exposes curated catalog lookup tools and reusable AI prompt templates while keeping all product and review data owned by their source systems. Mutating catalog or review records, storing conversation state, and serving public storefront traffic are explicitly out of scope.

:::note
MCP Tools is completely stateless and owns no databases, caches, or messaging channels. Server-side authorization and default-deny governance policies enforce read-only access regardless of which tools a client chooses to load.
:::

## Contained Capabilities

| Service / Agent         | Role in System                                                                               | Primary Data Store | Interaction Style (Sync / Async) |
| :---------------------- | :------------------------------------------------------------------------------------------- | :----------------- | :------------------------------- |
| [[service\|mcp-server]] | Exposes read-only Catalog lookup tools and reusable AI prompt templates over Streamable HTTP | None (Stateless)   | Sync (Streamable HTTP / gRPC)    |

## External Interactions & Trust Boundaries

- **AI consumers:** [[service|chat-api]] and [[service|rating-api]] connect over internal Streamable HTTP using [[system|identity-provider]] On-Behalf-Of (OBO) token exchange and required read scopes.
- **Upstream catalog reads:** [[service|mcp-server]] translates tool invocations into read-only gRPC queries against [[service|catalog-api]] in [[system|product-catalog-system]].
- **No public gateway exposure:** The service is internal-only and not exposed as a public storefront API.

<Accordion title="Capability Selection & Governance Notes">
	- **Selective client loading:** [[system|chat-system]] loads only the catalog search, book detail,
	category, and author tools; [[system|rating-system]] uses the book detail tool alongside
	review-summarization and quality-analysis prompts while reading raw reviews in-process. -
	**Fail-explicitly:** Upstream catalog errors or missing records return explicit error or not-found
	responses without mutating state.
</Accordion>

## System Visualizations

### System Context

<ContextDiagram />

### Component Topology

<NodeGraph />

### Architecture Decisions

<ADRTable />

## Related Documentation

- [[flow|agent-orchestration]] — Conversational flow invoking catalog MCP tools.
- [[flow|feedback-publication]] — Review summarization flow consuming MCP book lookups and prompts.
- [[doc|domains/bookworm/subdomains/conversational/engineering/01-conversation-architecture]] — Conversational and MCP governance architecture.
