Skip to content

MCP server: --name, defaulting to its own app, so the dev app needs no Node (#237) - #254

Merged
iamnbutler merged 1 commit into
mainfrom
mcp-server-name
Nov 13, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
mcp-server-name

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Step 3 of the plan in #237 (#237 (comment)).

  • The Swift desktop-tools-mcp builds its instructions and tools/list from the Swift declarations for the app it names. That is --name <app>, else the app it ships in (CFBundleName), else "Desktop Tools". --socket was already there. There is no --client: this server can only talk to its own app's host. Step 4's shim maps --client to that app's own server.
  • The dev app's bundled server already found ~/.local/state/desktop-tools-dev from its .dev bundle ID. It now also names Desktop Tools Dev in its instructions and rules, so an agent pointed at Desktop Tools Dev.app/Contents/MacOS/desktop-tools-mcp uses the dev app with no Node.
  • npm run dev-app now prints that claude mcp add desktop-dev -- "…/desktop-tools-mcp" line, adding -e DESKTOP_TOOLS_STATE=… only for a custom state folder. It used to print a node dist/mcp.js line.
  • Outside an app with nothing serving, a call now fails with HOST_NOT_RUNNING and the socket it tried, in place of the old "Desktop Tools 2 host" message.
  • Docs: docs/mcp.md (the app server's options), docs/app.md and docs/build.md (dev setup without Node), native2/README.md, CHANGELOG.

Checked:

  • The built server with no options says "Desktop Tools".
  • With --name Ace, the first instruction line, the CALLER_NOT_APPROVED rule and desktop_menu's "… itself can't be targeted" all say Ace.
  • Copied into a fake Desktop Tools Dev.app, it says "Desktop Tools Dev" and reports that bundle's version.
  • --socket pointing at nothing gives the new HOST_NOT_RUNNING text.

No npm run dev-app or live check: the fix-train thread owns the dev app, and the dev app has no grants yet.

Also run: swift test --package-path native2, npm run check, npm test, node scripts/contract.mjs --check.

🤖 Generated with Claude Code

…o Node (#237)

The Swift server builds its instructions and tools/list from the declarations for the app it names: --name, else
the app it ships in (CFBundleName), else Desktop Tools. The development app's own desktop-tools-mcp, which already
found its state folder from its bundle ID, now also says Desktop Tools Dev, so an agent configured with it needs no
Node; npm run dev-app prints that claude mcp add line instead of a node dist/mcp.js one. Run outside an app with no
host serving, a call fails with HOST_NOT_RUNNING and the socket it tried, not the Desktop Tools 2 spike's text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iamnbutler
iamnbutler merged commit 07d591c into main Nov 13, 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