You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1119,6 +1119,7 @@ The following sets of tools are available:
1119
1119
-`owner`: Repository owner (string, required)
1120
1120
-`pullNumber`: Pull request number (number, required)
1121
1121
-`repo`: Repository name (string, required)
1122
+
-`threadId`: The node ID of the review thread (e.g., PRRT_kwDOxxx). Required for resolve_thread and unresolve_thread methods. Get thread IDs from pull_request_read with method get_review_comments. (string, optional)
1122
1123
1123
1124
-**search_pull_requests** - Search pull requests
1124
1125
-**Required OAuth Scopes**: `repo`
@@ -1171,7 +1172,7 @@ The following sets of tools are available:
1171
1172
-`owner`: Repository owner (username or organization) (string, required)
1172
1173
-`path`: Path where to create/update the file (string, required)
1173
1174
-`repo`: Repository name (string, required)
1174
-
-`sha`: The blob SHA of the file being replaced. (string, optional)
1175
+
-`sha`: The blob SHA of the file being replaced. Required if the file already exists. (string, optional)
1175
1176
1176
1177
-**create_repository** - Create repository
1177
1178
-**Required OAuth Scopes**: `repo`
@@ -1241,9 +1242,12 @@ The following sets of tools are available:
1241
1242
-`author`: Author username or email address to filter commits by (string, optional)
1242
1243
-`owner`: Repository owner (string, required)
1243
1244
-`page`: Page number for pagination (min 1) (number, optional)
1245
+
-`path`: Only commits containing this file path will be returned (string, optional)
1244
1246
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1245
1247
-`repo`: Repository name (string, required)
1246
1248
-`sha`: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
1249
+
-`since`: Only commits after this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) (string, optional)
1250
+
-`until`: Only commits before this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) (string, optional)
1247
1251
1248
1252
-**list_releases** - List releases
1249
1253
-**Required OAuth Scopes**: `repo`
@@ -1536,6 +1540,34 @@ set the following environment variable:
1536
1540
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
1537
1541
```
1538
1542
1543
+
### Overriding Server Name and Title
1544
+
1545
+
The same override mechanism can be used to customize the MCP server's `name` and
1546
+
`title` fields in the initialization response. This is useful when running
1547
+
multiple GitHub MCP Server instances (e.g., one for github.com and one for
1548
+
GitHub Enterprise Server) so that agents can distinguish between them.
For example, to configure a server instance for GitHub Enterprise Server:
1556
+
1557
+
```json
1558
+
{
1559
+
"SERVER_NAME": "ghes-mcp-server",
1560
+
"SERVER_TITLE": "GHES MCP Server"
1561
+
}
1562
+
```
1563
+
1564
+
Or using environment variables:
1565
+
1566
+
```sh
1567
+
export GITHUB_MCP_SERVER_NAME="ghes-mcp-server"
1568
+
export GITHUB_MCP_SERVER_TITLE="GHES MCP Server"
1569
+
```
1570
+
1539
1571
## Library Usage
1540
1572
1541
1573
The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.
[Cline](https://github.com/cline/cline) is an AI coding assistant that runs in VS Code-compatible editors (VS Code, Cursor, Windsurf, etc.). For general setup information (prerequisites, Docker installation, security best practices), see the [Installation Guides README](./README.md).
4
+
5
+
## Remote Server
6
+
7
+
Cline stores MCP settings in `cline_mcp_settings.json`. To edit it, click the Cline icon in your editor's sidebar, open the menu in the top right corner of the Cline panel, and select **"MCP Servers"**. You can add a remote server through the **"Remote Servers"** tab, or click **"Configure MCP Servers"** to edit the JSON directly.
8
+
9
+
```json
10
+
{
11
+
"mcpServers": {
12
+
"github": {
13
+
"url": "https://api.githubcopilot.com/mcp/",
14
+
"type": "streamableHttp",
15
+
"disabled": false,
16
+
"headers": {
17
+
"Authorization": "Bearer <YOUR_GITHUB_PAT>"
18
+
},
19
+
"autoApprove": []
20
+
}
21
+
}
22
+
}
23
+
```
24
+
25
+
Replace `YOUR_GITHUB_PAT` with your [GitHub Personal Access Token](https://github.com/settings/tokens). To customize toolsets, add server-side headers like `X-MCP-Toolsets` or `X-MCP-Readonly` to the `headers` object — see [Server Configuration Guide](../server-configuration.md).
26
+
27
+
> **Important:** The transport type must be `"streamableHttp"` (camelCase, no hyphen). Using `"streamable-http"` or omitting the type will cause Cline to fall back to SSE, resulting in a `405` error.
28
+
29
+
## Local Server (Docker)
30
+
31
+
1. Click the Cline icon in your editor's sidebar (or open the command palette and search for "Cline"), then click the **MCP Servers** icon (server stack icon at the top of the Cline panel), and click **"Configure MCP Servers"** to open `cline_mcp_settings.json`.
32
+
2. Add the configuration below, replacing `YOUR_GITHUB_PAT` with your [GitHub Personal Access Token](https://github.com/settings/tokens).
33
+
34
+
```json
35
+
{
36
+
"mcpServers": {
37
+
"github": {
38
+
"command": "docker",
39
+
"args": [
40
+
"run", "-i", "--rm",
41
+
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
42
+
"ghcr.io/github/github-mcp-server"
43
+
],
44
+
"env": {
45
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
46
+
}
47
+
}
48
+
}
49
+
}
50
+
```
51
+
52
+
## Troubleshooting
53
+
54
+
-**SSE error 405 with remote server**: Ensure `"type"` is set to `"streamableHttp"` (camelCase, no hyphen) in `cline_mcp_settings.json`. Using `"streamable-http"` or omitting `"type"` causes Cline to fall back to SSE, which this server does not support.
55
+
-**Authentication failures**: Verify your PAT has the required scopes
56
+
-**Docker issues**: Ensure Docker Desktop is installed and running
[Roo Code](https://github.com/RooCodeInc/Roo-Code) is an AI coding assistant that runs in VS Code-compatible editors (VS Code, Cursor, Windsurf, etc.). For general setup information (prerequisites, Docker installation, security best practices), see the [Installation Guides README](./README.md).
4
+
5
+
## Remote Server
6
+
7
+
### Step-by-step setup
8
+
9
+
1. Click the **Roo Code icon** in your editor's sidebar to open the Roo Code pane
10
+
2. Click the **gear icon** (⚙️) in the top navigation of the Roo Code pane, then click on **"MCP Servers"** icon on the left.
11
+
3. Scroll to the bottom and click **"Edit Global MCP"** (for all projects) or **"Edit Project MCP"** (for the current project only)
12
+
4. Add the configuration below to the opened file (`mcp_settings.json` or `.roo/mcp.json`)
13
+
5. Replace `YOUR_GITHUB_PAT` with your [GitHub Personal Access Token](https://github.com/settings/tokens)
14
+
6. Save the file — the server should connect automatically
15
+
16
+
```json
17
+
{
18
+
"mcpServers": {
19
+
"github": {
20
+
"type": "streamable-http",
21
+
"url": "https://api.githubcopilot.com/mcp/",
22
+
"headers": {
23
+
"Authorization": "Bearer YOUR_GITHUB_PAT"
24
+
}
25
+
}
26
+
}
27
+
}
28
+
```
29
+
30
+
> **Important:** The `type` must be `"streamable-http"` (with hyphen). Using `"http"` or omitting the type will fail.
31
+
32
+
To customize toolsets, add server-side headers like `X-MCP-Toolsets` or `X-MCP-Readonly` to the `headers` object — see [Server Configuration Guide](../server-configuration.md).
33
+
34
+
## Local Server (Docker)
35
+
36
+
```json
37
+
{
38
+
"mcpServers": {
39
+
"github": {
40
+
"command": "docker",
41
+
"args": [
42
+
"run", "-i", "--rm",
43
+
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
44
+
"ghcr.io/github/github-mcp-server"
45
+
],
46
+
"env": {
47
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
48
+
}
49
+
}
50
+
}
51
+
}
52
+
```
53
+
54
+
## Troubleshooting
55
+
56
+
-**Connection failures**: Ensure `type` is `streamable-http`, not `http`
57
+
-**Authentication failures**: Verify PAT is prefixed with `Bearer ` in the `Authorization` header
58
+
-**Docker issues**: Ensure Docker Desktop is running
| Server Name/Title | Not available |`GITHUB_MCP_SERVER_NAME` / `GITHUB_MCP_SERVER_TITLE` env vars or `github-mcp-server-config.json`|
18
19
19
20
> **Default behavior:** If you don't specify any configuration, the server uses the **default toolsets**: `context`, `issues`, `pull_requests`, `repos`, `users`.
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/create_or_update_file.snap
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"annotations": {
3
3
"title": "Create or update file"
4
4
},
5
-
"description": "Create or update a single file in a GitHub repository. \nIf updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.\n\nIn order to obtain the SHA of original file version before updating, use the following git command:\ngit ls-tree HEAD \u003cpath to file\u003e\n\nIf the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.\n",
5
+
"description": "Create or update a single file in a GitHub repository. \nIf updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.\n\nIn order to obtain the SHA of original file version before updating, use the following git command:\ngit rev-parse \u003cbranch\u003e:\u003cpath to file\u003e\n\nSHA MUST be provided for existing file updates.\n",
6
6
"inputSchema": {
7
7
"properties": {
8
8
"branch": {
@@ -30,7 +30,7 @@
30
30
"type": "string"
31
31
},
32
32
"sha": {
33
-
"description": "The blob SHA of the file being replaced.",
33
+
"description": "The blob SHA of the file being replaced. Required if the file already exists.",
0 commit comments