NewVol. 39 · Published Nov 26, 2026 · Book + Claude skill + MCP
The MCP Server Playbook
Build an MCP Server That Agents Can Use and Attackers Can't Abuse
$29 $5.80 Save 80%
Instant digital delivery. About 14k words.
About this playbook
Build, secure and publish MCP servers for Claude and other agents
A demo MCP server is easy to build. A server that keeps one tenant's records away from another, never applies the same write twice after a timeout and passes directory review is much harder. Much of the advice that ranks well in search also describes the 2025 protocol, which the July 2026 revision changed in basic ways.
The MCP Server Playbook takes you through nine steps: scope, protocol profile, tool design, a working vertical slice, security and authorization, evaluation, deployment, publishing and operations. Every step ends with a named deliverable. The book is written against MCP revision 2026-07-28, treats legacy 2025-11-25 support as its own decision, and includes Python and TypeScript v2 examples, OAuth templates, agent prompts and a release checklist.
Who it's for
- Developers who want their product, data or internal tools available to Claude and other agents over MCP
- Founders and product teams who see MCP as a new way to reach users without the user opening their UI
- Teams moving an MCP server built from 2025 tutorials to the 2026-07-28 protocol
- Engineers who must add OAuth, tenant isolation and safe writes before exposing real data
- Anyone getting a server ready for Claude's directory or the MCP registry
What you'll be able to do
- Turn real user requests into a short list of job-based tools with an explicit never list and refusal cases
- Pick transports, SDK versions and supported clients, and record the results in a compatibility matrix
- Write tool names, descriptions, schemas, annotations and errors that models choose correctly and reviewers accept
- Run your server as a correct OAuth resource server with protected resource metadata, audience-checked tokens and narrow scopes
- Bind approvals to concrete proposals and make retries safe with idempotency records
- Test protocol, application and agent behaviour separately, using held-out tasks and release gates you set in advance
- Deploy, publish and operate the server, including turning off writes while reads keep working
What's inside
Inside this volume
- 01
Jobs and the authority boundary
Group real requests into jobs, classify each action, map trust boundaries, write refusal cases first and keep the data contract small.
- 02
Protocol profile and compatibility
What changed between the legacy and 2026-07-28 eras, how to handle legacy clients deliberately, and which extensions to skip.
- 03
Designing the tool surface
Primitives, naming, description and schema rules, honest annotations, separate reads and writes, and result and error design.
- 04
One complete vertical slice
Python v2 and TypeScript v2 starters, connecting a real host, stdio and Streamable HTTP rules, and MRTR in place of server-initiated requests.
- 05
Security and authorization
Per-tool threat modeling, the lethal trifecta, OAuth resource-server requirements with templates, approval binding and safe retries.
- 06
Evaluating protocol, application and agent outcomes
Deterministic tests, Inspector protocol checks, agent task trials graded on final state, held-out sets and release gates.
- 07
Deploying and hardening
HTTPS, gateway routing, WAF and Origin settings, caching treated as an authorization decision, and logging that never exposes tokens.
Use it with your AI agent
Ask for the work. Your agent follows the playbook.
Install the Claude skill or connect the MCP with your license key. Then ask in plain language:
- “Read our support API and propose an MCP tool catalog of under 15 tools, with reads and writes in separate tools and a never list.”
- “Add OAuth resource-server checks to this MCP server: protected resource metadata, a 401 with WWW-Authenticate, audience validation and step-up 403s.”
- “Write negative tests for cross-tenant reads, stale proposals, replayed writes and wrong-audience tokens, then run them.”
- “Build an agent evaluation suite from these 20 user requests, hold out 20% of them, and report pass rates with trial counts.”
Questions
FAQ
Which MCP version does it cover?
Its baseline is MCP revision 2026-07-28, with a research cutoff of 22 November 2026. Support for 2025-11-25 clients is covered as a separate compatibility decision.
Do I need to know Python or TypeScript?
The worked examples use the Python v2 and TypeScript v2 SDKs. The method, templates and checklist apply whichever maintained SDK you choose.
Does it cover publishing to Claude's directory?
Yes. It explains the directory rules that most often cause rejection, such as missing annotations, tools that mix reads and writes, and directive descriptions. It also covers packaging and registry namespaces.
Is it only for servers that need OAuth?
No. It covers public-data servers without accounts, local stdio servers and remote servers that use delegated OAuth. Skip the OAuth sections only if your server has no user accounts.
Will following it make my server secure?
It gives you threat models, controls and negative tests for documented MCP attack classes. It also says plainly that some risks, such as prompt injection, can be reduced but not removed.
Better together
The Builder's Codex
Design, build, polish and ship apps with AI agents.
$551 $15.80 Save 97%