Skip to content

Prevent MCP registration from launching the wrong npm package - #315

Open
bensandler-stripe wants to merge 5 commits into
mainfrom
bensandler/fix-link-mcp-package
Open

Prevent MCP registration from launching the wrong npm package#315
bensandler-stripe wants to merge 5 commits into
mainfrom
bensandler/fix-link-mcp-package

Conversation

@bensandler-stripe

@bensandler-stripe bensandler-stripe commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
  • Fix MCP registration to use the versioned @stripe/link-cli package instead of the unrelated unscoped link-cli package.
  • Preserve the detected npm, pnpm, or Bun package runner.
  • Existing registrations are not updated automatically; rerun link-cli mcp add after upgrading.

- Incur confuses the link-cli executable with its npm package, generating npx link-cli --mcp instead of @stripe/link-cli and potentially inheriting package references from project metadata.
- Set the default MCP command from the trusted package name and version embedded at build time.
- Add an isolated registration regression test and repair guidance for existing MCP registrations.
- Leave the separate unsafe skills suggestion path for the upstream Incur follow-up.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@bensandler-stripe
bensandler-stripe marked this pull request as ready for review September 10, 2026 21:46
@bensandler-stripe
bensandler-stripe requested a review from a team as a code owner September 10, 2026 21:46
bensandler-stripe and others added 4 commits September 10, 2026 22:28
- Hardcoded npx broke MCP registration in Bun- and pnpm-only environments.
- Mirror Incur runner precedence while retaining the scoped, versioned Link CLI package.
- Replace the subprocess regression test with compact npm, pnpm, Bun, and precedence coverage.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
- Use a local resolved hints variable to avoid reassigning the function parameter.
- Preserve existing package-runner detection behavior and precedence.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
- Register Node standalone builds with their current executable path.
- Keep the detected package runner and pinned scoped package for managed installs.
- Cover standalone registration and document the corrected behavior.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
- Detect standalone execution by comparing the resolved entrypoint and executable paths.
- Avoid the node:sea import that the regular CLI bundle rewrites incorrectly.
- Preserve absolute executable registration with the focused standalone regression.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
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