Skip to content

feat(mcp): serve mcp over http for agents in docker - #25

Merged
Quost merged 2 commits into
mainfrom
feat/mcp-http
Nov 11, 2026
Merged

Quost merged 2 commits into
mainfrom
feat/mcp-http

Conversation

@Quost

@Quost Quost commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Agents that run in a container (Docker) can't start Menew --mcp on the Mac. This adds an opt-in HTTP transport for the MCP server.

What changes

  • AI agents › MCP server › Access for agents in Docker (off by default). When on, Menew listens on 127.0.0.1:47833 only and answers POST /mcp/<key> (or Authorization: Bearer <key>). Requests with a foreign Origin get 403 (DNS rebinding), anything without the key gets 401.
  • Each JSON-RPC request goes to a persistent Menew --mcp child, so the tools and their switches are exactly the same as for local agents.
  • Agents built on Pi that run in a container (a mcp.json next to agent/ and a Linux system_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.
  • README (feature + privacy), CHANGELOG 1.103.0, site FAQ in 5 languages, CLAUDE.md network rule, 4 new strings in all languages.

Tested

  • swift test: 105 tests pass (5 new: request parsing, auth, origin, docker client config).
  • Real app: initialize from the Mac, tools/list and agent_usage from inside a Docker container via host.docker.internal; the LAN IP is refused.

🤖 Generated with Claude Code

Quost and others added 2 commits November 11, 2026 13:09
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>
@Quost
Quost merged commit 2002ae2 into main Nov 11, 2026
11 checks passed
@Quost
Quost deleted the feat/mcp-http branch November 11, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant