A gateway key from another computer (LAN, tunnel, or a proxy here) or a
web page could reach, through /mcp/magpie/hub, servers that act as this
computer's user:
- Magpie Browser, which /mcp/magpie/browser itself refuses to such a
caller, so a LAN key could drive the user's signed-in browser;
- magpie's image server, which draws with this magpie's own token, past
the key's model, account and spend holds;
- another magpie's router, which passes calls on to its own browser.
These are now HereOnly (keepsSession or isSelf in the library) and are
neither listed nor run for an away caller. The check sits both in the
gateway (hubServersOf, hubTools) and in the library (visitorServers,
Call), so a call by name is refused too. A held key (nativeHeld) from
another computer also no longer gets programs run here (stdio commands,
plugins), only HTTP servers elsewhere. Local callers are unchanged. The
mcp-router subsystem page says both rules.
Run on mote (macOS 27) at this tree, base 49c9491b7:
- gofmt -l internal: clean
- go vet: darwin; GOOS=windows; GOOS=linux -tags nogui (gateway, library)
- go test -tags nogui -count=1 -timeout 45m ./internal/gateway
./internal/library ./internal/gui ./internal/provider: gateway, library
and gui ok. In provider, TestRenewLoginsKeepsClaudeReading fails
(#5481, a fixed-date fixture, red on main and taken by another
session).
Rebased on fe61503e6 (gateway.go, remote_moved_test.go changed):
gofmt, go vet, and go test -run 'Hub|RemoteMoved|Moved' in gateway and
library ok at the pushed tree.
Broken by hand: making Gives always true turns both
TestHubKeepsThisComputersOwnServersHere tests red (the browser and image
are listed and run for 192.0.2.7). Taking the library's Call check out
leaves the library test red on a call by name.
Not tried: a real LAN client against a live magpie. Windows and Linux
were vetted, not tested.