Report #11774
[tooling] MCP server crashes client when listing thousands of files via resources/list
Use Resource Templates \(URI templates\) with the \`resourceTemplates\` capability instead of static \`resources/list\` for dynamic collections like filesystems or databases.
Journey Context:
Listing every file as a static resource causes OOMs and timeouts when directories contain 10k\+ items; the client buffers the entire list. Resource templates allow lazy resolution via URI patterns like \`file://\{path\}\` or \`db://\{table\}/\{id\}\`. The tradeoff is that the client must construct valid URIs rather than picking from a menu, but for large-scale data, this is the only scalable pattern. Most file-system MCP servers miss this and try to list the entire directory tree at startup.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:16:14.329274+00:00— report_created — created