Contents

mcp 1.26.0

0

Model Context Protocol SDK

Model Context Protocol SDK

Stars: 21709, Watchers: 21709, Forks: 3091, Open Issues: 367

The modelcontextprotocol/python-sdk repo was created 1 years ago and the last code push was 13 hours ago.
The project is extremely popular with a mindblowing 21709 github stars!

How to Install mcp

You can install mcp using pip

pip install mcp

or add it to a project with poetry

poetry add mcp

Package Details

Author
Anthropic, PBC.
License
MIT
Homepage
None
PyPi:
https://pypi.org/project/mcp/
GitHub Repo:
https://github.com/modelcontextprotocol/python-sdk

Classifiers

No  mcp  pypi packages just yet.

Errors

A list of common mcp errors.

Code Examples

Here are some mcp code examples and snippets.

GitHub Issues

The mcp package has 367 open issues on GitHub

  • Add tests for MCPServer.read_resource exception handling
  • refactor: McpError renamed to MCPError and flatten parameters
  • Simplify mcp.run example by removing json_response
  • Store server_info on ClientSession during initialization
  • fix: send error to client when SSE stream disconnects without response
  • fix: support wildcard media types in Accept header validation
  • fix: handle ClientDisconnect gracefully instead of returning HTTP 500
  • fix:Improve code maintainability: Add a public mcp_server attribute t…
  • Add {path}/.well-known/oauth-authorization-server as a discovery URL fallback
  • fix(hang): fix streamable_http GET handling to prevent hangs
  • streamable_http client hangs indefinitely when connecting to POST-only MCP servers (ex: GitHub MCP)
  • fix: notify session when SSE stream closes without event ID
  • fix: handle EndOfStream and ClosedResourceError in send_request
  • fix: strip trailing slashes from OAuth metadata URL fields
  • Fix RFC 8252 Section 7.3 compliance for loopback redirect URIs

See more issues on GitHub