Skip to content

Commit 1cecafb

Browse files
committed
Add Claude Code support to mcp install command
1 parent 450d71b commit 1cecafb

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

cli/bin/postgres-ai.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,16 +1194,17 @@ mcp
11941194
.command("install [client]")
11951195
.description("install MCP server configuration for AI coding tool")
11961196
.action(async (client?: string) => {
1197-
const supportedClients = ["cursor", "claude", "vscode", "windsurf", "codex"];
1197+
const supportedClients = ["cursor", "claude", "claude-code", "vscode", "windsurf", "codex"];
11981198

11991199
// If no client specified, prompt user to choose
12001200
if (!client) {
12011201
console.log("Available AI coding tools:");
12021202
console.log(" 1. Cursor");
12031203
console.log(" 2. Claude Desktop");
1204-
console.log(" 3. VS Code (with Cline/Continue)");
1205-
console.log(" 4. Windsurf");
1206-
console.log(" 5. Codex");
1204+
console.log(" 3. Claude Code");
1205+
console.log(" 4. VS Code (with Cline/Continue)");
1206+
console.log(" 5. Windsurf");
1207+
console.log(" 6. Codex");
12071208
console.log("");
12081209

12091210
const rl = readline.createInterface({
@@ -1212,16 +1213,17 @@ mcp
12121213
});
12131214

12141215
const answer = await new Promise<string>((resolve) => {
1215-
rl.question("Select your AI coding tool (1-5): ", resolve);
1216+
rl.question("Select your AI coding tool (1-6): ", resolve);
12161217
});
12171218
rl.close();
12181219

12191220
const choices: Record<string, string> = {
12201221
"1": "cursor",
12211222
"2": "claude",
1222-
"3": "vscode",
1223-
"4": "windsurf",
1224-
"5": "codex"
1223+
"3": "claude-code",
1224+
"4": "vscode",
1225+
"5": "windsurf",
1226+
"6": "codex"
12251227
};
12261228

12271229
client = choices[answer.trim()];
@@ -1264,6 +1266,11 @@ mcp
12641266
configDir = path.dirname(configPath);
12651267
break;
12661268

1269+
case "claude-code":
1270+
configPath = path.join(homeDir, ".claude-code", "mcp.json");
1271+
configDir = path.dirname(configPath);
1272+
break;
1273+
12671274
case "vscode":
12681275
configPath = path.join(homeDir, ".vscode", "mcp.json");
12691276
configDir = path.dirname(configPath);

0 commit comments

Comments
 (0)