Repository navigation
Send messages behind Allow writes and the shared confirmation - #383
Closed
oliverames wants to merge 5 commits into
Closed
oliverames wants to merge 5 commits into
oliverames wants to merge 5 commits into
Conversation
added 5 commits
November 18, 2026 13:46
One switch per service hides its write tools from clients and refuses direct calls to them. Deletes count as writes; read-only tools stay available. Services that already write default to on, so existing setups don't change.
A reusable window shows the client, the recipient, and the full text, waits 50 seconds, shows one request at a time, and has no "always allow". It is for tools that send something to another person. Also documents Allow writes and adds the new files to the Xcode project.
A setting in General chooses whether iMCP asks before every tool call, only before writes, or leaves approval to the client. One gate in CallTool enforces it, concurrent confirmations wait their turn, and the two hands-off modes skip iMCP's own pop-ups and per-service Allow writes blocks without changing the stored choices.
NSAppleScript.execute can now call a handler of a fixed script with arguments that reach it as Apple event descriptors, never as source text. A caller's beforeSending check runs on the script queue right before the script.
Sends a message or a reply to a conversation through Messages. The tool is off until Allow writes is turned on for Messages, validates the recipient or conversation, shows the shared confirmation window with the client name, exact handles and full text, and rechecks the approved conversation right before sending. It skips its own window when the global approval gate already asked about the same call, so a send never prompts twice. Adds the Messages Apple events entitlement, the usage description, README text and tests.
This was referenced Nov 18, 2026
Contributor
Author
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.
Stacked on #377; merge that first; review the commits after 1014bee.
What and why
This adds
messages_send, so a client can send an iMessage or SMS from the Messages app. It is #305 rebuilt on the Allow writes switch and the shared confirmation window from #377. Nothing is sent without the person clicking Send in iMCP.What changed
messages_sendtakes a recipient (or a conversation@id), the text, and an optional service. It is off until Allow writes is turned on for Messages, and then every send shows the shared confirmation window with the client name, the exact recipients and the full text.messages_senddoes not ask a second time.NSAppleScript.executecan call a handler with typed arguments, so no value from a client is ever built into script source. A caller's check runs right before the script.Testing
swift format lint --strict -r .is clean.iMCPscheme succeeds.imcp-serverTests: 256 tests run, 1 skipped (pre-existing, inHomeProxyTests), 0 failures.MessagesTestscovers arguments, recipient and conversation checks, decline, timeout and busy, the already-confirmed path, and the Allow writes default.Not verified
imcp-serverclient flow. @lunaroja offered to check this on Send messages behind Allow writes and a shared confirmation #344.Replaces #344.