python-sdk/tests/server/fastmcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Carleton d3a184119e
Some checks failed
Main branch checks / checks (push) Has been cancelled
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
2025-12-02 13:23:55 +00:00
..
auth Add client_secret_basic authentication support (#1334) 2025-11-20 20:53:37 +00:00
prompts Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
resources Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
servers Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
__init__.py Integrate FastMCP 2024-12-21 00:41:38 +00:00
test_elicitation.py Implement SEP-1036: URL mode elicitation for secure out-of-band interactions (#1580) 2025-11-25 11:00:21 +00:00
test_func_metadata.py Refactor func_metadata() implementation (#1496) 2025-11-13 20:21:15 +00:00
test_integration.py Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
test_parameter_descriptions.py Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
test_server.py Merge commit from fork 2025-12-02 13:23:55 +00:00
test_title.py Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
test_tool_manager.py Get baseline 100% clean coverage (#1553) 2025-11-11 14:09:32 +01:00
test_url_elicitation.py Implement SEP-1036: URL mode elicitation for secure out-of-band interactions (#1580) 2025-11-25 11:00:21 +00:00