March 10, 2025Ask AI
MCP is a protocol for integrating AI applications with tools and external services. It was created by Anthropic as a way for Claude to access resources on the desktop, taking inspiration from LSP for editor extensions.
MCP servers can be coded do almost anything, including network calls to other services. This has led to MCP being talked about as a foundation for building AI agents, even though the original desktop-centric transport is far from the Web protocols you might expect.
What follows is very a quick overview of MCP. For deeper dives, I suggest:
To make a tool call, the MCP client exchanges JSON-RPC messages with the MCP server.
A desktop client will spawn servers as subprocesses so that it can communicate with them over stdio.
Besides tool calls, the protocol also supports:
There are debugging tools and SDKs for Python, Typescript, Java, and Kotlin.
Talking to your own tools feels like magic.
Using MCP, AI appplications (clients) can connect to tools (servers) without custom integration.
Here is another example from Cloudflare.
The buzz is real, but it's early days and AI agent platforms are just getting started.
I'm optimistic for HTTP to supplant stdio, especially with the recent announcement of remote servers with auth.
This is particularly important for scaling agents on the network and supporting multiple clients per server.
Update: See this RFC and discussion for connectionless improvements to the HTTP transport. 🎉
A registry should accelerate the network effects of MCP, making servers and their capabilities more discoverable e.g. by other agents.
.well-known/mcp.json provides a way for agents to find AI interfaces on websites without the need for a central registry.
Stateless requests, streaming, and namespacing - all good things adopted from Web protocols.
The way Claude Desktop spawns servers in subprocesses has resulted in a few pitfalls. I ran into this myself after configuring the filesystem server as described in the quickstart.
The error stems from differences in the PATH when Claude Desktop spawns server subprocesses. One fix is to use absolute paths in ~/Library/Application Support/Claude/claude_desktop_config.json
on MacOS. E.g.
{
"mcpServers": {
"filesystem": {
"command": "/Users/jldec/n/bin/node",
"args": [
"/Users/jldec/mcp/servers/src/filesystem/dist/index.js",
"/Users/jldec/mcp/claude"
]
}
}
}
{ "path": "/blog/mcp", "attrs": { "date": "2025-03-10", "title": "Model Context Protocol (MCP)", "layout": "BlogPostLayout", "splash": { "image": "/images/courthouse.webp" } }, "md": "# Model Context Protocol (MCP)\n\nMCP is a protocol for integrating AI applications with tools and external services. It was created by Anthropic as a way for [Claude](https://claude.ai/download) to access resources on the desktop, taking inspiration from [LSP](https://microsoft.github.io/language-server-protocol/) for editor extensions.\n\nMCP servers can be coded do almost anything, including network calls to other services. This has led to MCP being talked about as a foundation for building AI agents, even though the original desktop-centric transport is far from the Web protocols you might expect.\n\nWhat follows is very a quick overview of MCP. For deeper dives, I suggest:\n1. [How MCP was born](https://www.youtube.com/watch?v=m2VqaNKstGc) interview with [@dsp_](https://x.com/dsp_) and [@jspahrsummers](https://x.com/jspahrsummers) - April 3 '25\n2. [Workshop](https://www.youtube.com/watch?v=kQmXtrmQ5Zg) from the AI engineer summit - Feb '25\n3. MCP [User guide](https://modelcontextprotocol.io)\n4. MCP [Spec](https://spec.modelcontextprotocol.io/specification//2024-11-05/)\n5. MCP [TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n6. Example [MCP servers](https://github.com/modelcontextprotocol/servers)\n7. Swyx's [spicy take](https://www.latent.space/p/why-mcp-won)\n\n\n\n### How it works\n\nTo make a tool call, the [MCP client](https://modelcontextprotocol.io/clients) exchanges JSON-RPC messages with the [MCP server](https://modelcontextprotocol.io/examples).\n\nA desktop client will spawn servers as subprocesses so that it can communicate with them over [stdio](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#stdio).\n\nBesides [tool calls](https://spec.modelcontextprotocol.io/specification/2024-11-05/server/tools/), the protocol also supports:\n\n- Server-to-client [notifications](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/messages/#notifications)\n- URL-based [resources](https://spec.modelcontextprotocol.io/specification/2024-11-05/server/resources/) with subscriptions for change notifications\n- Server-provided [Prompt templates](https://spec.modelcontextprotocol.io/specification/2024-11-05/server/prompts/)\n- Nested LLM calls or [sampling](https://spec.modelcontextprotocol.io/specification/2024-11-05/client/sampling/)\n\nThere are [debugging](https://modelcontextprotocol.io/docs/tools/debugging) tools and [SDKs](https://modelcontextprotocol.io/sdk) for Python, Typescript, Java, and Kotlin.\n\n### Why are people excited?\n\nTalking to your own tools feels like magic.\n\nUsing MCP, AI appplications (clients) can connect to tools (servers) without custom integration.\n\n\n\n[Here](https://www.youtube.com/watch?v=vGajZpl_9yA) is another example from Cloudflare.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/vGajZpl_9yA?start=61\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n\n### What's next?\nThe buzz is real, but it's early days and AI agent platforms are just getting started.\n\n- I'm optimistic for [HTTP](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#http-with-sse) to supplant stdio, especially with the [recent announcement](https://youtu.be/kQmXtrmQ5Zg?t=4409) of remote servers with auth.\n\n This is particularly important for scaling agents on the network and supporting multiple clients per server.\n\n _Update:_ See this [RFC](https://github.com/modelcontextprotocol/specification/pull/206) and [discussion](https://github.com/modelcontextprotocol/specification/discussions/102) for connectionless improvements to the HTTP transport. 🎉\n\n- A [registry](https://youtu.be/kQmXtrmQ5Zg?t=4920) should accelerate the network effects of MCP, making servers and their capabilities more discoverable e.g. by other agents.\n\n- [.well-known/mcp.json](https://youtu.be/kQmXtrmQ5Zg?t=5958) provides a way for agents to find AI interfaces on websites without the need for a central registry.\n\n- [Stateless requests, streaming, and namespacing](https://youtu.be/kQmXtrmQ5Zg?t=6095) - all good things adopted from Web protocols.\n\n### Growing pains\n\nThe way Claude Desktop spawns servers in subprocesses has resulted in a few [pitfalls](https://github.com/modelcontextprotocol/servers/issues/436#issuecomment-2564638983). I ran into this myself after configuring the filesystem server as described in the [quickstart](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server).\n\n\n\nThe error stems from differences in the PATH when Claude Desktop spawns server subprocesses. One fix is to use absolute paths in `~/Library/Application Support/Claude/claude_desktop_config.json` on MacOS. E.g.\n\n```json\n{\n \"mcpServers\": {\n \"filesystem\": {\n \"command\": \"/Users/jldec/n/bin/node\",\n \"args\": [\n \"/Users/jldec/mcp/servers/src/filesystem/dist/index.js\",\n \"/Users/jldec/mcp/claude\"\n ]\n }\n }\n}\n```\n\n# 🚀", "html": "<h1>Model Context Protocol (MCP)</h1>\n<p>MCP is a protocol for integrating AI applications with tools and external services. It was created by Anthropic as a way for <a href=\"https://claude.ai/download\">Claude</a> to access resources on the desktop, taking inspiration from <a href=\"https://microsoft.github.io/language-server-protocol/\">LSP</a> for editor extensions.</p>\n<p>MCP servers can be coded do almost anything, including network calls to other services. This has led to MCP being talked about as a foundation for building AI agents, even though the original desktop-centric transport is far from the Web protocols you might expect.</p>\n<p>What follows is very a quick overview of MCP. For deeper dives, I suggest:</p>\n<ol>\n<li><a href=\"https://www.youtube.com/watch?v=m2VqaNKstGc\">How MCP was born</a> interview with <a href=\"https://x.com/dsp_\">@dsp_</a> and <a href=\"https://x.com/jspahrsummers\">@jspahrsummers</a> - April 3 '25</li>\n<li><a href=\"https://www.youtube.com/watch?v=kQmXtrmQ5Zg\">Workshop</a> from the AI engineer summit - Feb '25</li>\n<li>MCP <a href=\"https://modelcontextprotocol.io\">User guide</a></li>\n<li>MCP <a href=\"https://spec.modelcontextprotocol.io/specification//2024-11-05/\">Spec</a></li>\n<li>MCP <a href=\"https://github.com/modelcontextprotocol/typescript-sdk\">TypeScript SDK</a></li>\n<li>Example <a href=\"https://github.com/modelcontextprotocol/servers\">MCP servers</a></li>\n<li>Swyx's <a href=\"https://www.latent.space/p/why-mcp-won\">spicy take</a></li>\n</ol>\n<p><img src=\"/images/mcp.webp\" alt=\"MCP slide from the AI engineering summit https://www.youtube.com/watch?v=kQmXtrmQ5Zg\"></p>\n<h3>How it works</h3>\n<p>To make a tool call, the <a href=\"https://modelcontextprotocol.io/clients\">MCP client</a> exchanges JSON-RPC messages with the <a href=\"https://modelcontextprotocol.io/examples\">MCP server</a>.</p>\n<p>A desktop client will spawn servers as subprocesses so that it can communicate with them over <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#stdio\">stdio</a>.</p>\n<p>Besides <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/server/tools/\">tool calls</a>, the protocol also supports:</p>\n<ul>\n<li>Server-to-client <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/messages/#notifications\">notifications</a></li>\n<li>URL-based <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/server/resources/\">resources</a> with subscriptions for change notifications</li>\n<li>Server-provided <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/server/prompts/\">Prompt templates</a></li>\n<li>Nested LLM calls or <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/client/sampling/\">sampling</a></li>\n</ul>\n<p>There are <a href=\"https://modelcontextprotocol.io/docs/tools/debugging\">debugging</a> tools and <a href=\"https://modelcontextprotocol.io/sdk\">SDKs</a> for Python, Typescript, Java, and Kotlin.</p>\n<h3>Why are people excited?</h3>\n<p>Talking to your own tools feels like magic.</p>\n<p>Using MCP, AI appplications (clients) can connect to tools (servers) without custom integration.</p>\n<p><img src=\"/images/claude-magic.webp\" alt=\"Screenshot of chat with Claude to inspect the local filesystem\"></p>\n<p><a href=\"https://www.youtube.com/watch?v=vGajZpl_9yA\">Here</a> is another example from Cloudflare.</p>\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/vGajZpl_9yA?start=61\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n<h3>What's next?</h3>\n<p>The buzz is real, but it's early days and AI agent platforms are just getting started.</p>\n<ul>\n<li>\n<p>I'm optimistic for <a href=\"https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#http-with-sse\">HTTP</a> to supplant stdio, especially with the <a href=\"https://youtu.be/kQmXtrmQ5Zg?t=4409\">recent announcement</a> of remote servers with auth.</p>\n<p>This is particularly important for scaling agents on the network and supporting multiple clients per server.</p>\n<p><em>Update:</em> See this <a href=\"https://github.com/modelcontextprotocol/specification/pull/206\">RFC</a> and <a href=\"https://github.com/modelcontextprotocol/specification/discussions/102\">discussion</a> for connectionless improvements to the HTTP transport. 🎉</p>\n</li>\n<li>\n<p>A <a href=\"https://youtu.be/kQmXtrmQ5Zg?t=4920\">registry</a> should accelerate the network effects of MCP, making servers and their capabilities more discoverable e.g. by other agents.</p>\n</li>\n<li>\n<p><a href=\"https://youtu.be/kQmXtrmQ5Zg?t=5958\">.well-known/mcp.json</a> provides a way for agents to find AI interfaces on websites without the need for a central registry.</p>\n</li>\n<li>\n<p><a href=\"https://youtu.be/kQmXtrmQ5Zg?t=6095\">Stateless requests, streaming, and namespacing</a> - all good things adopted from Web protocols.</p>\n</li>\n</ul>\n<h3>Growing pains</h3>\n<p>The way Claude Desktop spawns servers in subprocesses has resulted in a few <a href=\"https://github.com/modelcontextprotocol/servers/issues/436#issuecomment-2564638983\">pitfalls</a>. I ran into this myself after configuring the filesystem server as described in the <a href=\"https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server\">quickstart</a>.</p>\n<p><img src=\"/images/claude-errors.webp\" alt=\"Screenshot of Claude errors\"></p>\n<p>The error stems from differences in the PATH when Claude Desktop spawns server subprocesses. One fix is to use absolute paths in <code>~/Library/Application Support/Claude/claude_desktop_config.json</code> on MacOS. E.g.</p>\n<pre><code class=\"language-json\">{\n "mcpServers": {\n "filesystem": {\n "command": "/Users/jldec/n/bin/node",\n "args": [\n "/Users/jldec/mcp/servers/src/filesystem/dist/index.js",\n "/Users/jldec/mcp/claude"\n ]\n }\n }\n}\n</code></pre>\n<h1>🚀</h1>\n" }