Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
"anyio>=4.5",
"httpx>=0.27",
"httpx-sse>=0.4",
"pydantic>=2.7.2,<3.0.0",
"pydantic>=2.11.0,<3.0.0",
"starlette>=0.27",
"python-multipart>=0.0.9",
"sse-starlette>=1.6.1",
Expand Down
5 changes: 3 additions & 2 deletions src/mcp/server/auth/routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Awaitable, Callable
from typing import Any
from typing import Any, cast

from pydantic import AnyHttpUrl
from starlette.middleware.cors import CORSMiddleware
Expand Down Expand Up @@ -32,7 +32,8 @@ 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"):
host = cast(str, url.host)
if url.scheme != "https" and host != "localhost" and not 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