python-sdk
python-sdk copied to clipboard
The official Python SDK for Model Context Protocol servers and clients
### Description ## Summary `func_metadata()` in `src/mcp/server/fastmcp/utilities/func_metadata.py` is a large function that handles: - signature introspection, - parameter/return type analysis, - JSON schema generation, - special handling for various container...
### Description ## Summary The current test suite for the Python SDK appears to lean heavily on integration tests: - many tests spin up full servers/clients, - numerous tests live...
### Description ## Summary MCP servers built with the Python SDK currently process incoming requests as fast as they arrive, limited mostly by system resources. There are no built-in mechanisms...
## Summary This PR improves the documentation for Streamable HTTP `stateless_http` mode in the Python SDK by clarifying what "stateless" means in the MCP context, which features are impacted, and...
### Description ## Summary The SDK exposes a `stateless_http` mode for Streamable HTTP, where each request is handled with a new transport/session. This is useful for some deployment environments, but...
### Question I work on the Strands SDK, and we have an integration with MCP where we invoke tools through an MCP client. Our design spins up a thread, creates...
### Description ## Summary FastMCP currently uses introspection to automatically inject a `Context` parameter into tools/resources when it detects a parameter with the right name/type. This is convenient but “magic”:...
## Summary This PR introduces a **pluggable instrumentation interface** with a **token-based API** for the MCP Python SDK, enabling OpenTelemetry and other observability integrations as requested in [#421](https://github.com/modelcontextprotocol/python-sdk/issues/421). ## Key...
**Is your feature request related to a problem? Please describe.** I would like to see Opentelemetry traces and Metrics baked into SDK. E.g. 1. Traces emitted on all Requests from...
### Description ## Summary `StreamableHTTPSessionManager` currently enforces that `run()` can only be called once per instance. This is documented but not explained, and it complicates: - testing (each test must...