Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

test(mcp): isolate private-record fixtures from host proxies

leonongoing59f79c92a6e7
diff --git a/server/mcp-gate-config.test.ts b/server/mcp-gate-config.test.ts
index 25ab1614d5..0ca524d885 100644
--- a/server/mcp-gate-config.test.ts
+++ b/server/mcp-gate-config.test.ts
@@ -55,7 +55,7 @@ describe("tool directory configuration", () => {
it("keeps a shared environment's settings in one private record", () => {
const record = `OMB_REMOTE_MCP_CONFIG_${"0".repeat(64)}`;
- const proxy = mcpStdioServer(remote, { nodeEnv: { ELECTRON_RUN_AS_NODE: "1" }, directory: { name: "whop" }, configEnvName: record })!;
+ const proxy = mcpStdioServer(remote, { sourceEnv: {}, nodeEnv: { ELECTRON_RUN_AS_NODE: "1" }, directory: { name: "whop" }, configEnvName: record })!;
expect(proxy.args!.slice(1)).toEqual(["--config-env", record]);
expect(Object.keys(proxy.env!).sort()).toEqual(["ELECTRON_RUN_AS_NODE", record]);
const settings = JSON.parse(proxy.env![record]);
diff --git a/server/mcp-remote-proxy.test.ts b/server/mcp-remote-proxy.test.ts
index aa8c12c862..6f02d2a06e 100644
--- a/server/mcp-remote-proxy.test.ts
+++ b/server/mcp-remote-proxy.test.ts
@@ -499,7 +499,7 @@ describe("remote MCP tool directory", () => {
it("reads its settings from a private record when mounts share one environment", async () => {
fake = await startFakeHttpMcp({ tools: catalog });
const record = `OMB_REMOTE_MCP_CONFIG_${"a".repeat(64)}`;
- const descriptor = mcpStdioServer(spec(fake.url), { directory: { name: "whop" }, configEnvName: record })!;
+ const descriptor = mcpStdioServer(spec(fake.url), { sourceEnv: {}, directory: { name: "whop" }, configEnvName: record })!;
expect(descriptor.args!.slice(1)).toEqual(["--config-env", record]);
expect(Object.keys(descriptor.env!)).toEqual([record]);
expect(descriptor.args!.join(" ")).not.toContain("directory-fixture-token");