Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Install the `mcp` package from PyPI. The SDK exposes FastMCP, a decorator-driven API that auto-generates JSON Schema from type hints, uses docstrings as tool descriptions, and ships stdio plus streamable HTTP transports.
Imagine you write a small Python file with a few functions that do useful things: add numbers, list files, query a database. The MCP Python SDK is a tiny library that lets you put one decorator above each function and turns the file into a server that any MCP host (Claude Desktop, Cursor, Zed) can connect to and call. The library reads your type hints to figure out what arguments each function expects, so the AI knows how to call you. You write normal Python; the SDK turns it into a tool server.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: PyPI name and install command, GitHub repo, FastMCP decorator API with a code example, type-hint schema generation, three primitive decorators, default transport and how to switch.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Pip-installing model context protocol or mcp-sdk instead of the canonical name `mcp`. The correct PyPI package is just `mcp`, maintained by Anthropic.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.