Practical overview
When it fits
Use it when a Python application needs to provide or consume capabilities through MCP, including local development with stdio or server connections over Streamable HTTP and SSE.
Who it is for
- Python developers building MCP servers for LLM hosts.
- Developers implementing clients that connect to MCP servers.
- Teams exposing application functions, data or prompt templates through MCP.
Documented uses
- Expose Python functions as tools that an MCP host can call.
- Make application data available as MCP resources.
- Offer reusable prompt templates through a server.
- Connect a Python application to an MCP server and call its tools.
Requirements & limits
The SDK is open source under the MIT license. Python 3.10 or newer is required.
- The SDK supports both MCP server and client implementations.
- Supported standard transports are stdio, Streamable HTTP and SSE.
- The
cliextra supplies themcpcommand-line tool; the base package can be installed without it. - The documented example uses Python type hints to describe tool arguments and derives the schema from them.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the SDK with its development CLI
Add the MCP Python SDK and CLI commands to a Python project.
Before you start
- Python 3.10 or newer
- A project using uv or pip
Steps
Install
mcp[cli]with the command below or the command below.uv add "mcp[cli]"pip install "mcp[cli]"Use the included
mcpcommand-line tool for the documented development, run and install stages.
Expected outcome
The project has the MCP SDK and the CLI extra, including the `mcp` command.
Guide limitations
- The documented installation command adds the CLI extra; installing plain
mcpomits that tool.
Create and inspect a basic MCP server
Define a server with a tool and templated resource, then open it in MCP Inspector.
Before you start
- Python 3.10 or newer
- The SDK installed with its CLI extra
- A
server.pyfile containing the documentedMCPServertool and resource definitions
Steps
Define an
MCPServerinstance inserver.py.Add a tool function with
@mcp.tool()and a resource function with@mcp.resource().Run the command below to open the server in MCP Inspector.
uv run mcp dev server.py
Expected outcome
The example server exposes a callable tool and a templated resource for inspection.
Guide limitations
- The example documents a basic tool and resource; it does not cover deployment or production configuration.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 1 October 2026
- Original website title
- modelcontextprotocol/python-sdk · Official homepage title · retained in its source language

