Skip to content

mcp: register with qwen too, and stop calling a re-install a failure - #427

Merged
ralyodio merged 1 commit into
mainfrom
worktree-mcp-fanout-qwen
Aug 17, 2026
Merged

mcp: register with qwen too, and stop calling a re-install a failure#427
ralyodio merged 1 commit into
mainfrom
worktree-mcp-fanout-qwen

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

mcp install already fanned out to Claude Code, but a re-run reported it as claude ✗ failed (code 1) — Claude Code exits 1 with "already exists in user config" — while opencode printed a green box for the same no-op. Read from a box where the server was already registered, that summary says moshcode cannot register with Claude Code, which is the wrong conclusion.

Changes

qwen joins MCP_ENGINES. Qwen Code is a Gemini CLI fork and kept the whole mcp add surface (-s/-t/-e/-H, "URL or command" positional), verified against its own --help, so it shares gemini's argv builder rather than getting a copy.

Checked and deliberately left alone: kimi still has no mcp subcommand, openagents exposes an MCP server rather than registering one, deepseek-code exits silently, aider has none.

A re-install is no longer a failure. An engine that says the server is already there reports already registered in grey, and no longer makes the command exit 1. runCmd grew an opt-in capture that tees the child's output instead of inheriting it, so the classification reads the engine's own words; every other caller is untouched. A failure for any other reason is still a failure.

An unknown flag after a remote URL was swallowed. It landed in args, which every remote builder discards. mcp install <url> --dry-run — a flag mcp does not have — therefore wrote to five engines' configs and said nothing. It is now an error, before anything runs.

Verification

Before, on a box that already had the server:

   claude    ✗ failed (code 1)
   codex     ✓ added
   opencode  ✓ added

After:

   claude    already registered
   gemini    not installed — /install gemini
   qwen      ✓ added
   codex     ✓ added
   opencode  ✓ added
   privacycode ✓ added

Exit code went 1 → 0. qwen mcp list confirms rssamplifier … Connected. mcp install <url> --dry-run now exits 1 with an error and writes nothing.

Full suite: 2028 pass, 0 fail (8 new tests for qwen's argv, the already-registered classification, and the swallowed-argument guard).

🤖 Generated with Claude Code

`mcp install` already fanned out to Claude Code, but a re-run reported it
as `claude ✗ failed (code 1)` — Claude Code exits 1 with "already exists in
user config" — while opencode printed a green box for the same no-op. Read
from a box where the server was already registered, that summary says
moshcode cannot register with Claude Code, which is the wrong conclusion.

- qwen joins MCP_ENGINES. Qwen Code is a Gemini CLI fork and kept the whole
  `mcp add` surface (-s/-t/-e/-H, "URL or command" positional), verified
  against its own --help, so it shares gemini's argv builder rather than
  getting a copy. Checked and left alone: kimi still has no `mcp`
  subcommand, openagents exposes an MCP server rather than registering one,
  deepseek-code exits silently, aider has none.

- An engine that says the server is already there now reports `already
  registered` in grey instead of a red failure, and no longer makes the
  command exit 1. runCmd grew an opt-in `capture` that tees the child's
  output instead of inheriting it, so the classification reads the engine's
  own words; every other caller is untouched.

- An unknown flag after a remote URL was swallowed: it landed in `args`,
  which every remote builder discards. `mcp install <url> --dry-run` — a
  flag mcp does not have — therefore wrote to five engines' configs and
  said nothing. It is now an error, before anything runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

0 finding(s) in the 6 file(s) this pull request changes.

Nothing in the files this pull request changes.

55 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 5 | **MEDIUM**: 44 | **LOW**: 6

Not introduced by this pull request. The full set is in the Security tab.

Severity Rule Location
HIGH js-ssrf-outbound-request apps/pwa/public/sw.js:45
HIGH tls-verification-disabled apps/pwa/src/lib/moshpit-gateway.mjs:299
HIGH sh-remote-script-execution install.sh:79
HIGH sh-remote-script-execution install.sh:83
HIGH tls-verification-disabled src/dns.mjs:741
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:68
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:82
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:108
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:295
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:299
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:344
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:568
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:749
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:751
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:810
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:856
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:926
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1029
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1052
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1074

…and 35 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit e4b66e4 into main Aug 17, 2026
4 checks passed
@ralyodio ralyodio mentioned this pull request Aug 17, 2026
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