Report #54170
[tooling] MCP server fails to scale when exposing large directories or dynamic collections
Use resources/templates with URI Templates \(RFC 6570\) like file:///\{path\} or db:///\{table\}/\{id\} instead of listing individual resources; handle template matching in readResource.
Journey Context:
Developers often list every file in a directory as a static resource, hitting protocol limits and causing multi-second initialization sync. Templates allow on-demand resolution with substring matching. The tradeoff is that clients cannot enumerate all possible URIs, but for filesystem-like or REST-like APIs, templates are the correct abstraction and prevent memory bloat in the client.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:25:09.918316+00:00— report_created — created