feat(mcp): max mcp --http for ChatGPT and Claude in the browser - #398
Merged
Merged
Conversation
Adopts cli-messaging 0.146.0 and mounts max's own MCP server on its serveOverHttp: max mcp --http --public-url serves the tools on 127.0.0.1 behind the owner's tunnel with a one-owner login, every write through the form; max mcp --revoke ends every browser login (CLI-58). The form's confirmer is now one per server, shared by every instance the factory builds: over HTTP a modern request may meet a fresh instance, and the answer was refused as not from this server. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The stop is a parameter, Ctrl-C by default, so a test can end the server without signalling the test process. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Task
CLI-58 for max: ChatGPT and Claude in the browser use
maxwithout a third-party proxy.Why
docs/remote.mdsent people to an external authenticating proxy. cli-messaging 0.146.0 hasmcp --httpwith its own one-owner login and exports it for a CLI with its own MCP server (cli-messaging #527, #528).What
@leemour/cli-messaging0.145.0 → 0.146.0 (also bringsmax chats stats).src/mcp/server.ts:serveOverHttpUntilStoppedmountscreateMaxServer's factory onserveOverHttpwithOVER_HTTP(every write through the form); a busy port isconfiguration_error.src/commands/mcp.ts:--http,--port,--public-url(https, no path),--revoke.src/mcp/tools.ts: the form's confirmer is created once per server and shared by every instance. Over HTTP a modern-protocol request may be served by a fresh instance, which refused the answer as "not from this server" — found by the new HTTP test.docs/remote.mdrewritten aroundmax mcp --http;docs/commands.mdregenerated; changelog.Testing
pnpm lint && pnpm typecheck && pnpm test(1392 passed),pnpm docs:check,pnpm parity:check.--confirm-sendand goes once accepted, in both protocol eras; nothing is sent on decline.--httpwithout an https address is refused before anything starts;--revokedeletes the token file.maxin a sandbox (temporary folders, no account): 401 without a token, exit 0 about 15 ms after SIGINT under Node and Bun, nothing on stdout.Not released: the owner ruled the next max release waits for more search features (NEED-564).
🤖 Generated with Claude Code