NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #122 most downloaded on PyPI
Model Context Protocol SDK
Last release 23 days ago
07 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
72 releases · first in 2024
One column per month.
Update URL validation to allow file and other nonstandard schemas by @hmwildermuth in https://github.com/modelcontextprotocol/python-sdk/pull/207
AbstractAsyncContextManager for proper type hint to BaseSession by @Kludex in https://github.com/modelcontextprotocol/python-sdk/pull/257Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.3.0...v1.4.0
Context API Changes: The Context logging methods (info, debug, warning, error) are now async and must be awaited.
Added comprehensive server lifecycle management through the lifespan API:
@dataclass
class AppContext:
db: Database
@asynccontextmanager
async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
try:
await db.connect()
yield AppContext(db=db)
finally:
await db.disconnect()
mcp = FastMCP("My App", lifespan=app_lifespan)
@mcp.tool()
def query_db(ctx: Context) -> str:
db = ctx.request_context.lifespan_context["db"]
return db.query()
(#203)
Added support for async resource functions in FastMCP:
@mcp.resource("users://{user_id}")
async def get_user(user_id: str) -> str:
async with client.session() as session:
response = await session.get(f"/users/{user_id}")
return await response.text()
(#157)
Made message handling concurrent, allowing multiple requests to be processed simultaneously. (#206)
Added support for canceling in-flight requests and cleaning up resources. (#167)
Added support for the instructions field in server initialization, allowing servers to provide usage guidance. (#150)
pydantic: Changed from >=2.10.1,<3.0.0 to >=2.7.2,<3.0.0pydantic-settings: Changed from >=2.6.1 to >=2.5.2uvicorn: Changed from >=0.30 to >=0.23.1
(#180)Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.2.1...v1.3.0
Context API Changes: The Context logging methods (info, debug, warning, error) are now async and must be awaited.
read_resource() now returns a tuple of (content, mime_type) instead of just content. (#170)Added comprehensive server lifecycle management through the lifespan API:
@dataclass
class AppContext:
db: Database
@asynccontextmanager
async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
try:
await db.connect()
yield AppContext(db=db)
finally:
await db.disconnect()
mcp = FastMCP("My App", lifespan=app_lifespan)
@mcp.tool()
def query_db(ctx: Context) -> str:
db = ctx.request_context.lifespan_context["db"]
return db.query()
(#203)
Added support for async resource functions in FastMCP:
@mcp.resource("users://{user_id}")
async def get_user(user_id: str) -> str:
async with client.session() as session:
response = await session.get(f"/users/{user_id}")
return await response.text()
(#157)
Made message handling concurrent, allowing multiple requests to be processed simultaneously. (#206)
Added support for canceling in-flight requests and cleaning up resources. (#167)
Added support for the instructions field in server initialization, allowing servers to provide usage guidance. (#150)
pydantic: Changed from >=2.10.1,<3.0.0 to >=2.7.2,<3.0.0pydantic-settings: Changed from >=2.6.1 to >=2.5.2uvicorn: Changed from >=0.30 to >=0.23.1
(#180)Added support for async resources
Fixed deprecation warnings in core components
A big thank you to @jlowin for the creation of the fantastic FastMCP, which is now included into the MCP SDK.
This release is semver compatible. Existing code will continue to work, unless code relied on re-experts from mcp.server. Version 2.0 of the SDK will remove the use of mcp.server.Server in favour of mcp.server.lowlevel.Server. To stay compatible with upcoming major versions, please change from mcp.server import Server to from mcp.server.lowlevel import Server.
mcp.server.fastmcp module with simplified decorator-based APIFastMCP class for easier server creation and managementmcp dev command for local development and testingmcp install command for Claude Desktop integrationmcp run command for direct server executionmcp.server in favor of mcp.server.fastmcppip install "mcp[cli]")Special thanks to all contributors who made this release possible, including:
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.1.3...v1.2.0
Fixed deprecation warnings in core components
mcp.server.fastmcp module with simplified decorator-based APIFastMCP class for easier server creation and managementmcp dev command for local development and testingmcp install command for Claude Desktop integrationmcp run command for direct server executionmcp.server in favor of mcp.server.fastmcppip install "mcp[cli]")Special thanks to all contributors who made this release possible, including:
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.1.2...v1.2.0rc1
Fixed encoding errors in STDIO client (@SecretiveShell)
Thank you for your contributions!
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.1.1...v1.1.2
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.1.1...v1.1.2
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.1.0...v1.1.1
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.1.0...v1.1.1
Fix first Python demo so it works without further modifications by @simonw in https://github.com/modelcontextprotocol/python-sdk/pull/66
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v1.0.0...v1.1.0
We're excited to announce the first stable release of the Model Context Protocol (MCP) Python SDK! This release provides a complete implementation of
We're excited to announce the first stable release of the Model Context Protocol (MCP) Python SDK! This release provides a complete implementation of the MCP specification, enabling seamless integration between LLM applications and context providers.
# Using uv (recommended)
uv add mcp
# Using pip
pip install mcp
from mcp.server import Server
import mcp.types as types
server = Server("example-server")
@server.list_prompts()
async def handle_list_prompts() -> list[types.Prompt]:
return [
types.Prompt(
name="example-prompt",
description="An example prompt template",
arguments=[
types.PromptArgument(
name="arg1",
description="Example argument",
required=True
)
]
)
]
# Run the server over stdio
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
await server.run(
read_stream,
write_stream,
server.create_initialization_options()
)
from mcp import ClientSession, StdioServerParameters
async with mcp.client.stdio.stdio_client(
StdioServerParameters(command="path/to/server")
) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
prompts = await session.list_prompts()
anyio 4.6 or laterpydantic 2.8.0 or laterhttpx 0.27 or laterThis is the initial stable release, establishing the baseline API for future versions.
MIT License
For more information:
fix return values of tools by @dsp-ant in https://github.com/modelcontextprotocol/python-sdk/pull/56
Full Changelog: https://github.com/modelcontextprotocol/python-sdk/compare/v0.9.0...v0.9.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →