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

[Bug]: Does not detect VS Code connection

Open felipecrs opened this issue 2 weeks ago • 0 comments

What happened?

The "Connect" feature for GitHub Copilot (VS Code, Copilot CLI) works: it adds MCPProxy to ~/.copilot/mcp-config.json, and VS Code uses it. Tool calls from VS Code go through and are attributed to the copilot client.

MCPProxy still shows the client as connected but never seen:

https://github.com/user-attachments/assets/21e0a0fa-f915-46cb-b758-c3a68f51e58f

VS Code (1.147.0, Copilot agent harness) sends clientInfo.name = "vscode-agent-host" in initialize. The copilot connect client only matches copilot-cli, github-copilot-developer and copilot exactly (ClientInfoNames in internal/connect/clients.go). So the session lands in a separate "other" row named vscode-agent-host, and the Copilot row stays connected_never_seen:

CLIENT                                 STATE                 LAST SEEN                  SESSIONS  CALLS 24H  CONFIG PATH                 CREDENTIAL
GitHub Copilot (VS Code, Copilot CLI)  connected_never_seen  Never                      0         0          ~\.copilot\mcp-config.json  client
vscode-agent-host                      other                 2026-11-20T14:55:30-03:00  0         0                                      none

The activity log already links these calls to the copilot client, because they use the client-copilot credential that Connect wrote:

$ mcpproxy activity list --client-name vscode-agent-host
TYPE           SERVER           TOOL            CLIENT   STATUS   TIME
tool_call      changedetection  list_tags       copilot  success  11 minutes ago
internal_tool                   retrieve_tools  copilot  success  11 minutes ago

The fix could do one or both of these:

  1. Add vscode-agent-host to ClientInfoNames for the copilot client.
  2. Count a session as presence for a supported client when it authenticates with that client's credential, whatever clientInfo.name it reports. Spec 108 already does this for custom clients. It's also more robust than name matching, since the name is self-reported and has changed across VS Code versions.

Expected behavior

The Copilot client shows as connected_seen once VS Code connects with the credential MCPProxy wrote, and no separate vscode-agent-host "other" row appears.

Steps to reproduce

  1. On Windows, run mcpproxy connect copilot (or use Connect in the Web UI).
  2. Reload VS Code (1.147.0) and run any MCPProxy tool from Copilot chat in agent mode.
  3. Run mcpproxy client list. The Copilot row shows connected_never_seen / Never, and a separate vscode-agent-host row shows other with a recent LAST SEEN.
  4. Run mcpproxy activity list --client-name vscode-agent-host. Those same calls show CLIENT = copilot.

MCPProxy version

MCPProxy v0.74.0 (personal) windows/amd64

Operating system

Windows

Relevant logs

$ mcpproxy client show copilot
Client: GitHub Copilot (VS Code, Copilot CLI)
State: connected_never_seen
Config path: ~\.copilot\mcp-config.json
Credential: client (token client-copilot)
Profile: all servers, switchable, source binding
Sessions: 0

Pre-submission checklist

  • [x] I searched existing issues and did not find a duplicate
  • [ ] I ran mcpproxy doctor and reviewed the output

felipecrs avatar Nov 20 '26 18:11 felipecrs