@mergesafe-io/connect
v0.2.0
Published
One-command MergeSafe MCP setup for Claude Desktop, Cursor, Windsurf, VS Code and opencode.
Readme
@mergesafe-io/connect
One command to connect your AI client to the MergeSafe MCP server — no JSON editing.
npx @mergesafe-io/connect claude-desktop --key msk_your_api_keyThat's it. Restart the client and the mergesafe tools are available.
What it does
- Finds the right MCP config file for your client and OS
- Backs up the existing file next to it (
*.bak-<timestamp>) - Merges in the
mergesafeserver entry — every other setting and server is preserved - Refuses to touch a file it can't parse (broken JSON aborts with a clear message)
No dependencies, no telemetry, Node 18+.
Supported clients
| Client | Config written |
|---|---|
| claude-desktop | claude_desktop_config.json (global, per-OS path) — bridges through mcp-remote |
| cursor | ~/.cursor/mcp.json (or ./.cursor/mcp.json with --project) |
| cursor-local | ./.cursor/mcp.json — local stdio server (needs mergesafe-mcp on PATH) |
| windsurf | ~/.codeium/windsurf/mcp_config.json |
| vscode | ./.vscode/mcp.json (current project) |
| opencode | ./opencode.json (current project) |
| cline | cline_mcp_settings.json (stock VS Code global storage, per-OS path) |
| roo-code | ./.roo/mcp.json (current project) |
| continue | ./.continue/mcpServers/mergesafe.yaml (dedicated file, whole-file write) |
Not covered: Zed (its settings.json is JSONC with comments — a rewrite would
destroy them; configure manually). For Claude Code CLI and Gemini CLI, use their
built-in commands instead:
claude mcp add --transport http mergesafe https://mcp.mergesafe.io/mcp --header "Authorization: Bearer msk_…"
Options
| Flag | Effect |
|---|---|
| --key <msk_…> | Your MergeSafe API key (from app.mergesafe.io → Settings). Prompted if omitted. |
| --project | Write the project-local config instead of the global one (cursor) |
| --dry-run | Print the target path and resulting file without writing |
| --help | Usage |
Development
npm test # node --test, zero deps
node bin/mergesafe-connect.js cursor --key msk_x --dry-runPublishing
The @mergesafe npm scope must exist (create the org on npmjs.com), then:
npm publish --access public