Skip to content

MCP launcher: dist/mcp.js only hands over to the app's own server (#237) - #256

Merged
iamnbutler merged 3 commits into
mainfrom
mcp-shim
Nov 14, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
mcp-shim

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Step 4 of the plan in #237 (#237 (comment)). The Node MCP server is gone.

Launcher

  • desktop-tools-mcp from npm (dist/mcp.js) finds the app's own Swift server, either beside the client the app links in its state folder or beside the client --client names. It passes --socket and --name on and hands stdin and stdout over, so no MCP traffic passes through Node. --wire 2 is accepted and ignored; --wire 1 is refused.
  • If there is no server to run, it exits with a message:
    • no linked client: install the app;
    • Desktop Tools from before 0.17.0: names its version and the release to install;
    • an embedding app that ships no desktop-tools-mcp: names the app and says to bundle desktop-tools-mcp from the same native build beside its client, signed with the client's identifier, linking docs/embed.md.
  • Breaking for the Ace Canary --client setup that docs/mcp.md showed: it used to run the Node server through Ace's client. Agreed with the user, Ace will ship desktop-tools-mcp beside its client.

Checks and scripts

  • test/version-skew.test.mjs tested the Node server, so it is replaced by test/mcp-launcher.test.mjs (6 tests, using fake app bundles; they run on any OS). They cover:
    • the hand-over, including the exit status;
    • --client, with --socket and --name passed on;
    • an old app;
    • an embedder without a server;
    • no linked client;
    • --wire 1.
  • native2/scripts/parity.mjs --baseline, both bench scripts and scripts/live-check.mjs now default to the app's own server instead of node dist/mcp.js. A command that names an existing file runs whole, since the app's path has spaces.

Docs

  • docs/mcp.md leads with the app path. It gains an "Another app's grants" section (bundle desktop-tools-mcp, see docs/embed.md) and an "npx setups" section.
  • README, native2/README.md, docs/live-checks.md and the CHANGELOG are updated.
  • Lane notes:
    • the app must keep linking <state>/desktop-client into its bundle, which old pinned launchers rely on;
    • the client's --serve mode must keep working, since createDesktop and pinned v0.17–v0.20 launchers with options use it.

Checks run: npm run check, npm test (26 pass), node scripts/contract.mjs --check. No live check: the dev app has no grants.

🤖 Generated with Claude Code

iamnbutler and others added 3 commits November 14, 2026 15:03
The Node MCP server is gone. desktop-tools-mcp from npm finds the server beside the client the app links in its
state folder, or beside the client --client names, passes --socket and --name on, and hands stdin and stdout
over; --wire 2 is accepted and ignored. With no server to run, it exits with a message: no linked client, a
Desktop Tools from before 0.17.0 (named with its version and the release to install), or an embedder's app that
ships no desktop-tools-mcp. version-skew.test.mjs, whose subject was the Node server, gives way to launcher tests
that run anywhere. parity, both bench scripts and live-check default to the app's own server; a command that
names an existing file runs whole, since the app's path has spaces. docs/mcp.md leads with the app path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An embedding app's --client without a server of its own now says to bundle desktop-tools-mcp from the same
native build beside its client, linking docs/embed.md, instead of pointing at Desktop Tools.app. docs/mcp.md
gets a section on serving another app's grants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iamnbutler
iamnbutler merged commit a20519e into main Nov 14, 2026
2 checks passed
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