Resource-template query values include URI fragments
Author: Harsh23KashyapCreated Sep 16, 2026Updated Sep 16, 2026
Labelsbugserver
Resource-template query parameters include the URI fragment in their value. I expected fragments to stay separate from the query, as they do in standard URI parsing.
from fastmcp.resources.template import match_uri_template
print(
match_uri_template(
"test://items?filter=active#section",
"test://items{?filter}",
)
)This prints:
{"filter": "active#section"}Expected:
{"filter": "active"}Version: FastMCP 4.0.4, Python 3.12.13, Linux.
Source: PrefectHQ/fastmcp