MCP in Production cover

The MCP spec is good. The reference SDKs are good. The "hello world" tutorials are good. None of them tell you what happens between "my server returns a tool list" and "my server has been running in production for six months, the auth model survives a security review, and when it breaks I know within four minutes."

That gap is what this book is about. Twelve chapters drawn from running fourteen MCP servers in production at Yaw Labs - tailscale-mcp, aws-mcp, npmjs-mcp, lemonsqueezy-mcp, and the rest. Each chapter is grounded in a server you can read.

Buy the book $59

PDF + EPUB. Free updates as the spec evolves. Read Chapter 1 free. Secure checkout.

What's in the twelve chapters

Part 1 - Foundations

  • Chapter 1. Why MCP, and what it actually is - the three primitives, the two transports, what MCP solved that Plugins and function-calling didn't. Free preview.
  • Chapter 2. Anatomy of a server - stdio adapter, HTTP service, in-process embedded; the four architectural shapes a real server takes.
  • Chapter 3. Building your first production-grade server - worked example, npm init through npm publish. Every chapter from here refers back.

Part 2 - Surface

  • Chapter 4. Auth, secrets, and identity flow - the four common patterns, the LLM-vs-human identity problem, what to do when your upstream API doesn't fit.
  • Chapter 5. Schema design, or how to not poison the model - the longest chapter. Naming, parameter modeling, the tool-list size problem (40,000 tokens is not OK).
  • Chapter 6. Tools that compose - output-shape-as-input-shape, pagination, list-then-detail, idempotency, cross-server composition.
  • Chapter 7. Error handling that the model can act on - throw discipline, trigger phrases, transient vs terminal retry, a six-axis grading rubric.

Part 3 - Lifecycle

  • Chapter 8. Testing a probabilistic consumer - unit, integration, and end-to-end testing patterns when the consumer is non-deterministic; the harness pattern that makes E2E tolerable.
  • Chapter 9. Hosting, scaling, and not going broke on idle - six realistic options, an honest comparison of managed MCP platforms, container packaging, reproducible builds off your laptop.
  • Chapter 10. Security review survival - the threat model, the mitigations, the questions a competent reviewer will ask, a checklist you can run yourself.

Part 4 - In practice

  • Chapter 11. Case studies from the @yawlabs portfolio - tailscale-mcp (the first one), npmjs-mcp (auth-shaped), aws-mcp (schema-shaped), lemonsqueezy-mcp (errors and money). Architecture, surprises, what a v2 would look like.
  • Chapter 12. What's next, and what to bet on - in-flight spec changes, ecosystem gaps, and the bets I'd make today.

Who it's for

You ship code for a living. You have read the MCP spec and shipped at least one server. You know what tools/list and notifications/initialized are without looking them up. You want to know why your aws-mcp tool list is 40,000 tokens and what to do about it.

You're somewhere between mid and senior on the IC ladder, or a tech lead deciding how to invest your team's MCP work.

Not for: spec walkthroughs (modelcontextprotocol.io does that better), "what is MCP" introductions, or vendor-neutral tool surveys.

Companion volume

MCP in Production is Volume I of the Yaw Labs Production Series. Volume II, Claude Code in Production, covers the operator side - running the agent that calls these servers. Together they bracket the agentic-tooling stack: the builder's view of MCP and the operator's view of Claude Code.

What's in the box

  • The book in PDF and EPUB.
  • Free updates as the MCP spec evolves and the @yawlabs servers ship new lessons.
  • Read Chapter 1 free at mcp.hosting/mcp-in-production.
  • Pointers into the live @yawlabs/* server repositories the book references.

Buy MCP in Production

Twelve chapters. PDF + EPUB. Free updates. $59 one-time, secure checkout.

Buy the book $59

Companion volume: Claude Code in Production. Companion course: Production MCP. Built on the same patterns as the mcp.hosting platform and the @yawlabs/mcph CLI.