Skip to content

Commit 982b12d

Browse files
Merge main into registry pattern branch (docs only)
Preserves registry pattern architecture while incorporating: - Antigravity installation guide - Tool renaming documentation - CONTRIBUTING.md updates - README tool documentation updates Functional changes from main (5a4338c, a48e306, afe34d8) to be ported separately.
2 parents 10a0f98 + 637819a commit 982b12d

File tree

5 files changed

+190
-3
lines changed

5 files changed

+190
-3
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ These are one time installations required to be able to test your changes locall
3939
- Run linter: `script/lint`
4040
- Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...`
4141
- Update readme documentation: `script/generate-docs`
42+
- If renaming a tool, add a deprecation alias (see [Tool Renaming Guide](docs/tool-renaming.md))
4243
6. Push to your fork and [submit a pull request][pr] targeting the `main` branch
4344
7. Pat yourself on the back and wait for your pull request to be reviewed and merged.
4445

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ The following sets of tools are available:
991991
2. get_diff - Get the diff of a pull request.
992992
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
993993
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
994-
5. get_review_comments - Get the review comments on a pull request. They are comments made on a portion of the unified diff during a pull request review. Use with pagination parameters to control the number of results returned.
994+
5. get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.
995995
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
996996
7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.
997997
(string, required)
@@ -1061,7 +1061,7 @@ The following sets of tools are available:
10611061
- `owner`: Repository owner (username or organization) (string, required)
10621062
- `path`: Path where to create/update the file (string, required)
10631063
- `repo`: Repository name (string, required)
1064-
- `sha`: Required if updating an existing file. The blob SHA of the file being replaced. (string, optional)
1064+
- `sha`: The blob SHA of the file being replaced. (string, optional)
10651065

10661066
- **create_repository** - Create repository
10671067
- `autoInit`: Initialize with README (boolean, optional)
@@ -1092,7 +1092,7 @@ The following sets of tools are available:
10921092

10931093
- **get_file_contents** - Get file or directory contents
10941094
- `owner`: Repository owner (username or organization) (string, required)
1095-
- `path`: Path to file/directory (directories must end with a slash '/') (string, optional)
1095+
- `path`: Path to file/directory (string, optional)
10961096
- `ref`: Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` (string, optional)
10971097
- `repo`: Repository name (string, required)
10981098
- `sha`: Accepts optional commit SHA. If specified, it will be used instead of ref (string, optional)

docs/installation-guides/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This directory contains detailed installation instructions for the GitHub MCP Se
44

