What is MCP?
An open standard that lets AI apps use outside tools and data, like a USB‑C port for AI. Anthropic created it in 2024; the Linux Foundation's Agentic AI Foundation now governs it.
Users
Your AI works with your real tools.
Tool makers
Build once, reach every AI app.
App makers
One protocol, thousands of tools.
How it works
Your AI app (the host) opens one client connection per server. Messages are JSON‑RPC.
One tool call
What happens when you ask your AI to do something.
Step 1 · App → Server
Discover
The app asks the server which tools it offers.
{ "tools": [ { "name": "create_issue", "description": "Create a GitHub issue", "inputSchema": { "properties": { "repo": {}, "title": {} } } } ]}
Step 2 · Model
Decide
The model reads your message and picks a tool.
create_issue( repo = "acme/web", title = "Login button misaligned on mobile")
Step 3 · You
Approve
You confirm the call before it runs.
Allow GitHub to run create_issue?
Step 4 · App → Server
Call
The app sends tools/call with the arguments.
{ "method": "tools/call", "params": { "name": "create_issue", "arguments": { "repo": "acme/web", "title": "Login button misaligned" } }}
Step 5 · Server → Model
Respond
The result goes back, and the model answers you.
{ "content": [ { "type": "text", "text": "Created issue #482" } ]}
Building blocks
- ToolsActions the model can call.
- ResourcesData the app can attach.
- PromptsTemplates you trigger.
- ElicitationThe server asks you for input.
MCP Apps let tools return interactive UI, like charts and forms.
Remote or local?
Streamable HTTP- Paste a URL, sign in with OAuth
- Works on web and mobile
- Best for cloud services
stdio- Runs on your computer
- Reaches files, browsers, dev tools
- Only install code you trust
Seeing a URL that ends in /sse? That transport is deprecated. Look for the /mcp endpoint.
New in 2026-07-28
- 1Stateless core: no handshake, no sessions
- 2Routable HTTP via Mcp-Method headers
- 3Sampling, roots and logging deprecated
- 4Safer OAuth with Client ID Metadata
- 5Cache hints on lists and reads
- 612-month deprecation policy
Build a server
A few lines with the official SDKs.
npm install @modelcontextprotocol/server zod
import { McpServer } from "@modelcontextprotocol/server";import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";import * as z from "zod/v4"; const server = new McpServer({ name: "weather", version: "1.0.0" }); server.registerTool( "get_forecast", { description: "Get the weather forecast for a city", inputSchema: z.object({ city: z.string() }), }, async ({ city }) => ({ content: [{ type: "text", text: `Sunny in ${city}` }], }),); await server.connect(new StdioServerTransport());
uv add "mcp[cli]"
from mcp.server import MCPServer mcp = MCPServer("weather") @mcp.tool()def get_forecast(city: str) -> str: """Get the weather forecast for a city.""" return f"Sunny in {city}"
uv run mcp dev server.py
Tip: the tool description is all the model sees. Make it specific.