Skip to content
MCP Python SDK
shared
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
Sampling and roots
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
Subscriptions
Caching
Protocol versions
Deprecated features
Advanced
Advanced
The low-level Server
Pagination
Middleware
Extensions
MCP Apps
Troubleshooting
Migration Guide
About
About
Versioning and support policy
Roadmap
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
subscriptions
tool_name_validation
transport_context
uri_template
mcp_types
On this page
shared
MCP Python SDK
API Reference
mcp
shared
shared
Back to top