Files
hive/docs/antigravity-setup.md
T
2026-03-06 14:56:19 -08:00

6.7 KiB
Raw Blame History

Antigravity IDE Setup

Use the Hive agent framework (MCP servers and skills) inside Antigravity IDE (Googles AI IDE).


Quick start (3 steps)

Repo root = the folder that contains core/, tools/, and .agent/ (where you cloned the project).

  1. Open a terminal and go to the hive repo root (e.g. cd ~/hive).
  2. Run the setup script (use ./ so the script runs from this repo; don't use /scripts/...):
    ./scripts/setup-antigravity-mcp.sh
    
  3. Restart Antigravity IDE. You should see coder-tools and tools as available MCP servers.

Important: Always restart/refresh Antigravity IDE after running the setup script or making any changes to MCP configuration. The IDE only loads MCP servers on startup.

Done. For details, prerequisites, and troubleshooting, read on.


What you get after setup

  • coder-tools Create and manage agents (scaffolding via initialize_agent_package, file I/O, tool discovery).
  • tools File operations, web search, and other agent tools.
  • Documentation Guided docs for building and testing agents.

Prerequisites

  • Antigravity IDE installed.
  • Python 3.11+ and project dependencies. If you havent set up the repo yet, from repo root run:
    ./quickstart.sh
    
  • MCP server dependencies (one-time). From repo root:
    cd core && ./setup_mcp.sh
    

Full setup (step by step)

Step 1: Install MCP dependencies (one-time)

From the repo root:

cd core
./setup_mcp.sh

This installs the framework and MCP packages and checks that the server can start.

Step 2: Register MCP servers with Antigravity

Antigravity reads MCP config from your user config file (~/.gemini/antigravity/mcp_config.json), not from the project. The easiest way is to run the setup script from the hive repo folder:

./scripts/setup-antigravity-mcp.sh

The script finds the repo root, writes ~/.gemini/antigravity/mcp_config.json with the right paths, and you don't edit any paths by hand.

Important: Always restart/refresh Antigravity IDE after running the setup script. MCP servers are only loaded on IDE startup.

The coder-tools and tools servers should show up after restart.

Using Claude Code instead? Run:

./scripts/setup-antigravity-mcp.sh --claude

That writes ~/.claude/mcp.json as well.

Prefer to do it manually? See Manual MCP config below. Youll create ~/.gemini/mcp.json (or ~/.claude/mcp.json) with absolute paths to your repos core and tools folders.

Step 3: Use MCP tools + docs

Use the coder-tools and tools MCP servers in Antigravity, and use docs in docs/ for workflow guidance.


Whats in the repo (.agent/)

.agent/
├── mcp_config.json   # Template for MCP servers (coder-tools, tools)

The setup script writes your user config (~/.gemini/antigravity/mcp_config.json) using paths from this repo. The file in .agent/ is the template; Antigravity itself uses the file in your home directory.


Troubleshooting

MCP servers dont connect

  • Run the setup script again from the hive repo root: ./scripts/setup-antigravity-mcp.sh, then restart Antigravity.
  • Make sure Python and deps are installed: from repo root run ./quickstart.sh.
  • Check that the servers can start: from repo root run cd tools && uv run coder_tools_server.py --stdio (Ctrl+C to stop), and in another terminal cd tools && uv run mcp_server.py --stdio (Ctrl+C to stop). If those fail, fix the errors first (e.g. install deps with uv sync).

"Module not found" or import errors

  • Open the repo root as the project in the IDE (the folder that has core/ and tools/).
  • If you edited ~/.gemini/antigravity/mcp_config.json by hand, make sure --directory paths are absolute (e.g. /Users/you/hive/core and /Users/you/hive/tools).

MCP tools dont show up in the UI

  • Antigravity may need a restart. Use the files in docs/ as documentation; the MCP tools (coder-tools, tools) are the required integration point.

Verification prompt (optional)

Paste this into Antigravity to check that MCP is set up. It doesnt use your machines paths; anyone can use it.

Check the Hive + Antigravity integration:

1. MCP: List available MCP servers/tools. Confirm that "coder-tools" and "tools" (or equivalent) are connected. If not, tell the user to run ./scripts/setup-antigravity-mcp.sh from the hive repo root, then restart Antigravity (see docs/antigravity-setup.md).

2. Docs: Confirm that the project has `docs/` with setup/developer guides for the workflow.

3. Result: Reply with PASS (MCP OK), PARTIAL (some MCP tools missing), or FAIL (MCP unavailable), and one line on what to fix if not PASS.

If you get PARTIAL (e.g. MCP not connected), run ./scripts/setup-antigravity-mcp.sh from the repo root and restart Antigravity.


Manual MCP config template

Use this only if you dont want to run the setup script. Replace /path/to/hive with your actual repo root (e.g. the output of pwd when youre in the hive folder).

Save as ~/.gemini/antigravity/mcp_config.json (Antigravity) or ~/.claude/mcp.json (Claude Code), then restart the IDE to load the new configuration.

{
  "mcpServers": {
    "coder-tools": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/hive/tools", "coder_tools_server.py", "--stdio"],
      "disabled": false
    },
    "tools": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/hive/tools", "mcp_server.py", "--stdio"],
      "disabled": false
    }
  }
}

Make sure uv is installed and available in your PATH. Note: Use --directory in args instead of cwd for Antigravity compatibility.


Verify from the command line (optional)

From the repo root:

Check that config exists

test -f .agent/mcp_config.json && echo "OK: mcp_config.json" || echo "MISSING"

Check that the config is valid JSON

python3 -c "import json; json.load(open('.agent/mcp_config.json')); print('OK: valid JSON')"

Test that MCP servers start (two terminals)

# Terminal 1
cd tools && uv run coder_tools_server.py --stdio

# Terminal 2
cd tools && uv run mcp_server.py --stdio

If both start without errors, the config is fine.


See also