Add antigravity MCP install target - #265
Open
robertjamesprior wants to merge 1 commit into
Open
robertjamesprior wants to merge 1 commit into
robertjamesprior wants to merge 1 commit into
Conversation
Antigravity keys remote servers off serverUrl rather than url, so the existing HTTP target shapes don't work for it. Config lives at ~/.gemini/config/mcp_config.json. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
robertjamesprior
marked this pull request as ready for review
September 20, 2026 08:23
robertjamesprior
requested review from
masnwilliams and
rgarcia
and removed request for
rgarcia
September 20, 2026 19:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
kernel mcp install --target antigravity, so Antigravity users don't have to hand-edit JSON to reach the Kernel MCP server.Antigravity keys remote servers off
serverUrland ignoresurlandhttpUrl, so none of the existing HTTP target shapes work for it — this needs its own installer rather than reuse of the Cursor or VS Code path. Config goes to~/.gemini/config/mcp_config.json, home-relative on every platform, so no per-OS branch is needed.Written output:
{ "mcpServers": { "kernel": { "serverUrl": "https://mcp.onkernel.com/mcp" } } }Uses
writeJSONFile(0644/0755) like every target except fx — the file this writes holds no credential. Antigravity stores OAuth tokens separately in~/.gemini/antigravity/mcp_oauth_tokens.json.On writing the OAuth shape rather than an API key
This writes the plain OAuth config, matching all eight existing targets. Antigravity's OAuth is currently unreliable — it can finish the browser flow and still send
initializewithout the bearer token, returning401 Unauthorized(antigravity-cli#25, open since May).The alternative was writing an
Authorization: Bearerheader with a Kernel API key, which works today. I didn't, for two reasons: it diverges from every other target, and it needs the user to already hold a key. This is the same tradeoff--target fxalready makes — it writes OAuth config knowing fx's OAuth is broken, and the docs carry the workaround. Worth overriding if you'd rather the CLI optimize for what works today over what's consistent.Validation
go build ./...,go vet ./cmd/mcp/,gofmt -l: all clean.go test ./...: all packages pass, including two new tests — one covering an existing config (other servers and unrelated keys preserved,urlexplicitly absent) and one covering a clean machine, which is what exercises creating the two-level.gemini/configdirectory.HOME: writes the file above, prints the Customizations/paste-code next steps, and appears in--helpand the invalid-target error.serverUrlkey, config path, and token-store location come from Antigravity's MCP documentation.Merge order
kernel/docs#612 documents this target and currently says no CLI target exists. Land this first, then that.
🤖 Generated with Claude Code
Note
Low Risk
CLI-only change that writes non-secret local MCP JSON using the same patterns as other install targets; no server or auth logic changes.
Overview
Adds
kernel mcp install --target antigravityso Antigravity users get Kernel MCP wired up without hand-editing JSON.The installer writes
~/.gemini/config/mcp_config.json, merging akernelentry undermcpServersthat uses Antigravity’sserverUrlfield (noturl/ HTTP shapes used by other targets). Help text and post-install steps cover reload, Customizations Authenticate, and pasting the browser authorization code.Two tests cover merging into an existing config (preserving other servers/settings and ensuring
urlis not written) and a clean install that creates the config path.Reviewed by Cursor Bugbot for commit bcc3db7. Bugbot is set up for automated code reviews on this repo. Configure here.