- Notifications
You must be signed in to change notification settings - Fork957
Description
Hi.
My organization is currently slowing migrating from a hosted Github Enterprise Server instance to Github Enterprise Cloud. When I try to use VS Code's Agent support, I can configure two distinct tools with different names and different configurations. Something like this:
{"chat.agent.enabled":true,"mcp": {"inputs": [ {"type":"promptString","id":"ghec_token","description":"GitHub Enterprise Cloud Personal Access Token","password":true }, {"type":"promptString","id":"ghes_token","description":"GitHub Enterprise Server Personal Access Token","password":true } ],"servers": {"GHEC": {"command":"github-mcp-server","args": ["stdio" ],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:ghec_token}" } },"GHES": {"command":"github-mcp-server","args": ["stdio" ],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:ghes_token}","GH_HOST":"https://someotherdomain.com" } } } }}
The problem is that the Agent is confused and seems to pin itself to only the set of tools exposed by one of the servers, hence I cannot navigate between the repos hosted on both Github instances. I can't seem to "prompt" engineer my way out of this.
The Github MCP server docs show how to overwrite individual tool descriptions. I haven't tried, but I guess I could override the tool descriptions for both servers, explicitly call out one set is for GHEC, one for GHES, and see if I can then adjust the prompt to force it to use one set of tools, so one server, or the other. But I'm hoping there's a better way to do this.
This may be more of a VS Code issue, but maybe there's something in how the server is actually implemented that could help facilitate this use case.
Thank you!