A sign-in to an MCP server opens the authorization_endpoint its metadata
names, and the GUI handed that URL to the system (open / xdg-open /
rundll32 url.dll,FileProtocolHandler) without looking at its scheme. A
server the user added in the Library could name file:///…/Some.app, a
file://\\host\share\x.exe UNC path, smb:// or an app's scheme, and
pressing Sign in would launch, mount or hand off what the server chose.
/api/open already kept to http(s); this path skipped it.
- mcpauth.WebURL: http or https with a host. start refuses any other
authorization endpoint before a flow (and its callback listener) exists.
- gui.openMCPSignIn checks it again before OpenURL, so a State that
didn't come through start is still not opened.
Test: TestAuthorizeEndpointIsAWebPage (file:, UNC file:, smb:, vscode:,
javascript:, https with no host) — red with the check turned off by hand
(the sign-in started at file:///System/Applications/Calculator.app?…),
green with it.
Run (mote; mica's disk is full, mote at load ~33, small run only):
go test -count=1 ./internal/mcpauth/... ok; go test -run
'MCP|SignIn|Library' ./internal/gui ok; go vet darwin ./internal/mcpauth
./internal/gui, GOOS=windows, GOOS=linux -tags nogui ok; gofmt -l clean.
Not run: the full suite.