Black Friday 2026: 80% off everything · code BLACKFRIDAY80 · ends Dec 1 · free Claude course

Ends in0d 00h 00m 00s

Free sample · no email · 2,304 of 13,969 words

The MCP Server Playbook

The opening of the playbook as your AI agent reads it. The full volume adds the step-by-step playbook, the prompts, the checklist and the sources.

1. The problem

An MCP server exposes software capabilities to an agent through a common interface. The hard part is deciding what those capabilities mean, who may use them, and what happens when execution fails halfway through.

The protocol gives you transport and message conventions. Your application still has to supply permissions, business rules, safe retries, useful errors and operating discipline. A server that passes a demo can still leak another tenant’s records, or repeat a write after a timeout.

Keep the components separate:

Component Responsibility
Host application Runs the agent experience and mediates user interaction
MCP client Talks to the server
MCP server Exposes supported operations and validates requests
Authorization server Issues delegated access tokens
Business service Enforces domain rules and does the actual work
External provider Supplies a downstream API or data source

Keep the business service usable without MCP. That gives you a stable place to test permissions and writes independently of model behaviour.

Why this matters now

MCP has become the common way to connect agents to tools and data. Anthropic introduced it in November 2024, and in December 2025 donated it to the Agentic AI Foundation under the Linux Foundation [31]. Claude (web, desktop, mobile and Claude Code), VS Code and many other hosts act as MCP clients [24][25]. For a software business this is a new distribution surface. A user who connects your server can ask an agent to do work in your product without opening your UI.

The protocol also changed underneath everyone. The June 2025 revision removed JSON-RPC batching, added structured tool output and clarified the server’s role as an OAuth resource server [3]. The November 2025 revision added experimental tasks, URL-mode elicitation and Client ID Metadata Documents (CIMD) for client registration [4]. The July 2026 revision is the largest break so far [2]:

  • The initialize handshake and protocol-level sessions are gone. Each request carries its protocol version and client capabilities in metadata, and server/discover handles discovery.
  • Server-initiated requests (elicitation, sampling, roots) are replaced by Multi Round-Trip Requests (MRTR). The server returns an input_required result and the client retries with answers [37].
  • Every result needs a resultType. Streamable HTTP requests carry Mcp-Method and, where relevant, Mcp-Name headers, so gateways can route without parsing bodies [7].
  • Cacheable results carry ttlMs and cacheScope [36].
  • Tasks moved out of the core into an extension. Roots, Sampling, Logging, the old HTTP+SSE transport and Dynamic Client Registration (DCR) are deprecated [2].

So “always initialize first” is no longer correct for a modern-only client, and “use the session ID to identify the user” was never sound authorization design.

Security problems are concrete and well documented. They include tool poisoning through hidden instructions in tool descriptions [19], private-repository exfiltration through a GitHub MCP integration [20], prompt-injected data leaks through a database MCP server [22], and a remote-code-execution flaw in the mcp-remote client, triggered by a crafted OAuth URL (CVE-2025-6514) [33]. The official SDK advisory indexes also list 2026 issues with audience validation, redirects, request limits and client isolation [34][35]. Most of these were design flaws, not typos, and choosing a well-known SDK doesn’t prevent them.

What usually goes wrong

  1. The server mirrors the REST API. Teams wrap every endpoint as a tool. The model sees dozens of overlapping tools, picks the wrong one, and chains five calls where one would do. Anthropic’s tool-design guidance names overlapping and vague tools as a main cause of agent failure [26].
  2. Results flood the context window. A tool returns thousands of rows. Claude Code warns when an MCP tool’s output gets large and caps it by default [24], and well before that point the model loses track of the task.
  3. Access is confused with intent. A user may authorize an integration to manage support cases without intending to close one particular case. OAuth establishes delegated authority. Product interaction establishes the requested action.
  4. Returned text is treated as instructions. A customer message that says “export all records” is still customer content, even when your own authenticated server returns it.
  5. OAuth is almost right. The server returns 200 instead of 401, serves no protected resource metadata, rejects form-encoded token requests, or forgets Claude Code’s loopback redirect. Users see a connection error and give up [13].
  6. The team builds on 2025 tutorials. They implement SSE streams, sticky sessions and sampling, then find the architecture is deprecated.
  7. Only the conversation is evaluated. “Done” in the assistant’s reply doesn’t prove that the right record changed, that it changed once, or that nothing else changed.
  8. Publishing is an afterthought. Missing annotations, a catch-all request tool or a missing privacy policy all lead to rejection [11][12].

