copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

[Feature Request] Send copilot-cli specific metadata when invoking MCP servers

Open shizhMSFT opened this issue 2 months ago • 2 comments

Describe the feature or problem you'd like to solve

Send copilot-cli specific metadata when invoking MCP servers

Proposed solution

Right now, the copilot CLI doesn’t include any identifier when it connects to MCP servers.

Here's a sample MCP request from the copilot CLI

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "_meta": {
      "progressToken": 2
    },
    "name": "cool_tool_name",
    "arguments": {
      "foo": "bar"
    }
  }
}

Environment:

> copilot --version
0.0.353
Commit: f8fd3e3

Meanwhile, VS Code kind of labels itself.

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "_meta": {
      "progressToken": "f78b107c-d8f7-415e-9acb-9a924295e3c7",
      "vscode.conversationId": "4bbaa913-a8a3-4807-8b22-39b38a640d52",
      "vscode.requestId": "4578b866-66a0-41fe-a345-baec275a82b2"
    },
    "name": "cool_tool_name",
    "arguments": {
      "foo": "bar"
    }
  }
}

Example prompts or workflows

No response

Additional context

No response

shizhMSFT avatar Oct 30 '25 10:10 shizhMSFT

@shizhMSFT - When we create the client to connect to mcp servers today (in both the CLI and in Copilot Coding Agent) we are passing a name parameter of github-copilot-developer. Is that sufficent for your use? I suppose we could start passing somethinging prefixed with something like copilot-cli or copilot-cca (I'm sure we can spend time bikesheading on the prefix for these values) but I'm not sure what additional information we'd want to pass in (looking at VSCode, I could image we'd start with the sessionId which is like their conversationId I am guessing).

I guess my meta question here is what sort of information would be helpful to servers we are talking to (and why)? Or are you just trying to get raw caller numbers so you can report information/statitics yourself? In that case would the name of the client be sufficent?

ellismg avatar Nov 03 '25 23:11 ellismg

Thank you for the quick response. I realized I missed the github-copilot-developer value in clientInfo.name. I’ll try again with that included.

shizhMSFT avatar Nov 04 '25 03:11 shizhMSFT

@ellismg may I ask is it feasible to add copilot-cli or copilot-cca into clientinfo for better differentiate from source? So that we can add telemetry into this, per our sync with @RyanHecht in last week's meeting, appreciate!

hellosnow avatar Nov 11 '25 07:11 hellosnow

@ellismg may we request prioritize this? we had a talk with @RyanHecht last week and we'd like to request this adding metadata in clientinfo before Ignite, thanks a lot

hellosnow avatar Nov 12 '25 01:11 hellosnow

@timngmsft this is the feature request that to add copilot-cli and copilot-cca into clientinfo which can benefit our telemetry tracking, thanks

hellosnow avatar Nov 13 '25 03:11 hellosnow