diff --git a/src/install.ts b/src/install.ts index 5c20715..4c92ead 100644 --- a/src/install.ts +++ b/src/install.ts @@ -128,7 +128,6 @@ export const buildMcpConfig = (options: { const packageName = NPX_PACKAGE_NAME + (options.autoUpdate ? "@latest" : ""); return { - type: "stdio" as const, command: isLocal ? nodePath : npxPath, args: isLocal ? [path.resolve(process.cwd(), "dist", "index.js")] @@ -690,11 +689,10 @@ export const setupMcpServer = async (): Promise => { showSection("Manual Configuration", icons.rocket); console.log(); - const { type, command, args, env } = iterableMcpConfig; + const { command, args, env } = iterableMcpConfig; showInfo("Add the MCP server to your AI tool with these settings:"); console.log(); - console.log(chalk.white.bold(" Type:") + ` ${type}`); console.log(chalk.white.bold(" Command:") + ` ${command}`); console.log(chalk.white.bold(" Args:") + ` ${args.join(" ")}`); const envEntries = Object.entries(env); diff --git a/src/utils/tool-config.ts b/src/utils/tool-config.ts index 09501aa..24f988d 100644 --- a/src/utils/tool-config.ts +++ b/src/utils/tool-config.ts @@ -40,7 +40,6 @@ export function getClaudeDesktopConfigPath(): string { } export type IterableMcpConfig = { - type: "stdio"; command: string; args: string[]; env: Record; diff --git a/tests/unit/install.test.ts b/tests/unit/install.test.ts index 208c8b0..25a3432 100644 --- a/tests/unit/install.test.ts +++ b/tests/unit/install.test.ts @@ -58,7 +58,6 @@ describe("MCP Server Setup Configuration", () => { describe("MCP Config JSON Structure", () => { it("should have required stdio config fields", () => { const mcpConfig = { - type: "stdio" as const, command: "/path/to/node", args: ["-y", "@iterable/mcp"], env: { @@ -68,7 +67,6 @@ describe("MCP Server Setup Configuration", () => { }, }; - expect(mcpConfig.type).toBe("stdio"); expect(mcpConfig.command).toBeTruthy(); expect(Array.isArray(mcpConfig.args)).toBe(true); // API keys are stored via KeyManager, not in config env @@ -126,7 +124,6 @@ describe("MCP Server Setup Configuration", () => { mcpServers: { ...existingConfig.mcpServers, iterable: { - type: "stdio" as const, command: "node", args: [], env: {}, @@ -155,7 +152,6 @@ describe("MCP Server Setup Configuration", () => { mcpServers: { ...existingConfig.mcpServers, iterable: { - type: "stdio" as const, command: "new-command", args: ["new-arg"], env: { NEW_KEY: "new-value" }, @@ -173,7 +169,6 @@ describe("MCP Server Setup Configuration", () => { describe("Claude Code JSON Command", () => { it("should generate valid JSON for claude mcp add-json", () => { const mcpConfig = { - type: "stdio" as const, command: "npx", args: ["-y", "@iterable/mcp"], env: { @@ -185,7 +180,6 @@ describe("MCP Server Setup Configuration", () => { const jsonString = JSON.stringify(mcpConfig); const parsed = JSON.parse(jsonString); - expect(parsed.type).toBe("stdio"); expect(parsed.command).toBe("npx"); expect(parsed.args).toEqual(["-y", "@iterable/mcp"]); expect(parsed.env).toHaveProperty("ITERABLE_USER_PII"); @@ -193,7 +187,6 @@ describe("MCP Server Setup Configuration", () => { it("should escape special characters in JSON", () => { const configWithSpecialChars = { - type: "stdio" as const, command: "node", args: ["/path/to/file"], env: { @@ -217,7 +210,6 @@ describe("MCP Server Setup Configuration", () => { describe("Configuration Consistency", () => { it("should generate same config structure for all tools", () => { const baseConfig = { - type: "stdio" as const, command: "npx", args: ["-y", "@iterable/mcp"], env: { @@ -360,7 +352,8 @@ describe("MCP Server Setup Configuration", () => { env: mockEnv, }); - expect(config).toHaveProperty("type", "stdio"); + // Note: type field is omitted for compatibility with Gemini CLI and others + expect(config).not.toHaveProperty("type"); expect(config).toHaveProperty("command"); expect(config).toHaveProperty("args"); expect(config).toHaveProperty("env"); @@ -392,7 +385,6 @@ describe("MCP Server Setup Configuration", () => { // Should be parseable const parsed = JSON.parse(json); - expect(parsed.type).toBe("stdio"); expect(parsed.command).toBe(config.command); expect(parsed.args).toEqual(config.args); expect(parsed.env).toEqual(config.env); diff --git a/tests/unit/tool-config-secure-write.test.ts b/tests/unit/tool-config-secure-write.test.ts index a000435..2593eeb 100644 --- a/tests/unit/tool-config-secure-write.test.ts +++ b/tests/unit/tool-config-secure-write.test.ts @@ -13,7 +13,6 @@ describe("tool-config secure writes", () => { const filePath = path.join(tmpDir, "config.json"); const iterableConfig = { - type: "stdio" as const, command: "node", args: ["/dev/null"], env: { ITERABLE_USER_PII: "false" },