Skip to content

Commit 9d176b7

Browse files
stephentoubCopilot
andcommitted
Enable third-party MCP in e2e replay proxy for 1.0.64-1 runtime
The bundled CLI 1.0.64-1 gates third-party MCP servers behind the copilot user's is_mcp_enabled flag: a null/missing value disables them. The e2e harnesses register a per-token copilot user that omitted is_mcp_enabled, so the new runtime skipped non-default MCP servers (e.g. meta-echo). That made the model report the MCP tool as nonexistent, so the next /chat/completions request no longer matched a recorded snapshot and the replay proxy returned HTTP 500 (surfacing as CAPIError: 500 Proxy error), failing every MCP e2e test that exercises a third-party server. Default is_mcp_enabled to true when serving /copilot_internal/user for a registered token (explicit values still win), mirroring the connect-proxy mock. One shared change fixes the e2e harness for all language SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f1242cf commit 9d176b7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/harness/replayingCapiProxy.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,15 @@ export class ReplayingCapiProxy extends CapturingHttpProxy {
283283
? rawAuthHeader
284284
: undefined;
285285
const token = authHeader?.replace("Bearer ", "");
286-
const userResponse = token
286+
const registered = token
287287
? this.copilotUserByToken.get(token)
288288
: undefined;
289+
// The CLI gates third-party MCP servers behind the copilot user's
290+
// `is_mcp_enabled` flag (a null/missing value disables them). Default
291+
// it to true so e2e MCP servers are enabled unless a test opts out.
292+
const userResponse = registered
293+
? ({ is_mcp_enabled: true, ...registered } as CopilotUserResponse)
294+
: undefined;
289295
if (userResponse) {
290296
const headers = {
291297
"content-type": "application/json",
@@ -1504,6 +1510,7 @@ export type ToolResultNormalizer = {
15041510
export type CopilotUserResponse = {
15051511
login: string;
15061512
copilot_plan?: string;
1513+
is_mcp_enabled?: boolean;
15071514
endpoints?: {
15081515
api?: string;
15091516
telemetry?: string;

0 commit comments

Comments
 (0)