Section 6. The MCP Protocol — External Tools and Custom Servers
The MCP Protocol — External Tools and Custom Servers
≈ 2 minNeuroBober
In Section 5, you built a modular workflow inside Claude Code itself: you packaged recurring SOPs into skills, enforced critical rules with deterministic hooks, and learned how to connect vetted plugins. Now the agent handles local code and the terminal reliably, yet it still lives inside its own sandbox—without direct access to an open browser, design mockups, live databases, production telemetry, or your internal corporate APIs. In Section 6, we connect the agent to the outside world through the Model Context Protocol (MCP) standard, keeping connections controllable so they neither bloat the context window nor put production data at risk.
Break down the MCP architecture under the 2026-07-28 specification: the three roles (Host, Client, Server), JSON-RPC 2.0 over local stdio and networked Streamable HTTP, .mcp.json scope precedence, automatic deferred schema loading via MCP Tool Search, output limits, and the emerging WebMCP browser standard.
Connect visual and graphics MCP stacks: direct access to Chrome DevTools (Chrome DevTools MCP) and a live browser (OpenCode Browse), bidirectional work with Figma mockups (open-source Figwright for the free Starter plan and the official Figma MCP Server), and procedural 3D modeling in Blender and Spline.
Set up a data, monitoring, and SEO analytics loop: safe read-only access to PostgreSQL via DBHub, Postgres MCP Pro, and agentless Dasha audits; live incident diagnostics via the current Dynatrace-for-AI + dtctl stack; and a closed-loop optimization workflow with Google Search Console MCP and Okara MCP.
Build your own declarative MCP server on the TypeScript xmcp framework with file-based routing in src/tools/, middleware, and debugging in MCP Inspector, plus establish baseline admission rules for third-party servers to defend against prompt injection and OAuth vulnerabilities.
Section Deliverable
By the end of the fourth lesson, you will have a project .mcp.json with 1–2 vetted external servers incurring zero unnecessary context-window tax, a clear read/write permission boundary for databases and analytics, and a working custom MCP server template on xmcp verified through MCP Inspector.