feat(warp): register the EGC MCP servers in ~/.warp/.mcp.json (#1678)
Part of #1678: Warp gets the EGC MCP servers the memory rule points at.
What changes
egc init registers egc-guardian and egc-memory under the standard mcpServers object of ~/.warp/.mcp.json, Warp's global file, whose servers Warp starts itself; merged so the person's own servers stay. Gated on ~/.warp, the Linux config directory ~/.config/warp-terminal or warp-terminal on PATH.
Warp also reads the files of other tools (Claude Code's ~/.claude.json, a project's .mcp.json, Codex's config.toml), but only spawns those once the person enables it, so the global file is where the servers run without a click. The project-scope .warp/.mcp.json is the project's own and is not touched.
Source: Warp MCP, read on 2026-10-17.
Verification
tests/lib/mcp-register.test.js134/134 on the branch rebased over main c80350ef (Junie and Copilot CLI included), two new cases: the target with its gate (the two directories and the binary) and the file it writes; a pre-existing server kept with itsworking_directoryand an idempotent second run. Both fail onmain.tests/spec/integration-tiers.test.js9/9 with the Warp row updated.npm run preflight: no new findings. Local Sonar gate: 0 new findings.
Summary by cubic
egc init now registers egc-guardian and egc-memory in ~/.warp/.mcp.json, Warp's global file, whose servers Warp starts itself, so they run without the person enabling them.
- Existing servers in the file are kept, and a second run is idempotent.
- Registration is gated on
~/.warp,~/.config/warp-terminal, orwarp-terminalon PATH, so a machine without Warp gets nothing written. - The project-scope
.warp/.mcp.jsonis the project's own and is not touched.