# Install GitHub MCP Server in Google Antigravity

Source: https://github.com/github/github-mcp-server
Listing: https://www.antigravityskills.org/skill/github-mcp-server
Safety review (2026-10-15): Official GitHub server; acts in your GitHub account with your token; read-only mode available; destructive tools exist.

## Rules for the agent
- Before running anything, tell the user what you will download and whether it contains scripts, and ask them to confirm.
- Install into this project (.agents/skills/) unless the user asks for a global install (~/.gemini/config/skills/).
- Do not run other commands from the source repository unless the user asks.

## Steps
1. Create a GitHub token (or plan to use OAuth)
   The repo's Antigravity guide uses a Personal Access Token and suggests the scopes repo, read:org and read:user. Create it at https://github.com/settings/tokens, or use a fine-grained token limited to the repositories you want the agent to touch. Treat it like a password.
2. Open the MCP config in Antigravity
   Per the guide: Agent panel '...' menu > MCP Servers > Manage MCP Servers > View raw config. It opens mcp_config.json, which the guide places at ~/.gemini/antigravity/mcp_config.json (macOS/Linux) or C:\Users\<USERNAME>\.gemini\antigravity\mcp_config.json (Windows). Newer Antigravity builds also have Settings > Customizations; we have not tested which location your version uses.
3. Add the remote server (recommended by the repo)

```json
{
  "mcpServers": {
    "github": {
      "serverUrl": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_GITHUB_PAT"
      }
    }
  }
}
```

   Antigravity uses serverUrl, not url, for HTTP servers; using url gives 'serverUrl or command must be specified'. Replace YOUR_GITHUB_PAT with your token. Optional: add "X-MCP-Readonly": "true" and "X-MCP-Toolsets": "repos,issues,pull_requests" under headers (documented in docs/remote-server.md) to start read-only with fewer tools.
4. Or run it locally with Docker

```json
{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_READ_ONLY=1", "ghcr.io/github/github-mcp-server"],
      "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"}
    }
  }
}
```

   Requires Docker running and on your PATH. This is the guide's PAT variant plus the README's GITHUB_READ_ONLY=1. The guide also shows an OAuth variant that publishes 127.0.0.1:8085 for the login callback.
5. Restart Antigravity and check
   Close and reopen Antigravity, then open the MCP Servers panel: 'github' should list its tools. The guide notes the status dot may not turn green in some versions even when the tools work. Try the read-only example prompt first.

Note: This is an MCP server, not a skill folder, so nothing goes in .agents/skills/. Steps follow docs/installation-guides/install-antigravity.md at the reviewed commit; we have not run them in Antigravity.

Done when the skill is listed: in the Antigravity 2.0 app ask "What skills do you have?" in a new conversation (the app has no /skills command); in the Antigravity CLI run /skills (run /skills reload first in a session that was already open).
