SIGN IN SIGN UP

The official Python SDK for Model Context Protocol servers and clients

22456 0 0 Python

TAGS

20 tags
v1.26.0

[v1.x] fix: return HTTP 404 for unknown session IDs instead of 400 (#1945) Co-authored-by: Maxime <67350340+max-rousseau@users.noreply.github.com> Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>

v1.25.0

ci: add v1.x branch to main-checks workflow (#1802)

v1.24.0

fix: use correct python command name in test_stdio.py (#1782) Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>

v1.23.3

chore: remove release-comment workflow (#1758)

v1.23.2

fix: skip priming events and close_sse_stream for old protocol versions (#1719)

v1.23.1

chore: update LATEST_PROTOCOL_VERSION to 2025-11-25 (#1715)

v1.23.0

Merge commit from fork * Auto-enable DNS rebinding protection for localhost servers When a FastMCP server is created with host="127.0.0.1" or "localhost" and no explicit transport_security is provided, automatically enable DNS rebinding protection. Both 127.0.0.1 and localhost are allowed as valid hosts/origins since clients may use either to connect. * Add tests for auto DNS rebinding protection on localhost Tests verify that: - Protection auto-enables for host=127.0.0.1 - Protection auto-enables for host=localhost - Both 127.0.0.1 and localhost are in allowed hosts/origins - Protection does NOT auto-enable for other hosts (e.g., 0.0.0.0) - Explicit transport_security settings are not overridden * Add IPv6 localhost (::1) support for DNS rebinding protection Extend auto-enable DNS rebinding protection to also cover IPv6 localhost. When host="::1", protection is now auto-enabled with appropriate allowed hosts ([::1]:*) and origins (http://[::1]:*). * Fix import ordering in test file

v1.22.0

docs: Update examples to use stateless HTTP with JSON responses (#1499)

v1.21.2

fix get_client_metadata_scopes on 401 (#1631) Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>

v1.21.1

Fix CI highest resolution test to actually test highest versions (#1609)

v1.21.0

Add get_server_capabilities() to ClientSession (#1588)

v1.20.0

Fix auth client example URL handling for oauth provider (#1549)

v1.19.0

update uv to 0.9.5 (#1510)

v1.18.0

fix: Set the Server session initialization state immediately after respond… (#1478) Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>

v1.17.0

fix: update CLAUDE.md to remove auto-addition of reviewers. (#1431)

v1.16.0

Add icons support for ResourceTemplate (#1412)

v1.15.0

Implementation of SEP 973 - Additional metadata + icons support (#1357)

1.15.0

Implementation of SEP 973 - Additional metadata + icons support (#1357)

v1.14.1

Use --frozen in pre-commit config (#1375)

v1.14.0

Fix context injection for resources and prompts (#1336)