Skip to content

[MCP] Read resource assumes a directory structure #262368

@Tritlo

Description

@Tritlo

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.103.1
  • OS Version: Windows_NT x64 10.0.26100

I've developed an MCP server that allows users to read resources, in this case a list of "available datasets" in a proprietary system. The server returns a list of datasets, each with an attached uri to get further details on that dataset.

When this resource is browsed, VS Code assumes that it is a directory, and rather than listing the datasets (as expected) and allowing Copilot to request further information on the dataset via the provided uri, it assumes that it is a directory. It then displays:

Image

In Copilot itself, it assumes that the resulting URIs are files in a directory that it doesn't have access to and does not return further information on the dataset.

Image

In Claude it behaves as expected, listing the available datasets and returning further information on request:

Image

Steps to Reproduce:

  1. Enable an MCP server that has resources/read
  2. MCP server returns further non-directory resources
  3. Output is interpreted as a directory, and no information is displayed
2025-08-19 20:16:52.808 [debug] [editor -> server] {"jsonrpc":"2.0","id":5,"method":"resources/read","params":{"uri":"dpella://datasets"}}
2025-08-19 20:16:52.808 [debug] [editor -> server] {"jsonrpc":"2.0","id":6,"method":"resources/read","params":{"uri":"dpella://datasets"}}
2025-08-19 20:16:52.915 [debug] [server -> editor] {"id":6,"jsonrpc":"2.0","result":{"contents":[{"mimeType":"text/plain","name":"transactions","text":"transactions","uri":"dpella://datasets/transactions"}]}}
2025-08-19 20:16:52.915 [debug] [editor -> server] {"jsonrpc":"2.0","id":7,"method":"resources/read","params":{"uri":"dpella://datasets"}}
2025-08-19 20:16:52.929 [debug] [server -> editor] {"id":5,"jsonrpc":"2.0","result":{"contents":[{"mimeType":"text/plain","name":"transactions","text":"transactions","uri":"dpella://datasets/transactions"}]}}
2025-08-19 20:16:52.957 [debug] [server -> editor] {"id":7,"jsonrpc":"2.0","result":{"contents":[{"mimeType":"text/plain","name":"transactions","text":"transactions","uri":"dpella://datasets/transactions"}]}}
2025-08-19 20:16:52.958 [debug] [editor -> server] {"jsonrpc":"2.0","id":8,"method":"resources/read","params":{"uri":"dpella://datasets/transactions"}}
2025-08-19 20:16:53.056 [debug] [server -> editor] {"id":8,"jsonrpc":"2.0","result":{"contents":[{"mimeType":"text/plain","name":"transactions","text":"[Information about transactions]","uri":"dpella://datasets/transactions"}]}}

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugchat-mcpinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions