python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

The official Python SDK for Model Context Protocol servers and clients

Results 229 python-sdk issues
Sort by recently updated
recently updated
newest added

Allow users to opt-in to defining custom message types for MCP and server/client side hooks for how to process them. ## Motivation and Context This change allows users to define...

## Motivation and Context Implementation of #767 ## How Has This Been Tested? ## Breaking Changes ## Types of changes - [ ] Bug fix (non-breaking change which fixes an...

**Describe the bug** URL parts are being omitted on SSE client session connect. INFO:mcp.client.sse:Connecting to SSE endpoint: https://url-part1.url-part2.com/route1/route2/sse INFO:httpx:HTTP Request: GET https://url-part1.url-part2.com/route1/route2/sse "HTTP/1.1 200 OK" INFO:mcp.client.sse:Received endpoint URL: https://url-part1.url-part2.com/route2/messages/?session_id=a2bd62740b69466c8b27043ccda2513f INFO:mcp.client.sse:Starting...

This PR adds an example for integrating a FastMCP endpoint in a FastAPI app (which is not straightforward, and could be better documented). I have added an `examples/servers/fastapi/` folder with...

## Summary Implements SEP-1699 which enables servers to disconnect SSE connections at will by sending priming events and retry fields. ## Motivation and Context [SEP-1699](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1783) introduces SSE polling behavior that...

## Description Implements the `mcp_proxy()` convenience function that enables bidirectional message forwarding between two MCP transports, porting the TypeScript proxy pattern to the Python SDK. ## Changes - Added `mcp_proxy()`...

## Summary This PR addresses #235 by providing comprehensive documentation and examples for creating adapters that convert MCP tool schemas to various LLM provider formats (Gemini, OpenAI, Claude). ## Changes...

## Summary Adds documentation and examples for organizing larger FastMCP servers and managing tool versions. Closes #1681 ## Changes ### Documentation - **New**: `docs/server_organization.md` - Comprehensive guide on: - Recommended...

This is a tracking issue for implementation of [SEP-1699](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1699). ### Summary This SEP proposes changes to the Streamable HTTP transport to mitigate issues with long-running connections and improve resumability by...

enhancement

### Initial Checks - [x] I confirm that I'm using the latest version of MCP Python SDK - [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before...