Repository navigation
feat(mcp): serve mcp over http for agents in docker - #25
Merged
Merged
Conversation
Opt-in, listens on 127.0.0.1 only and needs a random key (in the path or as a Bearer token). Each request goes to a persistent `Menew --mcp` child. Agents built on Pi that run in a container get a switch that writes the entry into their mcp.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
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.
Agents that run in a container (Docker) can't start
Menew --mcpon the Mac. This adds an opt-in HTTP transport for the MCP server.What changes
127.0.0.1:47833only and answersPOST /mcp/<key>(orAuthorization: Bearer <key>). Requests with a foreignOriginget 403 (DNS rebinding), anything without the key gets 401.Menew --mcpchild, so the tools and their switches are exactly the same as for local agents.mcp.jsonnext toagent/and a Linuxsystem_info.json) get their own switch, which writes{"type":"http","url":"http://host.docker.internal:47833/mcp/<key>"}. Copy config gives the same entry for any other app; New key rotates it and rewrites the configs Menew manages.Tested
swift test: 105 tests pass (5 new: request parsing, auth, origin, docker client config).initializefrom the Mac,tools/listandagent_usagefrom inside a Docker container viahost.docker.internal; the LAN IP is refused.🤖 Generated with Claude Code