feat: container-reachable MCP host for Docker harnesses - #58
Merged
Conversation
Separate bind host, advertised host, and port so a Linux container (stock grok-build on Docker Desktop) can reach host-side RLE MCP while RimAPI stays on localhost:8765. Local defaults remain 127.0.0.1 + ephemeral port. Co-authored-by: Jason <jkbennitt@users.noreply.github.com>
The harness-boundary CI check forbids grok-build / opencode in src/. Co-authored-by: Jason <jkbennitt@users.noreply.github.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.
Separate MCP bind host, advertised host, and port so a Linux Docker container (stock grok-build on Docker Desktop talking to host RimWorld) can reach the in-process MCP HTTP server.
Problem
McpHostbound127.0.0.1and picked an ephemeral port, advertisinghttp://127.0.0.1:<port>/mcp. A container cannot reach that. Host RimWorld/RIMAPI stays on Windows:8765; the agent needs an MCP URL viahost.docker.internal.Behavior
127.0.0.10)http://127.0.0.1:<port>/mcp0.0.0.08766http://host.docker.internal:8766/mcp--docker(headless RimWorld in a container, RIMAPI on 8765) is unchanged. No Grok Dockerfiles in this repo (ADR-004).How to enable
Overrides:
MCP_BIND_HOST,MCP_ADVERTISE_HOST,MCP_PORT(same keys as--harness-opt). Harness options win overRLEConfig.HeadlessCliHarness.setup()listens on the bind address and passes the advertised URL tostart_agent.Windows Docker Desktop / the OS firewall may prompt to allow Python on 8766. RimAPI remains
localhost:8765.Tests
URL construction and bind-vs-advertise (including an HTTP host that advertises
host.docker.internalwhile still serving on loopback). No live Docker in CI.