Product: Antigravity IDE (Windows)
Language Server: v1.19.4
Severity: Performance
TL;DR
Each workspace spawns its own independent set of all configured MCP servers. With 4 workspaces × 9 MCP servers × 2 processes each (npx wrapper + server) = 72 node.js processes consuming ~4.5 GB at idle. These processes are never cleaned up — not on workspace close, not on config change, not on IDE restart.
Observations
Through systematic profiling (Get-Process, Get-CimInstance Win32_Process), the following was measured on a fresh boot:
Process inventory at idle (no user interaction):
| Component | Count | RAM |
|---|---|---|
| Antigravity (Electron renderers) | 31 | 6.3 GB |
language_server_windows_x64 |
4 | 4.4 GB |
node.exe (MCP servers) |
64 | 4.5 GB |
| Total IDE footprint | ~100 | ~15 GB |
MCP duplication pattern (4 workspaces, 9 servers):
| Server | Instances | Expected |
|---|---|---|
@modelcontextprotocol/server-memory |
16 | 2 |
@upstash/context7-mcp |
8 | 2 |
mcp-server-docker |
8 | 2 |
mcp-server-ssh |
8 | 2 |
server-sequential-thinking |
8 | 2 |
server-puppeteer |
8 | 2 |
firecrawl-mcp (disabled in config) |
8 | 0 |
Lifecycle failures observed:
- Close workspace window → MCP child processes persist
- Reopen same workspace → new MCP processes spawn alongside orphans → process count went from 64 → 160
- Set
"disabled": truein config → existing processes unaffected - Full IDE restart → session restore re-spawns MCP set; orphans remain
Only workaround: Stop-Process -Name node -Force followed by IDE relaunch. This reduced idle RAM from 18 GB → 11.7 GB.
Reproduction
- Configure 5+ MCP servers in
mcp_config.json - Open 3+ workspace windows
- Check
Get-Process -Name node | Measure-Object - Expected:
~N_servers × 2. Actual:N_workspaces × N_servers × 2 - Close a workspace → verify node count unchanged
- Disable an MCP server in config → verify its processes persist
- Reopen workspace → verify additive process spawning
Suggested Fixes
- Shared MCP process pool — one instance per server serving all workspaces, not per-workspace isolation
- Lifecycle binding — workspace close should
SIGTERMits child processes - Config reactivity — toggling
disabledshould kill/spawn the corresponding server - Startup cleanup — detect orphaned node processes from prior sessions on launch
- Direct invocation — invoke server binaries from npm cache instead of
npx -ywrappers to halve process count
Measured on Windows 11, 40 GB RAM, i5-12500H. Happy to provide diagnostic scripts or additional profiling data if helpful.