Skip to content
MCP Python SDK
Index
Initializing search
modelcontextprotocol/python-sdk
MCP Python SDK
modelcontextprotocol/python-sdk
MCP Python SDK
What's new in v2
Get started
Get started
Installation
First steps
Connect to a real host
Testing
Servers
Servers
Tools
Structured Output
Resources
URI templates
Prompts
Completions
Images, audio & icons
Handling errors
Inside your handler
Inside your handler
The Context
Dependencies
Lifespan
Elicitation
Multi-round-trip requests
Progress
Logging
Subscriptions
Running your server
Running your server
Add to an existing app
Deploy & scale
Authorization
OpenTelemetry
Serving legacy clients
Clients
Clients
Callbacks
Transports
OAuth
Identity assertion
Multiple servers
Caching
Protocol versions
Deprecated features
Advanced
Advanced
The low-level Server
Pagination
Middleware
Extensions
MCP Apps
Troubleshooting
Migration Guide
API Reference
API Reference
mcp
mcp
cli
client
os
server
shared
shared
auth
auth_utils
context
direct_dispatcher
dispatcher
exceptions
extension
inbound
jsonrpc_dispatcher
memory
message
metadata_utils
path_security
peer
session
subscriptions
tool_name_validation
transport_context
uri_template
mcp_types
Table of contents
shared
MCP Python SDK
API Reference
mcp
shared
Index
Back to top