Skip to content

Commit 8a54ab3

Browse files
authored
Merge branch 'main' into copilot/replace-go-github-mock-again
2 parents 5259e27 + 637819a commit 8a54ab3

File tree

4 files changed

+187
-0
lines changed

4 files changed

+187
-0
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

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)