Skip to content

mcp wrap: ship chisle-command-filters.js with the proxy, launch it with the absolute node path - #65

Open
datamonsterr wants to merge 1 commit into
JayPokale:mainfrom
datamonsterr:fix/64-mcp-proxy-sources
Open

datamonsterr wants to merge 1 commit into
JayPokale:mainfrom
datamonsterr:fix/64-mcp-proxy-sources

Conversation

@datamonsterr

Copy link
Copy Markdown

npx chisle mcp wrap installed a proxy that crashed on start, so every wrapped stdio MCP server failed to launch.

  • bin/lib/mcp.js: add chisle-command-filters.js to PROXY_SOURCES. chisle-compress-output.js requires it, and the proxy folder (<config>/chisle/mcp-proxy/) didn't get a copy.
  • wrapEntry writes process.execPath instead of a bare node (JSON configs and Codex TOML), so hosts started without Node on PATH (a version manager loaded only in interactive shells) can still launch the proxy. isWrapped only looks at args, so entries wrapped with node by older versions are still recognised and unwrap exactly.
  • CHANGELOG entry under Unreleased → Fixed. Re-running npx chisle mcp wrap refreshes an installed proxy; servers already wrapped keep node until mcp unwrap + mcp wrap.

Fixes #64

Testing

  • npm test: 279/279 pass. npm run check:rules, check:chart, check:samples clean.
  • New test: after mcp wrap, every relative require in every file of the installed proxy folder resolves inside that folder, and the proxy loads from there. It fails on main with Cannot find module, together with the two updated process.execPath assertions (3 failures on main, 0 with this change).
  • New test: an entry wrapped with command: "node" by an older version is reported as wrapped, left alone by wrap, and restored exactly by unwrap.
  • Manual: mcp wrap --only cursor in a temp home, then launched the wrapped command with PATH=/usr/bin:/bin (no Node) and sent initialize; the proxy started and returned the server's response.

🤖 Generated with Claude Code

…th the absolute node path

The installed proxy in <config>/chisle/mcp-proxy/ lacked
chisle-command-filters.js, which chisle-compress-output.js requires, so
every wrapped stdio server crashed at start with "Cannot find module
'./chisle-command-filters'". Add it to PROXY_SOURCES.

wrapEntry wrote command "node"; hosts started without node on PATH (a
version manager loaded only in interactive shells) could not launch the
proxy. Write process.execPath instead, for JSON configs and Codex TOML.
isWrapped only looks at args, so entries wrapped by older versions are
still recognised and unwrap exactly.

Tests: the installed proxy folder is self-contained (every relative
require resolves inside it and the proxy loads from there), and an entry
wrapped with "node" is still seen as wrapped and unwraps exactly.

Fixes JayPokale#64

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 13:16
@vercel

vercel Bot commented Dec 1, 2026

Copy link
Copy Markdown

@datamonsterr is attempting to deploy a commit to the jaypokale35gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

mcp wrap: proxy crashes with "Cannot find module './chisle-command-filters'"

2 participants