๐Ÿค– API Patterns & Practices: APIs for Agents & LLMs
Home Chapters Examples Diagrams Bibliography GitHub โ†—
Home / Build: MCP packaging
Part 2 4 chapters

Build: MCP packaging

Build the tool surface itself: packaging an API as MCP tools, progressive discovery, and securing what an agent can call.

Chapter 13

Package an API as MCP Tools

quarkus-mcp-server packages an existing API's operations as registered MCP tools, resources and prompts.

25 minutesRead โ†’
Chapter 14

Domain-Split Toolset and Progressive Discovery

Splitting a large toolset by domain and discovering it progressively keeps an agent's tool list small enough to pick from accurately.

25 minutesRead โ†’
Chapter 15

Reshape not Wrap: Heterogeneous Protocols

A gRPC service sits behind the same agent-facing facade as a REST or GraphQL one, reshaped for the caller instead of wrapped unchanged.

25 minutesRead โ†’
Chapter 16

Securing and Gating MCP Tools

An MCP tool surface is scoped and gated the same way any other credentialed API is, not left open because the caller happens to be a model.

25 minutesRead โ†’
โ† Previous part Build: synchronous APIs Next part โ†’ Build: asynchronous APIs

API Patterns & Practices: APIs for Agents & LLMs

A pattern catalog for building APIs that AI agents and LLMs consume: REST and GraphQL as MCP tools, event-driven agent wakeups on Kafka, and the identity, traffic and observability guardrails a production agent-facing surface needs. Built on Quarkus, Apache Camel and Kafka; every pattern states a stack-neutral contract that transfers to Python/FastAPI and Strawberry GraphQL.

References

  • Model Context Protocol โ†—
  • Quarkus โ†—
  • Apache Camel โ†—
  • Apache Kafka โ†—
  • Quarkus LangChain4j โ†—

Project

  • View on GitHub โ†—
  • Issues โ†—
  • patterncatalyst โ†—
Open source ยท Apache 2.0 (code), CC BY 4.0 (prose) Last built 2026-11-21