Skip to content
Closed
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
3 changes: 2 additions & 1 deletion packages/gittensory-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ gittensory-mcp init-client --print codex
gittensory-mcp init-client --print claude
gittensory-mcp init-client --print cursor
gittensory-mcp init-client --print vscode
gittensory-mcp init-client --print windsurf
gittensory-mcp init-client --print codex --agent-profile miner-planner
gittensory-mcp completion bash
gittensory-mcp completion zsh
Expand Down Expand Up @@ -158,7 +159,7 @@ The same capabilities are exposed to MCP clients as:

### Client config

`init-client --print <host>` prints the stdio MCP config for a host: `codex` (TOML), `claude`, `cursor`, and `mcp` (the shared `mcpServers` JSON shape), and `vscode` (VS Code's native `servers` map with `"type": "stdio"`, for `.vscode/mcp.json`). It prints config only; it never edits client files.
`init-client --print <host>` prints the stdio MCP config for a host: `codex` (TOML), `claude`, `cursor`, `mcp`, and `windsurf` (the shared `mcpServers` JSON shape; Windsurf reads `~/.codeium/windsurf/mcp_config.json`), and `vscode` (VS Code's native `servers` map with `"type": "stdio"`, for `.vscode/mcp.json`). It prints config only; it never edits client files.

### Agent profiles

Expand Down
10 changes: 6 additions & 4 deletions packages/gittensory-mcp/bin/gittensory-mcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ function printHelp() {
gittensory-mcp changelog [--json]
gittensory-mcp doctor [--profile name] [--cwd path] [--exit-code] [--json]
gittensory-mcp cache status|list|clear [--json]
gittensory-mcp init-client --print codex|claude|cursor|mcp|vscode [--agent-profile miner-planner|maintainer-triage|repo-owner-intake] [--json]
gittensory-mcp init-client --print codex|claude|cursor|mcp|vscode|windsurf [--agent-profile miner-planner|maintainer-triage|repo-owner-intake] [--json]
gittensory-mcp decision-pack --login <github-login> [--json]
gittensory-mcp repo-decision --login <github-login> --repo owner/repo [--json]
gittensory-mcp analyze-branch --login <github-login> [--repo owner/repo] [--base origin/main] [--branch-eligibility eligible|ineligible|unknown] [--pending-merged-prs 3] [--expected-open-prs 0] [--projected-credibility 0.8] [--scenario-note "..."] [--validation "passed|npm test|summary"] [--json]
Expand Down Expand Up @@ -2362,7 +2362,7 @@ function shellArg(value) {

function initClient(options) {
const client = String(options.print ?? options.client ?? "").toLowerCase();
if (!client) throw new Error("Pass --print codex, --print claude, --print cursor, --print mcp, or --print vscode.");
if (!client) throw new Error("Pass --print codex, --print claude, --print cursor, --print mcp, --print vscode, or --print windsurf.");
const command = options.command ?? "gittensory-mcp";
const snippet = clientSnippet(client, command);
const agentProfile = resolveAgentProfile(options.agentProfile);
Expand Down Expand Up @@ -2754,7 +2754,9 @@ function redactPrivateValidationMetrics(text) {

function clientSnippet(client, command) {
if (client === "codex") return `[mcp_servers.gittensory]\ncommand = ${JSON.stringify(command)}\nargs = ["--stdio"]`;
if (client === "claude" || client === "cursor" || client === "mcp") {
// claude/cursor/mcp and Windsurf all consume the shared `mcpServers` JSON shape (Windsurf reads
// ~/.codeium/windsurf/mcp_config.json), so they share one snippet.
if (client === "claude" || client === "cursor" || client === "mcp" || client === "windsurf") {
return JSON.stringify(
{
mcpServers: {
Expand Down Expand Up @@ -2785,7 +2787,7 @@ function clientSnippet(client, command) {
2,
);
}
throw new Error(`Unsupported client: ${client}. Use codex, claude, cursor, mcp, or vscode.`);
throw new Error(`Unsupported client: ${client}. Use codex, claude, cursor, mcp, vscode, or windsurf.`);
}

async function getDecisionPackWithCache(login) {
Expand Down
4 changes: 4 additions & 0 deletions test/unit/mcp-cli-basics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ describe("gittensory-mcp CLI — basics", () => {
const generic = JSON.parse(run(["init-client", "--print", "mcp", "--json"])) as { snippet: string };
expect(generic.snippet).toBe(claude.snippet);

// Windsurf consumes the same shared `mcpServers` JSON shape (~/.codeium/windsurf/mcp_config.json).
const windsurf = JSON.parse(run(["init-client", "--print", "windsurf", "--json"])) as { snippet: string };
expect(windsurf.snippet).toBe(claude.snippet);

const vscode = JSON.parse(run(["init-client", "--print", "vscode", "--json"])) as { snippet: string };
// VS Code uses a `servers` map with an explicit transport type, not the `mcpServers` shape.
expect(vscode.snippet).toContain('"servers"');
Expand Down
Loading