Skip to content
MCP Python SDK
os
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
os
posix
win32
server
shared
mcp_types
On this page
os
MCP Python SDK
API Reference
mcp
os
os
Platform-specific utilities for MCP.
Back to top