MCP Server Development
Official scope (Exam Guide v1.0): authoring, deployment, integration, resources/tools/prompts, communication patterns (stdio, sockets, client vs server). Low weight: know the model, not the wire format.
Roles
Host (the AI application, such as Claude Code or Claude Desktop) creates one client per server connection. A host with four servers holds four clients. "Server" means the program providing context, local or remote.
Two layers
- Data layer: JSON-RPC 2.0 messages: discovery, primitives, notifications.
- Transport layer: connection, framing, authentication.
Transports
| Transport | Where | Notes |
|---|---|---|
| stdio | Local process started by the host | Usually one client; no network overhead |
| Streamable HTTP | Remote server | HTTP POST for client→server, optional SSE for streaming; many clients; bearer tokens, API keys or custom headers; OAuth recommended |
"Sockets" in the exam wording maps to network transport (Streamable HTTP over TCP) versus local stdio; MCP defines only these two standard transports.
Server primitives
| Primitive | What | Controlled by (design guidance) |
|---|---|---|
| Tools | Actions the model can invoke (tools/call) | Model |
| Resources | Context data to read (file contents, records, schemas) | Application |
| Prompts | Reusable templates (system prompts, few-shot examples) | User |
Clients discover with */list, so listings are dynamic.
Client features and the current spec (verified, protocol 2026-07-28)
- Elicitation: a server asks the user for input or confirmation.
- Sampling and logging are deprecated; new servers call model APIs directly and log to stderr or OpenTelemetry.
- Stateless: every request carries protocol version and capabilities in
_meta; optionalserver/discoverreturns versions, capabilities and identity. - Notifications are opt-in (
subscriptions/listen) and best effort; clients should still poll.
Building and deploying (design guidance, verified tools)
Define primitives with clear names and descriptions (tool design rules from 8.1 apply), implement handlers with an MCP SDK, choose a transport, test with the MCP Inspector, then connect from a host. Deploy locally over stdio, or host over Streamable HTTP with authentication for many users.
Integration
Claude Code and the Agent SDK connect to configured servers (project .mcp.json or user config) and expose their tools as mcp__<server>__<tool>. The Messages API can reach remote servers through the MCP connector (server tool). Many tools cost context; tool search and progressive discovery help.
Exam traps
- Resource vs tool confusion (read-only context is a resource).
- stdio for a shared remote server, or HTTP for a local single-user tool.
- New server using sampling (deprecated).
- Trusting notifications as guaranteed delivery.
References
- MCP architecture overview — checked Oct 16, 2026
- MCP in Claude Code — checked Oct 16, 2026
- MCP connector — checked Oct 16, 2026
Check your understanding
Let the model read a database schema but not change it. Primitive?Show answerHide answer
Answer
Resource (or a read-only tool).Local filesystem server for one desktop app. Transport?Show answerHide answer
Answer
stdio.Remote server for many clients needing auth. Transport and auth?Show answerHide answer
Answer
Streamable HTTP; OAuth recommended.Why poll even after subscribing to change notifications?Show answerHide answer
Answer
Notifications are best effort.