Skip to main content
Kernel connects to Antigravity over stdio through mcp-remote rather than as a remote serverUrl server. Antigravity’s remote-server client can complete the OAuth flow and still send initialize without the bearer token attached, which comes back as 401 Unauthorized (antigravity-cli#25). mcp-remote runs the OAuth flow itself, so the token does not depend on that client.

Install with the Kernel CLI

Run the following command:

Configure manually

Alternatively, open the agent side panel, click the ellipsis (…) menu, and select MCP Servers, then Manage MCP Servers → View raw config. Add Kernel to the mcpServers map in mcp_config.json — ~/.gemini/config/mcp_config.json globally, or .agents/mcp_config.json for a single workspace. This Linux example uses a cache directory under /home/user; change it to an absolute directory in your home directory:
If the entry previously used serverUrl, remove that key. Reload the window to pick up the change. --static-oauth-client-metadata names the OAuth client. Without it, mcp-remote registers as MCP CLI Proxy and the Kernel consent screen asks you to trust that name instead of Antigravity. The 46094 argument sets Antigravity’s OAuth callback port. Each client needs a separate port as well as a separate cache to authorize while other clients are running. The CLI preserves an existing explicit port; if you customize it, choose an unused port that no other client uses. The latest Kernel CLI gives Antigravity its own auth cache. After rerunning kernel mcp install --target antigravity, authorize again. If you already set MCP_REMOTE_CONFIG_DIR, the CLI preserves it; use a directory dedicated to Antigravity. To clear an old registration, close Antigravity and remove the cache it used (~/.mcp-auth/mcp-remote-v1/ by default, or mcp-remote-v1/ under your custom MCP_REMOTE_CONFIG_DIR). This also signs out other clients using that cache.

Connect

Go to Settings → Customizations, scroll to Installed MCP Servers, and click the reload button. mcp-remote opens a browser window for you to authorize access. Once it completes, Kernel shows as connected in the Installed MCP Servers list. Tokens are cached under ~/.mcp-auth and refreshed for you.

Connect with an API key

For headless or scripted use, where no browser is available to complete the OAuth flow, authenticate with a project-scoped Kernel API key from the Kernel Dashboard instead. kernel mcp install --target antigravity always writes the OAuth config, so wire this up by hand. Put the key in a header file that only you can read:
Then point mcp-remote at it:
Use an absolute path. mcp-remote opens the file directly, so a leading ~ isn’t expanded and a relative path resolves against whatever directory Antigravity launched it from. --header Authorization:... takes the value inline instead, but the key then sits in the process arguments, where any other account on the machine can read it from the process list.