Skip to content

Add an easy way for me to extend an MCP definition contributed by an extension #278201

@TylerLeonhardt

Description

@TylerLeonhardt

While working on bringing GH MCP into Copilot Chat, I realized that I wanted to provide the same functionality that manually configuring the MCP server has:
https://github.com/github/github-mcp-server?tab=readme-ov-file#available-toolsets

You can add a header "X-MCP-Toolsets": "default,orgs" that includes additional tools in the server.

The best way to do this via an extension is enabling this via a user setting... but then the mcp.json no longer becomes the one stop shop for configuring MCP Servers.

It would be ideal to keep this all in one place so that we can build nice UI on top of it.

Proposal

Have an $extends property that allows me to add headers, env, and args to my servers.

{
	"servers": {
		"my-server": {
			"url": "https://foo.azurewebsites.net/mcp",
			"type": "http"
		},
		"localhost": {
			"url": "http://localhost:3000/mcp",
			"type": "http"
		},
		"$extends": {
			"github.copilot-chat/GitHub": {
				"headers": {
					"X-MCP-Toolsets": "foo,bar"
				}
			},
			"github.copilot-chat/MCP CLI": {
				"args": ["--some-local-flag"],
				"env": {
					"SOME_ENV_VAR": "some_value"
				}
			}
		}
	},
	"inputs": []
}

Scenarios where this would be useful

  • The GH MCP toolsets
  • Adding a DEBUG=true or --log-level debug to a stdio server for debugging

Metadata

Metadata

Labels

chat-mcp-managementIssues related to browsing and managing MCP Servers in VS Codeunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions