Repository navigation
fix(#1089): generated MCP configs launch through the inline node -e launcher; update/sync migrate legacy npx entries - #1208
Merged
Conversation
…SequantMcpConfig and templates/mcp.json; migrate legacy npx entries on sync Entire-Checkpoint: c0d4e51025dc
…acy npx entries Entire-Checkpoint: faef7ff30637
…lare generate-mcp-launch-inline types for typecheck:scripts Entire-Checkpoint: 3553aa641b30
Entire-Checkpoint: 4f6d1d2b9b02
Entire-Checkpoint: 459591e23cfa
This was referenced Sep 29, 2026
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.
Summary
Closes #1089. Every sequant MCP config sequant generates now launches the server through the inline
node -elauncher from #1084, instead of runningnpx -y sequant@<pin> servefrom the project directory. Before, a stalesequantin the project's ownnode_modulescould no longer shadow the pin only for the plugin's own.mcp.json; now that holds everywhere.Covered (all four consumers of
getSequantMcpConfig(), plus the template):createProjectMcpJson: the project.mcp.jsonaddSequantToMcpConfig: Claude Desktop, Cursor, VS Code + Continue.cwd/envhandling is unchanged.buildOpencodeMcpConfig:command: ["node", "-e", SOURCE, spec]getPhaseMcpServersConfig: the sequant server injected into every phase agent. The issue didn't mention it, but it had the same exposure.templates/mcp.json: the official-plugin-directory copy.prepare-marketplace.tsused to reject anything butcommand: "npx", so the validator was enforcing the vulnerable shape. It now requires the inline shape, a concrete pin, andargs[1]matching the generator.Design (owner-approved on the issue, 2026-09-28):
src/lib/mcp-launch-inline.generated.tsis committed and written byscripts/generate-mcp-launch-inline.mjs --write, which also rewrites the root.mcp.jsonandtemplates/mcp.json. The generator refuses a launcher source containingsequant@, so the release stamp regexes can never rewrite it. The root.mcp.jsonis byte-identical.syncSequantMcpPin(theupdate/syncpath) migrates exactly the legacy generated shapenpx ["-y","sequant@X","serve"]and refreshes a stale inline source. Both report reasonmigrated; the CLI prints… (migrated to the inline launcher). Other hand-edited pinned shapes keep the Reconsider sequant@latest pinning in generated MCP config (forces npx reinstall every release; surfaces as -32000) #793 pin refresh; I read "leave alone" as "don't migrate", not "stop re-pinning", because dropping the re-pin would regress Reconsider sequant@latest pinning in generated MCP config (forces npx reinstall every release; surfaces as -32000) #793. Sibling servers and keys are kept.Field check (a copy of matcha-maps' real
.mcp.json)Acceptance criteria
npx vitest run src/lib/mcp-config.test.tspassed, 68 of 68. AC-1 is anit.eachover no clientType and every McpClientType. AC-4 covers: legacy migration keeping another server, legacy already on the current pin, a stale inline source, a local-binary entry byte-identical, and a dry run.npx vitest run scripts/mcp-launch.integration.test.ts. The new case spawnsconfig.command/config.argsexactly as returned, with a realnode_modules/.bin/sequantsymlink and a fakenpx.npx vitest run scripts/plugin-mcp-pin.test.ts. The gate case checks that the generated module andtemplates/mcp.jsonargs[1] equalgenerateInlineLauncherSource().npm run prepare:marketplaceprinted✅ .mcp.json (MCP server config, pinned [email protected])and✅ shipped .mcp.json pinned [email protected], with no tracked files changed. Negative check: annpx-shaped dist.mcp.jsonfails--validate-only.test. Locally, after mergingmain: build exit 0, and the five files above plussync.test.tsandupdate.test.tspassed, 144 of 144.Mutation records
Mutation-verified: AC-2 — reverted getSequantMcpConfig to the npx -y serve form; scripts/mcp-launch.integration.test.ts failed (npx's recorded cwd equalled the project dir); restored.
Mutation-verified: AC-3 — changed one byte inside MCP_LAUNCHER_INLINE_SOURCE in src/lib/mcp-launch-inline.generated.ts; scripts/plugin-mcp-pin.test.ts failed; restored.
Notes for review
docs/features/mcp-server.mdshows the inline form for Claude Code and saysupdate/syncmigrate.docs/troubleshooting.mdpointsCONNECTION_CLOSEDusers atsequant update. The hand-writtennpxexamples for other clients stay, with a note that they are still exposed to shadowing, because nobody writes an 8 KB launcher by hand.--mcp-configargv. That's fine on macOS/Linux; Windows has a 32 KB command-line limit, so keep an eye on it there.sequant updatein each of the 12 local repos will migrate their.mcp.json. Every one of them still has thenpxform today.Test plan
main.mcp.jsontest+canary🤖 Generated with Claude Code