NCI
Integrations · Antigravity

Wire NCI into Antigravity

Google’s Antigravity is an agent-first IDE; the agent inside it (Gemini) reads tools from MCP servers listed in mcp_config.json. One entry is all it takes to give the agent type-aware access to your installed packages.

Locate mcp_config.json

Antigravity reads MCP servers from a single user-scoped file:

OSPath
macOS / Linux~/.gemini/antigravity/mcp_config.json
Windows%UserProfile%.gemini\antigravity\mcp_config.json

Launch Antigravity at least once so the ~/.gemini/antigravity/ directory exists, then create or open mcp_config.json.

Drop in the entry

{ "mcpServers": { "nci": { "command": "npx", "args": ["-y", "@nativecontextindex/mcp"] } } }

That is the whole entry. nci-mcp walks the agent’s working directory the same way the CLI does, so opening a repo in Antigravity is enough — there is no NCI_PROJECT_ROOT env var.

When you need NCI_BINARY

If nci isn’t on Antigravity’s PATH, point at the binary explicitly:

{ "mcpServers": { "nci": { "command": "npx", "args": ["-y", "@nativecontextindex/mcp"], "env": { "NCI_BINARY": "/absolute/path/to/nci" } } } }

Find the absolute path with:

nci

Reload the agent

Antigravity watches mcp_config.json and rebuilds the server list when it changes — no IDE restart needed. After saving the file, open the Agent panel and either end the current agent session and start a new one, or use the menu and pick MCP Servers to refresh. nci should show up with two tools and three resources.

If the refresh button doesn’t pick up the change (rare — usually only on stale binaries), use the command palette and run Developer: Reload Window. A full Antigravity restart is almost never necessary.

First call

The agent should read nci://primer/agent first — that resource is the operating manual the MCP server’s instructions field tells it to load. Then ask:

List the public exports of zod’s installed version so we can wire a schema.

Gemini routes to nci_query with subcommand: "evidence" (or symbols if it wants the package surface) and quotes signatures back verbatim. Pin package_name and package_version in the prompt when you want exact answers fast — see the agent primer for why.

Troubleshooting

  • The Agent panel shows nci but tool calls fail → run nci binary-path, set NCI_BINARY to that path in the env block, then refresh from MCP Servers.
  • “Tool unavailable” on first message → the repo wasn’t indexed yet. Open a terminal in Antigravity, run nci index, retry.
  • Two MCP entries collide on the name nci → rename one (e.g. nci-monorepo); Antigravity dedupes by key, not by command.

Skills

Antigravity follows the open Agent Skills standard. NCI’s shipped skill (nci-answer-quality) drops into Antigravity’s discovery path with no rewriting — see NCI Skills for the host-by-host map.