Skip to main content

Upstream Resources

MCP servers can offer resources: data a client reads by address, such as a file, a document or a database row. A server lists concrete resources and resource templates (address patterns such as file:///{+path}), and serves the content of one address on request. Clients show resources in an "attach" picker.

With this feature on, MCPProxy lists the resources and templates of your upstream servers on its own MCP endpoint and reads them for the client.

Turn it on​

{
"aggregate_upstream_resources": true
}

The setting is off by default and takes effect without a restart. With it off, MCPProxy's handshake and every resources/* answer are exactly as before.

To leave one server out, set expose_resources: false on it:

{ "name": "big-files", "url": "https://example.com/mcp", "expose_resources": false }

A server contributes only while it is enabled, not quarantined, connected, and announces the resources capability.

Addresses​

On /mcp (every routing mode: /mcp, /mcp/all, /mcp/call, /mcp/code), each upstream address is shown as

mcpproxy://upstream/<server>/<original-uri>
ServerUpstream URIAddress in MCPProxy
docsfile:///guide.mdmcpproxy://upstream/docs/file:///guide.md
my serverdb://t/1mcpproxy://upstream/my%20server/db://t/1
docstemplate file:///{+path}mcpproxy://upstream/docs/file:///{+path}

The server name is percent-encoded (every byte other than letters, digits, -, ., _, ~); the upstream URI follows unchanged. Two servers that use the same URI therefore get two different addresses. A template keeps working: filling the MCPProxy template gives the prefix followed by what the upstream template gives, and MCPProxy reads exactly that upstream address.

The contents of a read carry the address the client used.

Who sees what​

A caller sees and reads a server's resources only when it may reach that server's tools:

  • quarantined and disabled servers contribute nothing, and a read of one of their addresses is refused;
  • an agent token sees only the servers it is scoped to (and, when pinned, the servers of its profile);
  • a request with a profile sees only the servers in that profile.

The check runs on every read, not only on the list. A refused read gets the same "resource not found" answer as an address that does not exist, and nothing is sent upstream.

Skills stay behind their approval​

Skill files (Skills over MCP) are also resources on many servers. They are never listed or read through this feature. A server that announces the skills extension contributes no resources and no templates at all, whether or not enable_skills is on: its skills reach agents only through their own approval, and its other resources are not aggregated in this release. The same holds for a server that announced skills before and has stopped: mcpproxy records it during the handshake in which the server announced the extension, whether or not skills are on, and asks such a server for no listing at all. Removing the server clears that memory. On every other server, addresses in the skill:// namespace and templates that could produce one are left out.

Checks on the content​

  • Metadata scan: a resource or template whose name, title or description trips the tool-poisoning scanner at the "dangerous" level is withheld and cannot be read.
  • Output policy: resource text goes through output sanitisation as untrusted upstream output (redact, strip, spotlight, block), as tool responses do. A binary item whose bytes are text is treated as text, whatever MIME type it declares; real binary content is passed unchanged.
  • Size limit: a read larger than 8 MiB (the upstream JSON response) is refused. On streamable HTTP MCPProxy stops reading at the limit; on stdio and SSE the result is measured after it arrives. Listing is bounded too: 50 pages, 500 resources and 100 templates per server, 4 MiB per page on streamable HTTP. A server whose resource or template listing hits one of these limits (or fails) contributes nothing until a later listing is whole, because a withheld entry past the cut could otherwise leave its address readable; MCPProxy logs a warning naming the server. A server that has no resources/templates/list method simply has no templates.
  • Addresses that cannot be namespaced (an upstream URI with an IPv6 authority such as https://[::1]/doc, spaces or non-ASCII bytes) are not shown.
  • Sensitive-data detection runs on the recorded response, as for tool calls.

Activity log​

Every read records one resource_read row with the server, the upstream URI, the address the client used, the outcome, the duration, the content size, the number of items and their MIME types:

mcpproxy activity list --type resource_read

A read blocked by the output policy also records a policy_decision row with the same request id. Listing resources records nothing.

Not yet​

  • Change notifications (notifications/resources/list_changed) and subscriptions (resources/subscribe, notifications/resources/updated).
  • Resources on single-server endpoints (/mcp/s/<server>).
  • Rewriting resource links inside tool results.