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
4 changes: 1 addition & 3 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -690,11 +689,10 @@ export const setupMcpServer = async (): Promise<void> => {
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);
Expand Down
1 change: 0 additions & 1 deletion src/utils/tool-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export function getClaudeDesktopConfigPath(): string {
}

export type IterableMcpConfig = {
type: "stdio";
command: string;
args: string[];
env: Record<string, string>;
Expand Down
12 changes: 2 additions & 10 deletions tests/unit/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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
Expand Down Expand Up @@ -126,7 +124,6 @@ describe("MCP Server Setup Configuration", () => {
mcpServers: {
...existingConfig.mcpServers,
iterable: {
type: "stdio" as const,
command: "node",
args: [],
env: {},
Expand Down Expand Up @@ -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" },
Expand All @@ -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: {
Expand All @@ -185,15 +180,13 @@ 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");
});

it("should escape special characters in JSON", () => {
const configWithSpecialChars = {
type: "stdio" as const,
command: "node",
args: ["/path/to/file"],
env: {
Expand All @@ -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: {
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion tests/unit/tool-config-secure-write.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down