Skip to content

[Bug bounty] Native Windows launcher never registers Monk in Antigravity MCP config #148

Description

@Napikha1818

Bounty eligibility

  • I have signed up at monk.io with this GitHub account
  • I installed and ran the Monk plugin and companion
  • I have starred this repo

Stage

connect

Coding agent

Google Antigravity

Coding agent version

Antigravity 2.3.1

Repro steps

Validated against public commit 271cf17e6fe62aa48e276f893d17bd85d82ec198 (v0.1.47) on native Windows 11.

  1. Confirm C:\Users\User\.gemini\config\mcp_config.json contains no mcpServers.monk entry.
  2. Install .antigravity-plugin under C:\Users\User\.gemini\config\plugins\monk.
  3. Run the official native-Windows setup command:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\.antigravity-plugin\scripts\start-monk-agent.ps1"
  1. The installer downloads C:\Users\User\.monk\bin\monk-agent.exe (223,378,413 bytes). The launcher log confirms:
monk-agent listening on http://127.0.0.1:7419
  1. Fully restart Antigravity and start a new Agent Conversation, exercising the installed plugin's PreInvocation path.
  2. Reinspect C:\Users\User\.gemini\config\mcp_config.json.

Observed evidence:

AgentInstalled=true
monk-agent version=0.1.45
PluginExists=true
ConfigModified=2026-01-23T08:44:56.3460179+07:00
MonkRegistered=false

The MCP config timestamp did not change during setup or plugin execution.

Expected behavior

The documented one-time setup should install/start monk-agent and register this entry in Antigravity's global MCP config:

{
  "mcpServers": {
    "monk": {
      "serverUrl": "http://127.0.0.1:7419/mcp"
    }
  }
}

Antigravity should then expose the monk server for OAuth authentication.

Actual behavior

The native Windows launcher installs and starts the companion but never reads or writes ~/.gemini/config/mcp_config.json. Antigravity therefore has no monk MCP server after apparently successful setup.

Root cause

The POSIX launcher implements register_antigravity_mcp() and calls it on both successful paths. The PowerShell launcher has the equivalent successful paths but no registration function or config write.

Impact

Fresh native-Windows Antigravity setup cannot complete the documented connect flow automatically. The companion may be healthy, but the MCP server is absent, so users cannot reach Monk tools or start Antigravity's Monk OAuth flow without manually editing global JSON.

Severity

major

OS

Windows 11 x64; native PowerShell launcher.

monkd version

Not involved in the registration failure.

Target cloud

None.

Integration

Google Antigravity.

Duplicate check

Searched current open/closed issues and PRs for:

  • native Windows mcp_config.json
  • Windows launcher register Antigravity
  • Windows Antigravity disconnected MCP
  • mcp_config.json PowerShell
  • Windows Antigravity MCP registration

No same-scope report or PR found as of 2026-07-23.

Closest items:

None adds missing registration to native Windows setup.

Tested fix

Added Register-AntigravityMcp to all three rendered PowerShell launchers and called it on both successful startup paths. The implementation:

  • preserves unrelated top-level config;
  • preserves existing MCP servers;
  • creates mcpServers when missing/null;
  • adds Monk once;
  • writes through a temporary file;
  • remains idempotent.

Validation:

RED: Windows launcher does not register Antigravity MCP
GREEN: Windows Antigravity MCP registration tests passed.

Also passed:

  • PowerShell AST parsing through focused test;
  • all three rendered launcher copies byte-identical;
  • git diff --check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions