You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: delegate per-client MCP config writing to add-mcp #14
Outcome (2026-11-04): add-mcp evaluated, not adopted. It matched our output only for Cursor, VS Code and OpenCode. It was worse or missing for Codex, Hermes, Claude Code and OpenClaw, and its correctness gaps (overwrites a foreign box, writes into invalid JSON, no backup, non-atomic) would need our wrappers anyway. Spike, diff table and the decision: #15 (comment) . We keep our own writers and will revisit if upstream fixes those issues. What's worth keeping from the spike (Gemini CLI on our own writer, clear permission errors, the Codex hint) moved to a new issue, linked below.
Rationale:npx @simular-ai/box connect carries its own writer for every client's MCP config (paths, keys, entry shape, Windows paths). Each new client is another special path we maintain. add-mcp (Apache-2.0, npm add-mcp, library API upsertServer / removeServer / agents) already maintains that per-client knowledge for 25 clients, including Gemini CLI, Windsurf, Zed, Goose and Copilot CLI. Per our build-from-existing-solutions rule, box's CLI should delegate config writing to it and keep only what is specific to box.
What:
Spike: run add-mcp (pinned) against the fixtures and clients we support today, and record per-client differences from our current writers.
Add cli/src/config-writer.js, our own interface around add-mcp (exact version pin), and move the clients whose add-mcp output is equivalent or better onto it.
Keep in our layer what add-mcp does not cover or covers worse: the Claude Code plugin install, personal-key mode (.env 0600, gateway restart), the "only replace a box entry whose URL is ours" guard, backups, the box-control migration, doctor, OpenClaw, clear EACCES/EPERM errors (with the Codex desktop Settings steps), and next hints that do not assume codex is on PATH.
Expose newly covered clients only where the real-client install matrix verifies them.
Check add-mcp's dependency tree and install scripts.
Done when: a PR lands with the per-client diff table, unit tests updated, and the real-client install matrix green on Linux, macOS and Windows (or a written reason for each job that cannot run).
Activity
cli: back up before add-mcp writes and restore if it fails part-way
chenchenSimular commentedon Nov 4, 2026
add-mcp was evaluated and not adopted (see the note at the top of the description and #15 (comment)). The parts worth keeping continue in #16.