Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/mcp/server/auth/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ def validate_issuer_url(url: AnyHttpUrl):
"""

# RFC 8414 requires HTTPS, but we allow localhost HTTP for testing
if url.scheme != "https" and url.host != "localhost" and not url.host.startswith("127.0.0.1"):
if (
url.scheme != "https"
and url.host != "localhost"
and (url.host is not None and not url.host.startswith("127.0.0.1"))
):
raise ValueError("Issuer URL must be HTTPS")

# No fragments or query parameters allowed
Expand Down
1 change: 1 addition & 0 deletions tests/server/fastmcp/test_func_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def func_dict_any() -> dict[str, Any]:

meta = func_metadata(func_dict_any)
assert meta.output_schema == {
"additionalProperties": True,
"type": "object",
"title": "func_dict_anyDictOutput",
}
Expand Down
Loading
Loading