docs/index.md
!!! info "This documents v2, the current stable release line" New to v2, or coming from v1? What's new in v2 is the five-minute tour of what changed, and the Migration Guide covers every breaking change. Still on v1.x? Its documentation lives at the v1.x docs. Something rough or confusing? Tell us.
The Model Context Protocol (MCP) lets applications provide context to LLMs in a standardized way, separating the concern of providing context from the LLM interaction itself.
This is the official Python SDK for it. With it you can:
Python 3.10+.
=== "uv"
```bash
uv add "mcp[cli]"
```
=== "pip"
```bash
pip install "mcp[cli]"
```
The [cli] extra gives you the mcp command; you'll want it for development.
See Installation for what each dependency is for.
Create a file server.py:
--8<-- "docs_src/index/tutorial001.py"
That's a complete MCP server.
It exposes one tool, add, and one templated resource, greeting://{name}.
uv run mcp dev server.py
This starts your server and opens the MCP Inspector, an interactive UI for poking at it. Open the URL it prints.
!!! note
The Inspector is a Node.js app, so mcp dev needs npx on your PATH.
In the Inspector, go to Tools and call add with a=1, b=2.
You get 3 back. ✨
The Inspector built that form (a required integer field for a, another for b) from your type hints. So will Claude, and every other MCP host.
Now go to Resources and read greeting://World:
Hello, World!
Look again at what you did not write:
a: int, b: int is the schema.You wrote two Python functions with type hints and a docstring. The SDK does the rest.