Skip to content

cli: delegate per-client MCP config writing to add-mcp #14

Closed as not planned

Description

@chenchenSimular

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.


Requested by: Chenchen (@chenchenSimular), 2026-11-04

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:

  1. Spike: run add-mcp (pinned) against the fixtures and clients we support today, and record per-client differences from our current writers.
  2. 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.
  3. 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.
  4. Expose newly covered clients only where the real-client install matrix verifies them.
  5. 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

  1. chenchenSimular commented on Nov 4, 2026

    @chenchenSimular
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions