mcp: register with qwen too, and stop calling a re-install a failure - #427
Merged
Conversation
`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>
ThreatCrush Security Scan0 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**: 6Not introduced by this pull request. The full set is in the Security tab.
…and 35 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mcp installalready fanned out to Claude Code, but a re-run reported it asclaude ✗ 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 wholemcp addsurface (-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
mcpsubcommand, 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 registeredin grey, and no longer makes the command exit 1.runCmdgrew an opt-incapturethat 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:
After:
Exit code went 1 → 0.
qwen mcp listconfirmsrssamplifier … Connected.mcp install <url> --dry-runnow 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