Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/patch-strip-copilot-tools-from-claude-config.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions actions/setup/js/convert_gateway_config_adapters.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
3 changes: 3 additions & 0 deletions actions/setup/js/convert_gateway_config_claude.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}

Expand Down
Loading