55
## Installation Guides by Host Application
66
- **[GitHub Copilot in other IDEs](install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
7+
- **[Antigravity](install-antigravity.md)** - Installation for Google Antigravity IDE
78
- **[Claude Applications](install-claude.md)** - Installation guide for Claude Web, Claude Desktop and Claude Code CLI
89
- **[Cursor](install-cursor.md)** - Installation guide for Cursor IDE
910
- **[Google Gemini CLI](install-gemini-cli.md)** - Installation guide for Google Gemini CLI
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Installing GitHub MCP Server in Antigravity
2+
3+
This guide covers setting up the GitHub MCP Server in Google's Antigravity IDE.
4+
5+
## Prerequisites
6+
7+
- Antigravity IDE installed (latest version)
8+
- GitHub Personal Access Token with appropriate scopes
9+
10+
## Installation Methods
11+
12+
### Option 1: Remote Server (Recommended)
13+
14+
Uses GitHub's hosted server at `https://api.githubcopilot.com/mcp/`.
15+
16+
> [!NOTE]
17+
> 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.
18+
19+
#### Step 1: Access MCP Configuration
20+
21+
1. Open Antigravity
22+
2. Click the "..." (Additional Options) menu in the Agent panel
23+
3. Select "MCP Servers"
24+
4. Click "Manage MCP Servers"
25+
5. Click "View raw config"
26+
27+
This will open your `mcp_config.json` file at:
28+
- **Windows**: `C:\Users\<USERNAME>\.gemini\antigravity\mcp_config.json`
29+
- **macOS/Linux**: `~/.gemini/antigravity/mcp_config.json`
30+
31+
#### Step 2: Add Configuration
32+
33+
Add the following to your `mcp_config.json`:
34+
35+
```json
36+
{
37+
"mcpServers": {
38+
"github": {
39+
"serverUrl": "https://api.githubcopilot.com/mcp/",
40+
"headers": {
41+
"Authorization": "Bearer YOUR_GITHUB_PAT"
42+
}
43+
}
44+
}
45+
}
46+
```
47+
48+
**Important**: Note that Antigravity uses `serverUrl` instead of `url` for HTTP-based MCP servers.
49+
50+
#### Step 3: Configure Your Token
51+
52+
Replace `YOUR_GITHUB_PAT` with your actual GitHub Personal Access Token.
53+
54+
Create a token here: https://github.com/settings/tokens
55+
56+
Recommended scopes:
57+
- `repo` - Full control of private repositories
58+
- `read:org` - Read org and team membership
59+
- `read:user` - Read user profile data
60+
61+
#### Step 4: Restart Antigravity
62+
63+
Close and reopen Antigravity for the changes to take effect.
64+
65+
#### Step 5: Verify Installation
66+
67+
1. Open the MCP Servers panel (... menu → MCP Servers)
68+
2. You should see "github" with a list of available tools
69+
3. You can now use GitHub tools in your conversations
70+
71+
> [!NOTE]
72+
> 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.
73+
74+
### Option 2: Local Docker Server
75+
76+
If you prefer running the server locally with Docker:
77+
78+
```json
79+
{
80+
"mcpServers": {
81+
"github": {
82+
"command": "docker",
83+
"args": [
84+
"run",
85+
"-i",
86+
"--rm",
87+
"-e",
88+
"GITHUB_PERSONAL_ACCESS_TOKEN",
89+
"ghcr.io/github/github-mcp-server"
90+
],
91+
"env": {
92+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
93+
}
94+
}
95+
}
96+
}
97+
```
98+
99+
**Requirements**:
100+
- Docker Desktop installed and running
101+
- Docker must be in your system PATH
102+
103+
## Troubleshooting
104+
105+
### "Error: serverUrl or command must be specified"
106+
107+
Make sure you're using `serverUrl` (not `url`) for the remote server configuration. Antigravity requires `serverUrl` for HTTP-based MCP servers.
108+
109+
### Server not appearing in MCP list
110+
111+
- Verify JSON syntax in your config file
112+
- Check that your PAT hasn't expired
113+
- Restart Antigravity completely
114+
115+
### Tools not working
116+
117+
- Ensure your PAT has the correct scopes
118+
- Check the MCP Servers panel for error messages
119+
- Verify internet connection for remote server
120+
121+
## Available Tools
122+
123+
Once installed, you'll have access to tools like:
124+
- `create_repository` - Create new GitHub repositories
125+
- `push_files` - Push files to repositories
126+
- `search_repositories` - Search for repositories
127+
- `create_or_update_file` - Manage file content
128+
- `get_file_contents` - Read file content
129+
- And many more...
130+
131+
For a complete list of available tools and features, see the [main README](../../README.md).
132+
133+
## Differences from Other IDEs
134+
135+
- **Configuration key**: Antigravity uses `serverUrl` instead of `url` for HTTP servers
136+
- **Config location**: `.gemini/antigravity/mcp_config.json` instead of `.cursor/mcp.json`
137+
- **Tool limits**: Antigravity recommends keeping total enabled tools under 50 for optimal performance
138+
139+
## Next Steps
140+
141+
- Explore the [Server Configuration Guide](../server-configuration.md) for advanced options
142+
- Check out [toolsets documentation](../../README.md#available-toolsets) to customize available tools
143+
- See the [Remote Server Documentation](../remote-server.md) for more details

docs/tool-renaming.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Tool Renaming Guide
2+
3+
How to safely rename MCP tools without breaking existing user configurations.
4+
5+
## Overview
6+
7+
When tools are renamed, users who have the old tool name in their MCP configuration (for example, in `X-MCP-Tools` headers for the remote MCP server or `--tools` flags for the local MCP server) would normally get errors.
8+
The deprecation alias system allows us to maintain backward compatibility by silently resolving old tool names to their new canonical names.
9+
10+
This allows us to rename tools safely, without introducing breaking changes for users that have a hard reference to those tools in their server configuration.
11+
12+
## Quick Steps
13+
14+
1. **Rename the tool** in your code (as usual, this will imply a range of changes like updating the tool registration, the tests and the toolsnaps).
15+
2. **Add a deprecation alias** in [pkg/github/deprecated_tool_aliases.go](../pkg/github/deprecated_tool_aliases.go):
16+
```go
17+
var DeprecatedToolAliases = map[string]string{
18+
"old_tool_name": "new_tool_name",
19+
}
20+
```
21+
3. **Update documentation** (README, etc.) to reference the new canonical name
22+
23+
That's it. The server will silently resolve old names to new ones. This will work across both local and remote MCP servers.
24+
25+
## Example
26+
27+
If renaming `get_issue` to `issue_read`:
28+
29+
```go
30+
var DeprecatedToolAliases = map[string]string{
31+
"get_issue": "issue_read",
32+
}
33+
```
34+
35+
A user with this configuration:
36+
```json
37+
{
38+
"--tools": "get_issue,get_file_contents"
39+
}
40+
```
41+
42+
Will get `issue_read` and `get_file_contents` tools registered, with no errors.

0 commit comments

Comments
 (0)