docs/installation-guides/install-antigravity.md
This guide covers setting up the GitHub MCP Server in Google's Antigravity IDE.
Uses GitHub's hosted server at https://api.githubcopilot.com/mcp/.
[!NOTE] We recommend this manual configuration method because the "official" installation via the Antigravity MCP Store currently has known issues (often resulting in Docker errors). This direct remote connection is more reliable.
This will open your mcp_config.json file at:
C:\Users\<USERNAME>\.gemini\antigravity\mcp_config.json~/.gemini/antigravity/mcp_config.jsonAdd the following to your mcp_config.json:
{
"mcpServers": {
"github": {
"serverUrl": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_PAT"
}
}
}
}
Important: Note that Antigravity uses serverUrl instead of url for HTTP-based MCP servers.
Replace YOUR_GITHUB_PAT with your actual GitHub Personal Access Token.
Create a token here: https://github.com/settings/tokens
Recommended scopes:
repo - Full control of private repositoriesread:org - Read org and team membershipread:user - Read user profile dataClose and reopen Antigravity for the changes to take effect.
[!NOTE] The status indicator in the MCP Servers panel might not immediately turn green in some versions, but the tools will still function if configured correctly.
If you prefer running the server locally with Docker:
Log in with OAuth instead of a token. On github.com the official image already includes the app credentials, so you provide none yourself — the server opens a browser login on first use and keeps the token in memory only. In Docker, publish a fixed callback port to loopback:
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"127.0.0.1:8085:8085",
"-e",
"GITHUB_OAUTH_CALLBACK_PORT",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_OAUTH_CALLBACK_PORT": "8085"
}
}
}
}
See Local Server OAuth Login for the native-binary flow (no fixed port), headless/device-code fallback, GitHub Enterprise, and bringing your own OAuth or GitHub App.
To authenticate with a Personal Access Token instead (it takes precedence over OAuth):
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
}
}
}
}
Requirements:
Make sure you're using serverUrl (not url) for the remote server configuration. Antigravity requires serverUrl for HTTP-based MCP servers.
Once installed, you'll have access to tools like:
create_repository - Create new GitHub repositoriespush_files - Push files to repositoriessearch_repositories - Search for repositoriescreate_or_update_file - Manage file contentget_file_contents - Read file contentFor a complete list of available tools and features, see the main README.
serverUrl instead of url for HTTP servers.gemini/antigravity/mcp_config.json instead of .cursor/mcp.json