Skip to content

Trust local clients by their app's code signature - #345

Closed
oliverames wants to merge 2 commits into
mattt:mainfrom
oliverames:feat/local-trust-by-signature
Closed

oliverames wants to merge 2 commits into
mattt:mainfrom
oliverames:feat/local-trust-by-signature

Conversation

@oliverames

@oliverames oliverames commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What it does and why

Trusting a client today means copying a credential into its MCP settings by hand. This PR replaces that workflow with code-signature trust for signed apps and automatic CLI credentials for terminal clients.

What changed

  • For signed apps, iMCP finds the app responsible for the connecting imcp-server and checks its code signature. The approval dialog shows that app's name, icon, and developer. Choosing Always Allow trusts the app's designated requirement, so there is nothing to copy.
  • Terminals and unsigned or ad hoc runtimes are never trusted by signature, because that would trust everything running inside them. Instead, imcp-server automatically persists a credential at ~/Library/Application Support/iMCP/client-credential when IMCP_CLIENT_CREDENTIAL is not set.
  • Every client gets a single-step Allow Once or Always Allow prompt on first connection, with no file panels or copy-paste modals.
  • Settings lists trusted apps and credentials with a Remove button.
  • The responsible-app lookup uses the private responsibility_get_pid_responsible_for_pid symbol. If you would rather avoid that API, I am happy to discuss alternatives.

Testing

  • Unit tests pass.
  • CI: both builds (macOS 26 with Xcode 26.0, macOS 27 with Xcode 27.0) pass.

Not verified

  • The live approval dialog inside the sandbox.
  • Trust by signature against a real signed client app such as Claude Desktop.

iMCP now finds the app responsible for the connecting imcp-server, validates
its code signature, and shows that app's real name, icon, and signer in an
alert-style approval window. Always Allow stores trust keyed to the app's
designated requirement. Terminals, ad hoc, unsigned, and non-bundle clients
aren't trusted by signature: Claude Code gets Set Up Claude Code, which writes
a credential into ~/.claude.json atomically, with the copy flow as fallback.
Settings lists trusted apps with icon, Team ID, and last connection.
@oliverames

Copy link
Copy Markdown
Contributor Author

Replaced by #374, the same change cut from main as one PR so it can merge on its own.

@oliverames oliverames closed this Nov 18, 2026
@oliverames
oliverames deleted the feat/local-trust-by-signature branch November 18, 2026 21:44
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