Repository navigation
feat: let a dev app and MCP server use their own state directory - #37
Merged
Merged
Conversation
Every Desktop Tools.app relinks ~/.local/state/desktop-tools/desktop-client to its own client at launch, so a development build run next to the installed app redirects the live MCP server's client. A second app cannot take over desktop.sock: the bridge's flock lease refuses it while the installed app serves. DESKTOP_TOOLS_STATE now sets the app's state directory (socket and client link) and the MCP server's default client and socket paths. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Oct 17, 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.
Every
Desktop Tools.apprelinks~/.local/state/desktop-tools/desktop-clientto its own client at launch. A development build run next to the installed app therefore redirects the live MCP server to the dev client. On this Mac, two dev apps from parallel work were doing exactly that.A dev app does not take over the live socket. The bridge takes an exclusive
flocklease ondesktop.sock.lockand refuses a second host withsocketAlreadyOwnedwhile the installed app serves. Only the client link is affected.DESKTOP_TOOLS_STATEsets the app's state directory: its socket and client link. An empty value is ignored.src/mcp.tsuses the same variable for its default--clientand--socket.docs/app.mddocuments it under Development.Verified: a Developer ID dev build launched with
open -n --env DESKTOP_TOOLS_STATE=/tmp/f7/stateserved/tmp/f7/state/desktop.sock, linked its client there, and left~/.local/state/desktop-tools/desktop-clientpointing at/Applications. An MCP server pointed at that directory inspected and drove TextEdit, so the dev build kept the installed app's grants.npm run checkpasses.🤖 Generated with Claude Code