Open
Description
Steps to Reproduce:
- Create a MCP Server that has a Resource that returns multiple resources (valid response, see annotation in MCP docs)
server.setRequestHandler(
ListResourcesRequestSchema,
async () => {
return {
resources: [
{
name: "System Prompts",
description: "Directory for system prompts in the current workspace.",
uri: "file://prompts/",
},
],
} satisfies ListResourcesResult;
},
);
server.setRequestHandler(
ReadResourceRequestSchema,
async (request) => {
return {
contents: [
{
uri: "file://prompts/prompt-1.md",
text: "foo1",
},
{
uri: "file://prompts/prompt-2.md",
text: "foo2",
},
],
} satisfies ReadResourceResult;
},
);
- In VSCode: Command Palette > "MCP: Browse Resources" > "System Prompts"
Expected Result
Each Resource
returned in the ReadResourceResult
object could be shown in perhaps one of the following two ways:
a) both files should open as tabs in the editor (similar to how Claude Desktop handles this) OR
b) another dialog should appear showing each resource, with an ability to multi-select each one individually
Observed Result
No files are displayed, with the error "The file is not displayed in the text editor because it is a directory."
VSCode info
Does this issue occur when all extensions are disabled?: Yes
Version: 1.101.0
Commit: dfaf441
Date: 2025-06-11T15:00:50.123Z (6 days ago)
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 24.5.0