What good looks like

For Fabledesk, a good first release lets an authorized support lead find open cases, inspect the relevant context and prepare a proposed status change. A separately controlled operation applies the change.

A good MCP server in late 2026:

  • Exposes a small set of well-named tools (5 to 25 is a sensible range), each tied to a real user task, with reads and writes in separate tools.
  • Gives every tool a title, an accurate description, a strict input schema, an output schema for structured results, and accurate annotations.
  • Returns only records the authenticated principal may see, in compact, bounded results with actionable errors.
  • Rejects stale and unauthorized writes, recovers safely from duplicate requests, and writes an audit event for every committed change.
  • Runs statelessly on Streamable HTTP (or cleanly on stdio), and serves legacy clients deliberately rather than by accident.
  • Acts as a correct OAuth resource server: protected resource metadata, audience-checked tokens, narrow scopes and no token passthrough.
  • Has an evaluation suite of realistic tasks with measured outcomes, run against the clients it claims to support.
  • Can have writes disabled without disabling reads, and has a named operator.

Use these outcomes as the product definition. The number of tools is an implementation detail.

2. Before you start

Make these decisions and gather these inputs before anyone generates a scaffold.

Decisions

  • Audience and client surface. End users in Claude and other chat hosts, developers in Claude Code and IDEs, or internal staff? This drives transport and authentication.
  • Transport. The standard bindings are stdio (the client launches your server as a subprocess) and Streamable HTTP (an independent HTTP service with a single endpoint) [5].
  • Authentication model. Use OAuth when tools act on a user’s account. Use none only for public data. Static API keys in headers can work for private or custom setups, but directories may not accept them. Check each platform’s current rules [13].
  • Scope of actions. Read only, or also write? Delete? Send anything outside the system? Claude’s directory doesn’t accept connectors that transfer money or crypto, or that generate images, video or audio with AI models [12]. That is a directory rule, not a protocol rule.
  • Protocol target. Target 2026-07-28, and decide explicitly whether and how long you’ll serve 2025-11-25 clients.
  • Language and SDK. Use a maintained official SDK and pin the exact version.
Situation Recommended start Main obligation
Developer needs local project files Stdio Constrain process and filesystem access
Users connect their SaaS accounts Remote HTTP Delegated authorization and tenant isolation
Internal agent uses a private service HTTP inside the approved network Organizational identity and network policy
Customers need both local and cloud use Shared business layer, two adapters Test both deployment boundaries independently

Don’t assume localhost is harmless: a local process can inherit powerful credentials and filesystem access. Don’t expose a remote endpoint just to make installation easier when the workflow needs local-only data handling. Claude’s directory takes only remote servers for direct listing. Local servers are distributed inside a plugin [11].

SDK reference points. At the research cutoff, the release pages listed Python mcp 2.3.0 and the TypeScript SDK 2.4.0 [16][17]. TypeScript v2 is split into packages such as @modelcontextprotocol/server and @modelcontextprotocol/client [28]. Python v2 renamed FastMCP to MCPServer and needs Python 3.11 or later [18][29]. These are dated snapshots. Check the release notes and advisories again before installing, and record the version you actually tested.

Intake checklist

Workflow and ownership

  • Name the person accountable for the server after launch.
  • Write the first user outcome in one sentence.
  • Collect 10 to 30 real user requests (support tickets, sales notes, in-product search), each with an example prompt.
  • Identify the users and their existing application roles.
  • List reads, writes, deletes and external sends, with an explicit “never” list.
  • Record which actions need specific user confirmation.
  • Check the scope against the policies of each directory you’re targeting.

Access and data

  • Get a development account with representative permissions.
  • Create synthetic fixtures with at least two tenants.
  • Document the upstream API’s authentication, rate limits and usage terms.
  • Identify fields that must never enter model context.
  • Identify the outbound network destinations you’ll allow.
  • Identify an authorization server that supports OAuth 2.1 with S256 PKCE, discovery metadata, and CIMD or DCR.
  • Name the owner of credential rotation and revocation.

