mirror of
https://github.com/block/goose.git
synced 2026-04-30 12:39:36 +00:00
Reorganizing tutorials (#3028)
This commit is contained in:
parent
6dbb4737f8
commit
0c81198ac4
65 changed files with 231 additions and 79 deletions
|
|
@ -1,136 +0,0 @@
|
|||
---
|
||||
title: GitHub Extension
|
||||
description: Add GitHub MCP Server as a Goose Extension
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import YouTubeShortEmbed from '@site/src/components/YouTubeShortEmbed';
|
||||
import CLIExtensionInstructions from '@site/src/components/CLIExtensionInstructions';
|
||||
|
||||
<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.
|
||||
|
||||
:::tip TLDR
|
||||
<Tabs groupId="interface">
|
||||
<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)
|
||||
</TabItem>
|
||||
<TabItem value="cli" label="Goose CLI">
|
||||
**Command**
|
||||
```sh
|
||||
npx -y @modelcontextprotocol/server-github
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
**Environment Variable**
|
||||
```
|
||||
GITHUB_PERSONAL_ACCESS_TOKEN: <YOUR_TOKEN>
|
||||
```
|
||||
:::
|
||||
|
||||
## Configuration
|
||||
|
||||
:::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">
|
||||
<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)
|
||||
2. Press `Yes` to confirm the installation
|
||||
3. Obtain a [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens) and paste it in
|
||||
4. Click `Save Configuration`
|
||||
5. Scroll to the top and click `Exit` from the upper left corner
|
||||
</TabItem>
|
||||
<TabItem value="cli" label="Goose CLI">
|
||||
|
||||
<CLIExtensionInstructions
|
||||
name="github"
|
||||
command="npx -y @modelcontextprotocol/server-github"
|
||||
timeout={300}
|
||||
envVars={[
|
||||
{ key: "GITHUB_TOKEN", value: "••••••••••••••••" }
|
||||
]}
|
||||
infoNote={
|
||||
<>
|
||||
When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to.{" "}
|
||||
<a
|
||||
href="https://github.com/settings/personal-access-tokens"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Create one here
|
||||
</a>.
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Example Usage
|
||||
|
||||
When creating my [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens), I gave it the following access:
|
||||
* Repository: [goose-demo](https://github.com/angiejones/goose-demo)
|
||||
* Read access to metadata
|
||||
* Read and Write access to code, commit status, issues, and pull requests
|
||||
|
||||
### Goose Prompt
|
||||
```
|
||||
create a new branch called hello-world in my angiejones/goose-demo repository. Update the README.md file to say "this was written by goose" and commit it. Open a pull request with your changes.
|
||||
```
|
||||
|
||||
### Goose Output
|
||||
|
||||
```
|
||||
I'll help you create a new branch, update the README, and open a pull request. Let me break this down into steps:
|
||||
|
||||
1. First, let's create the new branch called "hello-world" in your repository
|
||||
2. Then update the README.md file
|
||||
3. Finally, create a pull request
|
||||
|
||||
Let me execute these steps:
|
||||
|
||||
1. Creating the new branch:
|
||||
|
||||
─── create_branch | github ──────────────────────────
|
||||
branch: hello-world
|
||||
owner: angiejones
|
||||
repo: goose-demo
|
||||
|
||||
2. Now, updating the README.md file in the new branch:
|
||||
|
||||
─── create_or_update_file | github ──────────────────────────
|
||||
branch: hello-world
|
||||
content: this was written by goose
|
||||
message: Update README.md with Goose message
|
||||
owner: angiejones
|
||||
path: README.md
|
||||
repo: goose-demo
|
||||
|
||||
|
||||
|
||||
3. Finally, creating the pull request:
|
||||
|
||||
─── create_pull_request | github ──────────────────────────
|
||||
base: main
|
||||
body: ...
|
||||
head: hello-world
|
||||
owner: angiejones
|
||||
repo: goose-demo
|
||||
title: Update README.md
|
||||
|
||||
|
||||
|
||||
Great! I've completed all the requested tasks:
|
||||
1. Created a new branch called "hello-world"
|
||||
2. Updated the README.md file with the text "this was written by goose"
|
||||
3. Created a pull request to merge these changes into the main branch
|
||||
|
||||
You can view the pull request at: https://github.com/angiejones/goose-demo/pull/1
|
||||
|
||||
The pull request is now ready for your review. Would you like me to do anything else with it?
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue