Study notes · six weeks · 3–4 h a week
MCP Learning Path
A course I put together for learning the Model Context Protocol, from concepts to shipping and contributing to an MCP server. It sequences three resources against the current 2026-07-28 spec.
The core material
| Resource | Role | Use it for |
|---|---|---|
| Official MCP docs | Source of truth | Concepts, the current spec (2026-07-28), SDKs, security, Inspector |
| Hugging Face MCP Course | Guided hands-on | Units 1–3 with quizzes, projects and two free certificates |
| Mastering MCP (Educative) | Subscription course | About 7 h on multi-server MCP, RAG servers, authorization and debugging |
| Flow Framework | Real-world codebase | How a production framework exposes tools as an MCP server, CLI and plugin |
- Flow is a chat-agent framework first. Its MCP support lives in the mcp/ and cli/ packages, so it is the place to see MCP applied, not to learn it from zero. It comes last.
- The HF course predates the latest spec. Do it for the hands-on, then use week 5 to catch up on what changed.
01 / Week 1
Fundamentals and architecture
Explain hosts, clients and servers, the three server primitives, and how JSON-RPC messages flow between them.
Read (official docs, ~1.5 h)
- What is MCP?: the USB-C-for-AI framing and who supports it
- Architecture overview: host, client, server; data layer vs transport layer
- Understanding MCP servers: tools (model-controlled), resources (app-controlled), prompts (user-controlled)
- Understanding MCP clients: elicitation and what clients offer back
- Versioning: date-based versions, and why they matter for SDK choice
Do (HF Unit 1, ~2 h)
Optional (Educative, ~2 h)
- MCP Fundamentals for Building AI Agents: a faster second pass on host, client and server roles
Lab: Open the MCP Inspector against any example server. List tools, call one, read a resource, and watch the raw JSON-RPC traffic.
CheckpointExplain in two minutes the M×N integration problem and why tools, resources and prompts have different controllers.
02 / Week 2
Build your first server and client
Ship a working stdio server with the current SDK, connect it to a host, then write a client that drives it.
Build the server (~2 h)
- Build an MCP server: a weather server with get_alerts and get_forecast
- Python SDK 2.0.0+ uses the MCPServer class; older tutorials, including the HF course, use FastMCP. Same idea, older API.
- Try the C# tab too: ModelContextProtocol on NuGet with [McpServerTool] attributes. C# is a Tier 1 SDK.
- The rule that bites everyone: on stdio, never write to stdout. Log to stderr.
- Any MCP host works for testing, including VS Code.
Build the client (~1.5 h)
- Build an MCP client
- Client Best Practices: patterns for hosts juggling many servers
Verify against both protocol eras
- Run the Inspector CLI once with --protocol-era modern and once with --protocol-era legacy; both must list your tools.
- Inspector CLI
- Protocol eras
Stretch: Add one resource (a static config file) and one prompt (a reusable “summarize alerts” template), so you have used all three primitives.
CheckpointYour server passes tools/list in both eras and you can read the JSON-RPC for one tools/call round trip.
03 / Week 3
End-to-end MCP application
Build and deploy a sentiment-analysis MCP server with Gradio, then reach it from two different clients.
Do (HF Unit 2, ~3 h)
- Unit 2 introduction: Python 3.10+, Node 18+ and a free HF account
- Gradio server: mcp_server=True turns a typed Python function into an MCP tool; deploy it to a free HF Space
- Gradio as a client: a smolagents MCPClient wrapped in a UI
- Tiny Agents: a JSON-configured agent in JS or Python that uses your deployed server
Watch for: The course connects over /gradio_api/mcp/sse and bridges with mcp-remote. HTTP+SSE is now a deprecated transport; finish the unit and revisit it in week 5.
Why it's worth it: Seeing one server serve two unrelated clients is the core MCP promise made concrete, and HF Spaces host it for free.
CheckpointYour Space URL works from both a Tiny Agent and the Inspector. Units 2 and 3 together earn the HF certificate of completion.
04 / Week 4
Advanced workflow servers
Build a PR-workflow server that uses tools, resources and prompts together, then a webhook-driven agent that acts on its own.
Unit 3: custom workflow servers (~3 h)
- Unit 3 introduction: tools that pick the right PR template from changed files
- GitHub Actions integration: a webhook receiver, CI-status tools and four MCP prompts
- Team notifications (Slack) that combine all three primitives.
- Solution walkthrough
Unit 3.1: PR agent on the Hub (~2 h)
- Unit 3.1: a FastMCP server wired to a FastAPI webhook listener that opens tagging PRs
- Setting up the project
The pattern: An HTTP service receives an event, an agent calls MCP tools, a side effect lands. The same shape works with any event source.
Do the exercises: The custom workflow prompt and event filtering exercises are where prompts click.
CheckpointExplain when you would make something a prompt rather than a tool, with one example from your own server.
05 / Week 5
Production MCP: current spec, transports, auth, security
Close the gap between what the HF course teaches and the 2026-07-28 spec, then cover what a remote server needs in front of real users.
| Topic | What the HF course shows | Current spec (2026-07-28) |
|---|---|---|
| Handshake | initialize, then initialized | Stateless: version and client capabilities ride in each request's _meta; servers must implement server/discover |
| Sessions | Mcp-Session-Id header | Removed; cross-call state uses server-minted handles passed as tool arguments |
| Remote transport | HTTP+SSE (/mcp/sse) | Streamable HTTP; HTTP+SSE is deprecated |
| Server asking the client | sampling, elicitation and roots requests | Multi Round-Trip Requests: server returns input_required, client retries with answers |
| Change notifications | GET stream, resources/subscribe | One subscriptions/listen POST stream |
| Roots, Sampling, Logging | Core features | Deprecated (SEP-2577): use tool params, direct LLM calls, stderr or OpenTelemetry |
| Long-running work | Experimental tasks in core | io.modelcontextprotocol/tasks extension with polling |
| Results | No type tag | Required resultType, plus ttlMs and cacheScope on list results |
Source: 2026-07-28 changelog
Read (~3 h)
- Spec: Architecture
- Streamable HTTP
- Multi Round-Trip Requests
- Tools
- Deprecated Features
- Understanding Authorization: OAuth 2.1
- Enterprise-Managed Authorization: IdP-centred access control
- Security Best Practices: tool poisoning, confused deputy, token passthrough
- Local Server Security
- Extensions overview: Apps, Tasks, Skills
- MCP Registry quickstart
- Mastering MCP (Educative): the multi-server and authorization modules; check them against the current spec
Lab: Port your week-3 server to Streamable HTTP with the current SDK, put it behind OAuth, and pass the Inspector in the modern era.
CheckpointExplain why removing sessions makes MCP servers easier to scale behind a load balancer.
06 / Week 6
MCP inside Flow Framework
Flow turns the same zod-typed tools written for a chat agent into an MCP server, a CLI and native plugins. Trace that path and find a first contribution.
| MCP concept | How Flow does it | Where to look |
|---|---|---|
| Server + transport | mcpServer({ name, version, tools, dir }) serves Streamable HTTP at /mcp on the official SDK | mcp/src |
| Tool metadata | title, output, status and hints become MCP annotations (readOnly, destructive, idempotent, openWorld) | mcp/src |
| Instructions | Agent skills ship as server instructions plus a read_skill tool | mcp/src, coding-agents/ |
| Authorization | Host OAuth against your own issuer; signIn per tool; 401 triggers the host's sign-in | coding-agents/auth-skill.md |
| Consuming servers | mcpTools({ name, url }) imports another server's tools, pinned in mcp.lock.json | mcp/src |
| CLI over MCP | Stricli CLI where every tool is a command with --json, --dry-run, --yes | cli/src |
| Plugins | flow plugin emits Claude Code and Agent Plugins 1.0.0 packages | README |
| Observability | tool.start / tool.end events and OTLP traces per tool call | README |
Source: Flow README
Lab (~3 h)
- Read AGENTS.md first: then npm ci, npm run new -- my-agent, npm start
- Expose the café example's tools with mcpServer and connect the Inspector in both protocol eras.
- Point any MCP host at it and call get_menu.
- Generate the CLI with npx flow cli --server <url> -h and run npx flow check.
- Follow one tool from its tool({...}) definition to the tools/list JSON the Inspector shows.
Contribution hunt
- Does the server answer server/discover and return resultType and ttlMs/cacheScope per 2026-07-28, or only the legacy handshake?
- Are tools/list results in deterministic order, as the spec now recommends for client caching?
- Do the mcp/ tests cover both protocol eras?
CheckpointA draft issue or PR on Flow's mcp/ or cli/ package, grounded in a spec section you can cite.
Capstone
Build one remote MCP server that uses all three primitives, runs on the current spec, and is published somewhere real, such as a free HF Space listed in the MCP Registry. Done when every line holds:
- I can draw host → client → server and say what each primitive's controller is
- My server passes the Inspector in both modern and legacy eras
- It has at least one tool, one resource and one prompt
- It runs over Streamable HTTP, not HTTP+SSE, and uses no deprecated features
- It requires OAuth for any non-read-only tool, and its tool annotations are honest
- I have reviewed it against the Security Best Practices page
- HF Fundamentals certificate (Unit 1) and completion certificate (Units 2–3) earned
- One issue or PR opened on Flow's MCP or CLI package
Reference links
- MCP docs index (llms.txt): every docs and spec page in one list
- Specification 2026-07-28: the authoritative protocol
- Schema reference: exact message shapes
- Official SDKs: TypeScript, Python, C#, Go, Rust and Ruby are Tier 1
- MCP Inspector: test and debug any server
- Debugging guide: when a host won't see your server
- Example servers: reference implementations
- SEP index: where the protocol is heading
- HF MCP Course repo: course source, issues and Discord