What happened?
summary
With a Namespace transform on a proxy, listed resources are namespaced
correctly.
However, ResourceLink.uri values returned from a proxied
tools/call result keep the upstream URI instead of the proxied URI.
Tested on FastMCP 3.3.0.
minimal example
from fastmcp.server import create_proxy
from fastmcp.server.transforms import Namespace
proxy = create_proxy(upstream_client, name="Proxy-everything")
proxy.add_transform(Namespace("everything"))
An upstream resource looking like this:
demo://resource/dynamic/text/2
will be exposed correctly as:
demo://everything/resource/dynamic/text/2
But if an upstream tool returns:
mcp.types.ResourceLink(
type="resource_link",
name="dynamic-text",
uri="demo://resource/dynamic/text/2",
)
the proxied tool result still contains:
demo://resource/dynamic/text/2
Observed Behavior
resources/list:
upstream: demo://resource/dynamic/text/2
proxied: demo://everything/resource/dynamic/text/2
resources/read:
demo://everything/resource/dynamic/text/2
-> works
tools/call result content:
ResourceLink.uri == demo://resource/dynamic/text/2
-> raw upstream URI leaks through unchanged
expected behavior
ResourceLink content returned by proxied tools should expose the same proxied
URI as resources/list and resources/read.
scope of this issue
This is specifically about mcp.types.ResourceLink content inside tools/call
results. Normal resources/list, resource_templates/list, and
resources/read already behave correctly through the proxy.
Session-scoped resources returned by some tools may have additional lifecycle
constraints beyond URI rewriting. This issue is about ordinary ResourceLink URI
projection only.
Example Code
Version Information
FastMCP version: 3.3.0
MCP version: 1.27.0
Python version: 3.14.3
Platform: Windows-11-10.0.26200-SP0
FastMCP root path: its a uv venv trust
What happened?
summary
With a
Namespacetransform on a proxy, listed resources are namespacedcorrectly.
However,
ResourceLink.urivalues returned from a proxiedtools/callresult keep the upstream URI instead of the proxied URI.Tested on FastMCP
3.3.0.minimal example
An upstream resource looking like this:
will be exposed correctly as:
But if an upstream tool returns:
the proxied tool result still contains:
Observed Behavior
expected behavior
ResourceLinkcontent returned by proxied tools should expose the same proxiedURI as
resources/listandresources/read.scope of this issue
This is specifically about
mcp.types.ResourceLinkcontent insidetools/callresults. Normal
resources/list,resource_templates/list, andresources/readalready behave correctly through the proxy.Session-scoped resources returned by some tools may have additional lifecycle
constraints beyond URI rewriting. This issue is about ordinary ResourceLink URI
projection only.
Example Code
Version Information