Implementation and distribution

  • Choose stdio, remote HTTP or both, with a one-line reason.
  • Name the exact clients you will support and the protocol revisions they actually use.
  • Choose a maintained SDK and pin its exact version.
  • Plan hosting, domain and TLS.
  • Decide which directories you’ll publish to, if any.
  • Reserve a registry namespace (io.github.<user>/... or com.<domain>/...).
  • Publish a privacy policy and public setup documentation, and name their owner.
  • Provide a support address and a vulnerability-reporting route.

Record the decisions:

Workflow:
Users and roles:
Data sources:
Allowed reads:
Allowed writes:
Excluded actions:
Transport:
Supported clients and versions:
Protocol revisions:
SDK and exact version:
Authentication:
Authorization policy:
Publishing targets:
Deployment owner:
Release owner:

3. The method

The method has nine steps. Each produces an artifact that the next step uses, and each ends with a checkable “done” criterion.

Step 1. Define the jobs and the authority boundary

  • What to do: Turn user requests into a short list of jobs. Classify each as read, write, destructive or external send. Record permitted records, exclusions and refusal cases.
  • Why: Tools built around jobs beat tools built around endpoints. Scope also sets your attack surface and your directory eligibility.
  • Done when: An owner approves a workflow contract with success and refusal examples.

Step 2. Choose the protocol and deployment profile

  • What to do: Choose transports, SDK versions, supported clients, legacy behaviour and extensions.
  • Why: Protocol-era mismatches look like application bugs.
  • Done when: A compatibility matrix names the versions to test and the unsupported features.

Step 3. Design the tool surface

  • What to do: Write names, titles, descriptions, schemas, annotations, outputs and errors before writing code. Decide on resources and prompts.
  • Why: The tool definitions are the product as the model sees it, and changing them after launch breaks evaluations and can trigger re-review.
  • Done when: Every tool has a complete spec, an example, a permission rule and a testable outcome, and no tool mixes reads and writes.

Step 4. Build one complete vertical slice

  • What to do: Connect a real SDK adapter to validated business logic and synthetic data.
  • Why: A full slice exposes the integration problems that isolated functions hide.
  • Done when: One workflow succeeds through a supported client with no manual repair.

Step 5. Secure and authorize

  • What to do: Threat-model each tool. Implement OAuth resource-server checks, tenant and record permissions, approval binding, safe retries and input and output controls.
  • Why: Model behaviour can’t be your security boundary, and token mistakes are the most severe class of MCP vulnerability.
  • Done when: Unauthorized, stale, replayed, wrong-audience and cross-tenant requests fail as designed, and a fresh user can connect, authorize and refresh in each supported client.

Step 6. Evaluate protocol, application and agent outcomes

  • What to do: Run deterministic tests, protocol tests, hostile-input tests and repeated agent trials on realistic tasks.
  • Why: Each layer catches a different class of failure, and tool quality can only be measured empirically.
  • Done when: The evaluation report shows passing evidence against gates you set in advance, with explicit limitations.

Step 7. Deploy and harden

  • What to do: Deploy behind HTTPS with Origin validation, rate limits, size limits, egress controls, logging and tracing.
  • Why: Many “can’t connect” failures are infrastructure problems: WAFs, slow token endpoints, buffering proxies.
  • Done when: The production URL passes Inspector checks from outside your network and completes a real call in each supported client.

Step 8. Package and publish

  • What to do: Build immutable artifacts, write install documentation, and submit accurate metadata to the channels that matter.
  • Why: Distribution is a supply-chain and maintenance commitment.
  • Done when: A clean install reproduces the documented workflow, and each chosen listing is live or in review with accurate fields.

Step 9. Operate and evolve

  • What to do: Monitor outcomes, re-run evaluations on every contract change, track deprecations and advisories, and handle incidents.
  • Why: Clients, models, providers and threats keep changing.
  • Done when: Owners can diagnose, disable writes, roll back and upgrade, and evaluations gate every deploy.
THE MCP SERVER PLAYBOOK cover

Keep going: the full playbook

  • Playbook steps
  • Prompts
  • Checklist
  • Measuring results
  • Common mistakes
Get the full volume · $5.80BF −80%

Book + Claude skill + MCP access. Black Friday 2026 price. Back to the book page

Or start free

4 complete playbooks, the 7-day Claude Code course and a key your AI can use right now. No card.

Free. We email you about new lessons and volumes now and then. Unsubscribe any time.

Secure checkout with Stripe

Where should we send your key?

Your licence key and receipt go to this email. If checkout fails or you get interrupted, we can send you a link to finish.

One payment, instant access. We never see your card.