Cursor mcp claims itself has roots ClientCapabilities (but without list_changed
feature)
Request(JsonRpcRequest { jsonrpc: JsonRpcVersion2_0, id: Number(0), request: InitializeRequest(Request { method: InitializeResultMethod, params: InitializeRequestParam { protocol_version: ProtocolVersion("2024-11-05"), capabilities: ClientCapabilities { experimental: None, roots: Some(RootsCapabilities { list_changed: Some(false) }), sampling: None }, client_info: Implementation { name: "cursor-vscode", version: "1.0.0" } }, extensions: Extensions }) })
but when the mcp server call it, it returns error:
JsonRpcError { jsonrpc: JsonRpcVersion2_0, id: Number(0), error: ErrorData { code: ErrorCode(-32601), message: "Method not found", data: None } }
according Roots - Model Context Protocol
Clients that support roots MUST declare the
roots
capability during initialization:Listing Roots
To retrieve roots, servers send a
roots/list
request
so, Cursor mcp should provides servers with the current workspace folders using roots
(spec).
vscode support this:
Supported MCP capabilities
VS Code supports local standard input/output (
stdio
) and server-sent events (sse
) for MCP server transport. Currently of the 3 primitives (tools
,prompts
,resources
), servers can only providetools
to Copilot’s agent mode. The list and descriptions of tools can be updated dynamically using list changed events. VS Code provides servers with the current workspace folders usingroots
(spec).