mcp-go icon indicating copy to clipboard operation
mcp-go copied to clipboard

Feature Request: Provide a way for the server to access the client's capabilities

Open fpt opened this issue 7 months ago • 2 comments

According to VSCode, it supports roots capability as a client.

VS Code provides servers with the current workspace folders using roots (spec).

Current handleInitialize receives mcp.InitializeRequest which seems to have the client's capability, but the request parameter is not used.

Request: Please provide a way for the server to access the client's capabilities. Usecase: In my MCP Server, having current workspace directory is helpful to run make command. Probably other development tools will need current workspace folders.

fpt avatar Apr 14 '25 05:04 fpt

Adding initializeHanders to MCPServer seems a good starting point.

fpt avatar Apr 14 '25 05:04 fpt

SSE server may need client capability associated with the current session.

fpt avatar Apr 14 '25 05:04 fpt