mcp: show where built-in MCP servers come from - #339427
Open
Vritant Bhardwaj (vritant24) wants to merge 3 commits into
Open
Vritant Bhardwaj (vritant24) wants to merge 3 commits into
Vritant Bhardwaj (vritant24) wants to merge 3 commits into
Conversation
The Chat Customizations MCP details page showed no source for built-in servers: the header fell back to a literal "mcp.json" and the Configuration section was empty without explanation. - Forward the runtime-reported display name and source plugin from the Copilot agent host as namespaced customization metadata. - Show where a server comes from when it has no configuration file (e.g. "Built-in: Copilot", "Managed by Copilot", "Agent host configuration"); Copilot-contributed servers link to their extension. - Explain why the agent's own servers have no definition, and link github-mcp-server to chat.agentHost.githubMcpServer.enabled. - Show the definition of servers added to the agent host configuration and group them under User. - Add Show Extension / Show Configuration to built-in row menus. Fixes microsoft#338719 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Vritant Bhardwaj (vritant24)
October 2, 2026 23:26
View session
Vritant Bhardwaj (vritant24)
enabled auto-merge
October 2, 2026 23:27
…nfig-visibility-issue # Conflicts: # src/vs/workbench/contrib/chat/test/browser/aiCustomization/mcpListWidget.test.ts
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Provider-specific settings are inferred from a server name, and open details do not refresh when runtime provenance arrives.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds accurate provenance and configuration details for built-in and Agent Host MCP servers.
Changes:
- Propagates runtime display names, source plugins, and host-held definitions.
- Shows provenance, settings links, and source actions in MCP details.
- Adds focused unit tests and visual fixtures.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/sessions/aiCustomizationManagementEditor.fixture.ts |
Adds built-in MCP detail fixtures. |
src/vs/workbench/contrib/chat/test/browser/aiCustomization/mcpListWidget.test.ts |
Tests labels, provenance, grouping, and source actions. |
src/vs/workbench/contrib/chat/test/browser/aiCustomization/embeddedMcpServerDetail.test.ts |
Tests provenance and settings rendering. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostCustomizationService.test.ts |
Tests runtime metadata and host definitions. |
src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css |
Styles provenance and settings links. |
src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCount.ts |
Selects managed display names and expands search. |
src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.ts |
Integrates provenance, definitions, grouping, and actions. |
src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.ts |
Renders real origins and unavailable-definition explanations. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.ts |
Exposes metadata and host configuration. |
src/vs/sessions/common/agentHostSessionsProvider.ts |
Extends the shared MCP server contract. |
src/vs/platform/agentHost/test/node/shared/mcpCustomizationController.test.ts |
Tests metadata lifecycle behavior. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Tests SDK metadata propagation. |
src/vs/platform/agentHost/test/common/agentMetaReaders.test.ts |
Tests metadata validation and clearing. |
src/vs/platform/agentHost/node/shared/mcpCustomizationController.ts |
Publishes and preserves MCP provenance metadata. |
src/vs/platform/agentHost/node/shared/githubMcpServer.ts |
Re-exports the shared server name. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Maps SDK provenance into Agent Host state. |
src/vs/platform/agentHost/common/meta/vscode/mcpCustomizationMeta.ts |
Defines typed metadata readers and writers. |
src/vs/platform/agentHost/common/meta/mcpCustomizationMeta.ts |
Exports the new metadata helpers. |
src/vs/platform/agentHost/common/githubEndpoints.ts |
Centralizes the GitHub MCP server name. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vritant Bhardwaj (vritant24)
disabled auto-merge
October 2, 2026 23:37
Address review feedback on the MCP provenance change: - The agent host now declares which VS Code setting controls a server it adds itself, in provider-owned metadata, instead of the UI inferring it from the server's name. Copilot declares the GitHub MCP server setting only for the runtime's own GitHub server, so a server with the same name from another host, a plugin or user configuration gets no settings link it cannot control. - An open MCP details page now refreshes when the agent host reports new metadata, so a restored server picks up its display name, provenance, settings link and host configuration once the runtime inventory arrives, without reopening it. Fixes microsoft#338719 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Alex Ross (alexr00)
approved these changes
Oct 3, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #338719
The MCP server details in Chat Customizations didn't say where built-in servers come from. The header showed a made-up
mcp.json, and Configuration only said "No definition is available". This PR uses what the agent runtime already reports about each server (its source, display name and contributing plugin) to show the real origin, and explains when there's nothing to show.What you'll see
github-mcp-server(built into Copilot CLI)mcp.jsonlabel; "No definition is available"chat.agentHost.githubMcpServer.enabledgithub-copilot-connector-…), made-upmcp.json...menu gains Show Extensionmcp.jsonlabelmcp.jsonor another app's config file...menuHow it works
displayNameandsourcePlugin(fromsession.mcp.list) as optional, namespaced_metaon MCP server customizations. Other agent hosts can leave them out._meta, the setting that controls a server it adds itself. The UI only offers Open Settings when the host declares one.getMcpServers()also exposes the definition the agent host's own configuration holds for a server, so servers added there show their definition.Notes for reviewers
github-mcp-serverthatchat.agentHost.githubMcpServer.enabledcan't control, so Copilot declares the setting only for the runtime's own GitHub server.How to test
github-mcp-server. The header says "Built-in: Copilot", Configuration explains why there's no definition, and Open Settings openschat.agentHost.githubMcpServer.enabled....→ Show Extension opens it..vscode/mcp.jsonstill shows its file link and Edit Configuration.The
EmbeddedMcpDetailBuiltinAgentandEmbeddedMcpDetailBuiltinExtensioncomponent fixtures show the new details states.Validation (run locally on top of current
main):npx tsc --project ./src/tsconfig.json --noEmit --skipLibCheck: no new errors. My locally installed dependencies are older thanmain's lockfile, which causes 14 errors incopilotAgent.tsandlocalTranscriptionService.ts; the same 14 appear on unmodifiedmain.npx eslint --max-warnings 0on the changed files: passed.node build/stylelint.ts src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css: passed.node build/checker/layersChecker.ts: passed.