Skip to content

Parse headers for native MCP discovery server launch configuration#320192

Draft
dmitrivMS wants to merge 1 commit into
mainfrom
dev/dmitriv/mcp-parse-http-headers
Draft

Parse headers for native MCP discovery server launch configuration#320192
dmitrivMS wants to merge 1 commit into
mainfrom
dev/dmitriv/mcp-parse-http-headers

Conversation

@dmitrivMS
Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings June 5, 2026 22:36
@dmitrivMS dmitrivMS self-assigned this Jun 5, 2026
@dmitrivMS dmitrivMS enabled auto-merge (squash) June 5, 2026 22:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes workspace .mcp.json HTTP server configuration by ensuring static headers are preserved when converting native MCP discovery configs into McpServerLaunch definitions, aligning behavior with .vscode/mcp.json.

Changes:

  • Forward headers from parsed mcpServers HTTP entries into the generated HTTP launch definition.
  • Add a unit test validating headers are forwarded (and omitted headers become an empty list).
Show a summary per file
File Description
src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAdapters.ts Parses and forwards HTTP headers into the generated McpServerLaunch for native/workspace .mcp.json discovery.
src/vs/workbench/contrib/mcp/test/common/nativeMcpDiscoveryAdapters.test.ts Adds coverage ensuring headers are forwarded for HTTP servers and default to [] when not specified.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines 27 to +31
command: string;
args?: string[];
env?: Record<string, string>;
url?: string;
headers?: Record<string, string>;
@dmitrivMS dmitrivMS disabled auto-merge June 5, 2026 22:44
@dmitrivMS dmitrivMS marked this pull request as draft June 5, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.mcp.json ignores headers field for HTTP MCP servers

3 participants