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

This change skips non-json server messages, for example: logs to standard out. ## Motivation and Context Today if the client receives a non-json message from a local server, the receive...

Hi Team, **Describe the bug** The project's readme suggests using FastMCP server (merged into mcp version 1.2.0rc1) but pypi offers mcp1.1.2 version which doesn't support FastMCP yet. **To Reproduce** Steps...

Renamed the `inputSchema` field to `input_schema` in the `Tool` class to align with Python's naming conventions (snake_case). Added an alias `inputSchema` for backward compatibility. ## Motivation and Context The name...

This change ensures that the standard input stream (`sys.stdin`) is read with UTF-8 encoding by re-wrapping it using `io.TextIOWrapper`. This addresses potential encoding issues where the default system encoding might...

When I run the first step `uv add "mcp[cli]"`, it said: ```error: Requirement name `mcp` matches project name `mcp`, but self-dependencies are not permitted without the `--dev` or `--optional` flags....

Added a new example client to the `examples/clients` folder to demonstrate the usage of the SDK. ## Motivation and Context This change is needed to provide users with a practical...

**Describe the bug** If the server sends a JSON RPC message that contains invalid characters it is possible to crash the client STDOUT reader. ``` UnicodeDecodeError: 'utf-8' codec can't decode...

The files src/mcp/client/sse.py and src/mcp/server/sse.py implement the client and server functionalities for SSE transport, but there are no tests in the repository to verify their behavior. Relevant Links: PR: https://github.com/modelcontextprotocol/python-sdk/pull/83...

Hi Guys , I want to build sse server and client from sdk example , but I'm not lucky, it can't work, SSE server and client got error : SSE...

# fix: handle internal notifications during session cleanup Addresses an issue where internal notifications (e.g. 'cancelled') during session cleanup would trigger validation errors and crash the server. ## Changes -...