From 95da4b4221b272f91c10dc50f1177e4d36514037 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Jul 2026 05:21:06 +0000 Subject: [PATCH 1/2] Initial plan From 126407c6c73dcd6cc5f28812fef39c9d13e3ed8d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Jul 2026 05:32:40 +0000 Subject: [PATCH 2/2] fix: strip Copilot-only tools from Claude MCP config Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/js/convert_gateway_config_adapters.test.cjs | 5 +++-- actions/setup/js/convert_gateway_config_claude.cjs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/actions/setup/js/convert_gateway_config_adapters.test.cjs b/actions/setup/js/convert_gateway_config_adapters.test.cjs index 9b53584bcfd..2571a32d10b 100644 --- a/actions/setup/js/convert_gateway_config_adapters.test.cjs +++ b/actions/setup/js/convert_gateway_config_adapters.test.cjs @@ -59,13 +59,14 @@ describe("convert gateway config shared pipeline", () => { describe("convert gateway config adapters", () => { const urlPrefix = "http://host.docker.internal:80"; - it("claude adapter enforces type=http and rewrites url", () => { - const converted = transformClaudeEntry({ type: "ignored", url: "http://old/mcp/github", headers: { Authorization: "token" } }, urlPrefix); + it("claude adapter enforces type=http, rewrites url, and drops Copilot-only tools", () => { + const converted = transformClaudeEntry({ type: "ignored", url: "http://old/mcp/github", headers: { Authorization: "token" }, tools: ["read"] }, urlPrefix); expect(converted).toEqual({ type: "http", url: "http://host.docker.internal:80/mcp/github", headers: { Authorization: "token" }, }); + expect(converted.tools).toBeUndefined(); }); it("copilot adapter adds tools wildcard only when missing", () => { diff --git a/actions/setup/js/convert_gateway_config_claude.cjs b/actions/setup/js/convert_gateway_config_claude.cjs index c0dbabb1963..4662110179e 100644 --- a/actions/setup/js/convert_gateway_config_claude.cjs +++ b/actions/setup/js/convert_gateway_config_claude.cjs @@ -36,6 +36,9 @@ function transformClaudeEntry(entry, urlPrefix) { return normalizeGatewayEntry(entry, urlPrefix, transformed => { // Claude uses "type": "http" for HTTP-based MCP servers transformed.type = "http"; + // The MCP gateway may include a "tools" field for Copilot, but Claude's + // MCP config format does not support that field. + delete transformed.tools; }); }