Repository navigation
Conversation
Clients on another device in the owner's tailnet can now use iMCP while the Mac keeps the data, permissions, and tool settings. iMCP listens on the Mac's tailnet address, accepts only untagged devices that belong to the Mac's Tailscale user, and requires a named access token on every request. Settings creates, edits, re-rolls, and deletes tokens, and a token can never use a service or tool that is off in iMCP.
Remote sessions pass a pre-approved ConnectionApprovalGate, because a valid access token takes the place of the approval dialog. The remote access test file moves to Tests/imcp-serverTests with the other tests.
Link TailscaleKit 0.2.0-imcp.1 from mattt/libtailscale into the app target, which embeds it like Sparkle. The framework is arm64-only and requires macOS 15.6, so the app target now builds only for arm64 with a deployment target of 15.6, and the app no longer runs on Intel Macs. The CLI, the helper, and the tests don't link the framework and keep their settings.
A sandboxed iMCP can't run the Tailscale command-line tool, and a listener on the Mac's shared tailnet address can be taken over by another local process. iMCP now runs an embedded Tailscale node with its own identity and address, and listens only on that address. The node keeps its state in the app's container and runs only while remote access is on. Settings shows the login link, the node's state, MagicDNS name, and tailnet address, and lets the owner log in with an auth key, rename the device, and log out. For each connection, the server asks the node who the peer is, and accepts only untagged devices of the node's own user. Access tokens, their permissions, and their binding to one device stay the same. The HTTP server reads and writes TailscaleKit connections, and runs their blocking calls on their own threads. The node is behind a small protocol, so the tests use a fake node to check authorization, Host and Origin validation, and the login states.
The README no longer asks for the Tailscale app on the Mac. It describes the login, auth keys, and logout, and says that WireGuard encrypts the plain HTTP traffic and that the node's address belongs only to iMCP. The download requirements now say macOS 15.6 on Apple silicon.
Link TailscaleKit 0.2.0-imcp.2 from mattt/libtailscale, which is universal (arm64 and x86_64) and requires macOS 15.1. The app target builds for the default architectures again, with a deployment target of macOS 15.1, as on main, and the README's download requirement is macOS 15.3 again. A later TailscaleKit release will drop the x86_64 slice.
TailscaleKit contains only a Swift interface that Swift 6.4 generated, so the app needs Xcode 27.1 or later. Of the GitHub-hosted images, only xcode-27 has Xcode 27.1; macos-26 stops at Xcode 26.6. CI now builds with Xcode 27.1 on xcode-27 and drops the Xcode 26.0 and 27.0 entries, which can't build the framework. The release workflow also moves from Xcode 26.0 on macos-26 to Xcode 27.1 on xcode-27.
…ailscalekit # Conflicts: # App/Controllers/ServerController.swift # iMCP.xcodeproj/project.pbxproj
|
@mattt I read through this with fresh eyes, since I've been working on the same kind of tailnet and public HTTP code on my fork and just hit a few problems there. Most of what I was looking for isn't an issue here. The peer and the token are checked on every request on a kept-alive connection, tokens are hashed and stay in the Keychain, the Host and Origin allow-list blocks DNS rebinding, and the parser is careful about Content-Length and
I haven't run any of this against a live tailnet, so these are all from reading the code. If any of them would help as a PR on top of this branch, I'm glad to send one. |
No description provided.