From 6add3d7846050723d4646013ab296391bb1f5a82 Mon Sep 17 00:00:00 2001 From: Angie Jones Date: Sun, 2 Feb 2025 17:56:18 -0600 Subject: [PATCH] docs: added tutorial template (#1036) --- documentation/docs/tutorials/_template_.md | 155 +++++++++++++++++++++ documentation/docs/tutorials/github-mcp.md | 6 +- 2 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 documentation/docs/tutorials/_template_.md diff --git a/documentation/docs/tutorials/_template_.md b/documentation/docs/tutorials/_template_.md new file mode 100644 index 0000000000..01beb8cbf2 --- /dev/null +++ b/documentation/docs/tutorials/_template_.md @@ -0,0 +1,155 @@ +--- +title: {name} Extension +description: Add {name} MCP Server as a Goose Extension +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + +This tutorial covers how to add the [{name} MCP Server](/) as a Goose extension to enable file operations, repository management, search functionality, and more. + + +:::tip TLDR + +**Command** +```sh +{command} +``` + +**Environment Variable** +``` +{env_var}: +``` +::: + +## Configuration + + + + 1. Run the `configure` command: + ```sh + goose configure + ``` + + 2. Choose to add a `Command-line Extension` + ```sh + ┌ goose-configure + │ + ◇ What would you like to configure? + │ Add Extension + │ + ◆ What type of extension would you like to add? + │ ○ Built-in Extension + // highlight-start + │ ● Command-line Extension (Run a local command or script) + // highlight-end + │ ○ Remote Extension + └ + ``` + + 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? + │ Command-line Extension + │ + // highlight-start + ◆ What would you like to call this extension? + │ {name} + // highlight-end + └ + ``` + + 4. Enter the command + ```sh + ┌ goose-configure + │ + ◇ What would you like to configure? + │ Add Extension + │ + ◇ What type of extension would you like to add? + │ Command-line Extension + │ + ◇ What would you like to call this extension? + │ {name} + │ + // highlight-start + ◆ What command should be run? + │ {command} + // highlight-end + └ + ``` + + 5. Obtain a [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens) and paste it in. + :::info + When creating your access token, you can specify the repositories and granular permissions you'd like Goose to have access to. + ::: + + ```sh + ┌ goose-configure + │ + ◇ What would you like to configure? + │ Add Extension + │ + ◇ What type of extension would you like to add? + │ Command-line Extension + │ + ◇ What would you like to call this extension? + │ {name}} + │ + ◇ What command should be run? + │ {command}} + // highlight-start + ◆ Would you like to add environment variables? + │ Yes + │ + ◇ Environment variable name: + │ {env_var} + │ + ◇ Environment variable value: + │ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ + │ + ◇ Add another environment variable? + │ No + // highlight-end + └ Added github extension + ``` + + + + 1. Click `...` in the upper right corner + 2. Click `Settings` + 3. On `Extensions` section, click the `Add` link + 4. On the `Add Extension Manually` modal, enter the following: + * **Type**: `Standard IO` + * **ID**: `{name}-mcp` (_set this to whatever you want_) + * **Name**: `{name}` (_set this to whatever you want_) + * **Description**: `{name} MCP Server` (_set this to whatever you want_) + * **Command**: `{command}` + * **Environment Variables** + * **Name**: `{env_var}` + * **Value**: (_Obtain a [{env_var}](/) and paste it in._) + * Click `Add` button + 5. Click `Add Extension` button + + + +## Example Usage + +{describe any environment setup, access controls, and what you want to accomplish.} + +### Goose Prompt +``` +{exact prompt}. +``` + +### Goose Output + +``` +{exact output} +``` \ No newline at end of file diff --git a/documentation/docs/tutorials/github-mcp.md b/documentation/docs/tutorials/github-mcp.md index 090623ba30..72c796ea8c 100644 --- a/documentation/docs/tutorials/github-mcp.md +++ b/documentation/docs/tutorials/github-mcp.md @@ -19,7 +19,7 @@ npx -y @modelcontextprotocol/server-github **Environment Variable** ``` -"GITHUB_PERSONAL_ACCESS_TOKEN": "" +GITHUB_PERSONAL_ACCESS_TOKEN: ``` ::: @@ -149,12 +149,12 @@ When creating my [GitHub Personal Access Token](https://github.com/settings/pers * Read access to metadata * Read and Write access to code, commit status, issues, and pull requests -**Goose Prompt** +### 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. ``` -**Output** +### 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: