Skip to content

feat(mcp): runcrate mcp install - #6

Merged
heydryft merged 1 commit into
mainfrom
feat/mcp-install
Oct 21, 2026
Merged

heydryft merged 1 commit into
mainfrom
feat/mcp-install

Conversation

@heydryft

Copy link
Copy Markdown
Member

Adds runcrate mcp install and runcrate mcp url, so a person connects Runcrate's remote MCP server (https://mcp.runcrate.ai/mcp, OAuth in the browser, no key) to their AI clients without editing JSON.

runcrate mcp install [--client cursor|claude|vscode|codex|windsurf|gemini|all] [--dry-run] [--force]
runcrate mcp url
  • --client all (default) sets up every client found on this machine. A client named explicitly is set up even if not found. Nothing found: prints the URL and https://runcrate.ai/docs/mcp/setup, exit 0.
  • Claude Code: claude mcp add --transport http --scope user runcrate URL (skipped when claude mcp get runcrate already shows our URL); no binary: prints the one-liner.
  • Codex: codex mcp add runcrate --url URL with stdio inherited; no binary: appends [mcp_servers.runcrate] to ~/.codex/config.toml once. An existing table is never rewritten. Tells the user about codex mcp login runcrate.
  • VS Code: code --add-mcp (not on Windows, where code.cmd mangles the JSON argument), else user mcp.json servers.runcrate.
  • Gemini CLI: gemini mcp add --transport http --scope user, falling back to ~/.gemini/settings.json if it fails.
  • Cursor ~/.cursor/mcp.json; Windsurf ~/.codeium/windsurf/mcp_config.json and Devin Desktop ~/.config/devin/mcp_config.json (%APPDATA%\devin on Windows), whichever exist.

Safe JSON merge: other keys kept (numbers exactly as written), <file>.bak-<YYYYMMDD-HHMMSS> backup, temp file plus rename in the same dir, original mode kept (0600 for new files, dirs 0700), 2-space indent. A file that is not plain JSON (comments) is left byte-identical and the snippet is printed. A runcrate entry that points elsewhere is kept unless --force. --dry-run writes and runs nothing.

Tests (internal/commands/mcp_test.go) run against a temp home: merge keeps other servers and backs up, second run writes nothing, differing entry needs --force, invalid JSON untouched, Codex TOML appended once and never rewritten, all only touches detected clients, dry run creates nothing, Windsurf and Devin dirs.

…CP server

Adds runcrate mcp install [--client ...] [--dry-run] [--force] and runcrate mcp url. Sets up Cursor, Claude Code, VS Code, Codex, Windsurf (and Devin Desktop) and Gemini CLI, using each client's own mcp add command where it has one and a safe merge of its config file otherwise: other servers kept, original backed up, unparseable files never written, differing entries kept unless --force.
@heydryft
heydryft merged commit 5859409 into main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant