M16 follow-up: MCP for agent blocks in a VM (host-side relay) #59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during #55 (M16, #5).
M16 gives every local agent block illogical's MCP server, scoped to its tab (http on loopback with a per-block token, or
illogical mcpon stdio). Agent blocks running in a wisp VM don't get it yet: a guest can't reach any host address (S14), so PLAN.md's M16 section plans a host-opened relay:vm.sh relay);McpServer's fallback caller is there for this);mcpServersgets a stdio entry connecting to the socket (nc -U, orillogical mcp --socketif the binary is in the image);Fountain agents can't reach the tailnet and stay without it (by design).
Code:
crates/daemon/src/agent/mod.rs(Inner::servers),crates/daemon/src/mcp/mod.rs.Done: merged into main. The daemon opens a relay exec into the VM for each VM agent block. A python3 relay there listens on a Unix socket, and each connection becomes its own tab-scoped MCP session on the host. No token goes into the VM. The agent's mcpServers entry is a python3 stdio client that reconnects after daemon restarts. The relay waits for the machine to exist, which fixed CI's race. A VM agent's first run/start_agent makes its machine the tab's machine. Test: an_agent_block_in_a_vm_gets_mcp_through_the_relay (wisp-gated), plus unit tests for the relay. CI green on both runners (712, 713). PLAN.md: "M16 follow-up: agent blocks in a VM (#59)".