mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-18 22:54:24 +01:00
docs: update github mcp config (#3433)
Co-authored-by: Rizel Scarlett <rizel@squareup.com>
This commit is contained in:
@@ -10,67 +10,295 @@ import CLIExtensionInstructions from '@site/src/components/CLIExtensionInstructi
|
|||||||
|
|
||||||
<YouTubeShortEmbed videoUrl="https://www.youtube.com/embed/TbmQDv3SQOE" />
|
<YouTubeShortEmbed videoUrl="https://www.youtube.com/embed/TbmQDv3SQOE" />
|
||||||
|
|
||||||
This tutorial covers how to add the [GitHub MCP Server](https://github.com/modelcontextprotocol/servers/tree/main/src/github) as a Goose extension to enable file operations, repository management, search functionality, and more.
|
This tutorial covers how to add the [GitHub MCP Server](https://github.com/github/github-mcp-server) as a Goose extension to enable file operations, repository management, search functionality, and more.
|
||||||
|
|
||||||
:::tip TLDR
|
:::tip TLDR
|
||||||
<Tabs groupId="interface">
|
<Tabs groupId="interface">
|
||||||
<TabItem value="ui" label="Goose Desktop" default>
|
<TabItem value="ui" label="Goose Desktop" default>
|
||||||
[Launch the installer](goose://extension?cmd=npx&arg=-y&arg=%40modelcontextprotocol%2Fserver-github&id=github&name=GitHub&description=GitHub%20API&env=GITHUB_PERSONAL_ACCESS_TOKEN%3DGitHub%20Personal%20Access%20Token)
|
Use `Add custom extension` in Settings → Extensions to add a `Streamable HTTP` extension type with:
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="cli" label="Goose CLI">
|
<TabItem value="cli" label="Goose CLI">
|
||||||
**Command**
|
Use `goose configure` to add a `Remote Extension (Streaming HTTP)` extension type with:
|
||||||
```sh
|
|
||||||
npx -y @modelcontextprotocol/server-github
|
|
||||||
```
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
**Environment Variable**
|
**Endpoint URL**
|
||||||
```
|
```
|
||||||
GITHUB_PERSONAL_ACCESS_TOKEN: <YOUR_TOKEN>
|
https://api.githubcopilot.com/mcp/
|
||||||
|
```
|
||||||
|
**Custom Request Header**
|
||||||
|
```
|
||||||
|
Authorization: Bearer <YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
These steps configure the Remote MCP Server. For other deployment options, see the [official GitHub MCP Server documentation](https://github.com/github/github-mcp-server).
|
||||||
:::info
|
|
||||||
Note that you'll need [Node.js](https://nodejs.org/) installed on your system to run this command, as it uses `npx`.
|
|
||||||
:::
|
|
||||||
|
|
||||||
<Tabs groupId="interface">
|
<Tabs groupId="interface">
|
||||||
<TabItem value="ui" label="Goose Desktop" default>
|
<TabItem value="ui" label="Goose Desktop" default>
|
||||||
1. [Launch the installer](goose://extension?cmd=npx&arg=-y&arg=%40modelcontextprotocol%2Fserver-github&id=github&name=GitHub&description=GitHub%20API&env=GITHUB_PERSONAL_ACCESS_TOKEN%3DGitHub%20Personal%20Access%20Token)
|
1. Obtain a [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens)
|
||||||
2. Press `Yes` to confirm the installation
|
2. Click the gear icon `⚙️` in the top right corner
|
||||||
3. Obtain a [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens) and paste it in
|
3. Click `Advanced settings`
|
||||||
4. Click `Save Configuration`
|
4. Under `Extensions`, click `Add custom extension`
|
||||||
5. Scroll to the top and click `Exit` from the upper left corner
|
5. On the `Add custom extension` modal, enter the following:
|
||||||
|
- **Extension Name**: GitHub
|
||||||
|
- **Type**: Streamable HTTP
|
||||||
|
- **Endpoint**: `https://api.githubcopilot.com/mcp/`
|
||||||
|
- **Request Headers**:
|
||||||
|
- **Header name**: `Authorization`
|
||||||
|
- **Value**: `Bearer <YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>`
|
||||||
|
6. Click `+ Add` to save the header
|
||||||
|
7. Click `Add Extension` to save the extension
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="cli" label="Goose CLI">
|
<TabItem value="cli" label="Goose CLI">
|
||||||
|
1. Run the `configure` command:
|
||||||
|
```sh
|
||||||
|
goose configure
|
||||||
|
```
|
||||||
|
|
||||||
<CLIExtensionInstructions
|
2. Choose to add a `Remote Extension (Streaming HTTP)`
|
||||||
name="github"
|
```sh
|
||||||
command="npx -y @modelcontextprotocol/server-github"
|
┌ goose-configure
|
||||||
timeout={300}
|
│
|
||||||
envVars={[
|
◇ What would you like to configure?
|
||||||
{ key: "GITHUB_TOKEN", value: "••••••••••••••••" }
|
│ Add Extension
|
||||||
]}
|
│
|
||||||
infoNote={
|
◆ What type of extension would you like to add?
|
||||||
<>
|
│ ○ Built-in Extension
|
||||||
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.{" "}
|
│ ○ Command-line Extension (Run a local command or script)
|
||||||
<a
|
│ ○ Remote Extension (SSE)
|
||||||
href="https://github.com/settings/personal-access-tokens"
|
// highlight-start
|
||||||
target="_blank"
|
│ ● Remote Extension (Streaming HTTP)
|
||||||
rel="noopener noreferrer"
|
// highlight-end
|
||||||
>
|
└
|
||||||
Create one here
|
```
|
||||||
</a>.
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
3. Give your extension a name
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Enter the Streaming HTTP endpoint URI
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Set the timeout
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
◇ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Please set the timeout for this tool (in secs):
|
||||||
|
│ 300
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Choose whether to add a description
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
◇ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ 300
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Add a custom header for authentication
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
◇ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ 300
|
||||||
|
│
|
||||||
|
◇ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Would you like to add custom headers?
|
||||||
|
│ Yes
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
8. Enter the Authorization header
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
◇ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ 300
|
||||||
|
│
|
||||||
|
◇ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
│
|
||||||
|
◇ Would you like to add custom headers?
|
||||||
|
│ Yes
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Header name:
|
||||||
|
│ Authorization
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
9. Enter your [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens)
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
◇ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ 300
|
||||||
|
│
|
||||||
|
◇ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
│
|
||||||
|
◇ Would you like to add custom headers?
|
||||||
|
│ Yes
|
||||||
|
│
|
||||||
|
◇ Header name:
|
||||||
|
│ Authorization
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Header value:
|
||||||
|
│ Bearer ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
// highlight-end
|
||||||
|
└
|
||||||
|
```
|
||||||
|
|
||||||
|
10. Choose not to add another header
|
||||||
|
```sh
|
||||||
|
┌ goose-configure
|
||||||
|
│
|
||||||
|
◇ What would you like to configure?
|
||||||
|
│ Add Extension
|
||||||
|
│
|
||||||
|
◇ What type of extension would you like to add?
|
||||||
|
│ Remote Extension (Streaming HTTP)
|
||||||
|
│
|
||||||
|
◇ What would you like to call this extension?
|
||||||
|
│ github
|
||||||
|
│
|
||||||
|
◇ What is the Streaming HTTP endpoint URI?
|
||||||
|
│ https://api.githubcopilot.com/mcp/
|
||||||
|
│
|
||||||
|
◇ Please set the timeout for this tool (in secs):
|
||||||
|
│ 100
|
||||||
|
│
|
||||||
|
◇ Would you like to add a description?
|
||||||
|
│ No
|
||||||
|
│
|
||||||
|
◇ Would you like to add custom headers?
|
||||||
|
│ Yes
|
||||||
|
│
|
||||||
|
◇ Header name:
|
||||||
|
│ Authorization
|
||||||
|
│
|
||||||
|
◇ Header value:
|
||||||
|
│ Bearer ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
│
|
||||||
|
// highlight-start
|
||||||
|
◆ Add another header?
|
||||||
|
│ No
|
||||||
|
│
|
||||||
|
// highlight-end
|
||||||
|
└ Added github extension
|
||||||
|
```
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
When creating my [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens), I gave it the following access:
|
When creating my [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens), I gave it the following access:
|
||||||
|
|||||||
Reference in New Issue
Block a user