feat: enhance MCP gateway handling to support multiple servers and improve error logging#4470
Merged
DonJayamanne merged 5 commits intomainfrom Mar 18, 2026
Merged
feat: enhance MCP gateway handling to support multiple servers and improve error logging#4470DonJayamanne merged 5 commits intomainfrom
DonJayamanne merged 5 commits intomainfrom
Conversation
…prove error logging
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MCP gateway surface to support multiple concurrently-exposed MCP servers (each with its own endpoint) and wires that into Copilot CLI/Claude session flows, along with some related logging/config changes.
Changes:
- Update MCP gateway API usage from single
addresstoservers[](+onDidChangeServers) and adjust MCP service wrapper/tests accordingly. - Update Copilot CLI and Claude Code session to generate per-server MCP configs from the gateway’s
serverslist. - Flip the default for CLI MCP forwarding to enabled.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/mcp/vscode/test/mcpService.spec.ts | Updates mocks/assertions to validate servers instead of address. |
| src/platform/mcp/vscode/mcpServiceImpl.ts | Wraps McpGateway with servers/onDidChangeServers passthrough. |
| src/platform/configuration/common/configurationService.ts | Changes default for chat.cli.mcp.enabled migration setting to true. |
| src/extension/vscode.proposed.mcpServerDefinitions.d.ts | Redefines McpGateway to expose multiple McpGatewayServers and change event. |
| src/extension/chatSessions/copilotcli/node/mcpHandler.ts | Builds CLI MCP config entries per gateway server. |
| src/extension/chatSessions/claude/node/claudeCodeAgent.ts | Builds Claude SDK mcpServers entries per gateway server; adds try/catch logging. |
| package.json | Sets github.copilot.chat.cli.mcp.enabled default to true. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bpasero
approved these changes
Mar 18, 2026
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.
No description provided.