diff --git a/documentation/docs/assets/guides/custom-extension-settings.png b/documentation/docs/assets/guides/custom-extension-settings.png deleted file mode 100644 index ddc16399be85..000000000000 Binary files a/documentation/docs/assets/guides/custom-extension-settings.png and /dev/null differ diff --git a/documentation/docs/tutorials/custom-extensions.md b/documentation/docs/tutorials/custom-extensions.md index 176b23939aa4..bca16fec101e 100644 --- a/documentation/docs/tutorials/custom-extensions.md +++ b/documentation/docs/tutorials/custom-extensions.md @@ -3,6 +3,8 @@ title: Building Custom Extensions description: Create your own custom MCP Server to use as a Goose extension --- +import { PanelLeft } from 'lucide-react'; + # Building Custom Extensions with Goose @@ -28,15 +30,12 @@ The first step is to create a new project using [uv][uv-docs]. We will name our Run the following commands in your terminal to set up a basic structure for your MCP server: ```bash -uv init mcp-wiki - +uv init --lib mcp-wiki cd mcp-wiki -rm hello.py mkdir -p src/mcp_wiki -touch src/mcp_wiki/server.py # Your MCP server code (tool, resources, prompts) -touch src/mcp_wiki/__init__.py # Primary CLI entry point -touch src/mcp_wiki/__main__.py # To enable running as a Python module +touch src/mcp_wiki/server.py +touch src/mcp_wiki/__main__.py ``` Your project directory structure should look like this: @@ -47,9 +46,10 @@ Your project directory structure should look like this: ├── pyproject.toml ├── src │ └── mcp_wiki -│ ├── __init__.py -│ ├── __main__.py -│ └── server.py +│ ├── __init__.py # Primary CLI entry point +│ ├── __main__.py # To enable running as a Python module +│ ├── py.typed # Indicates the package supports type hints +│ └── server.py # Your MCP server code (tool, resources, prompts) └── uv.lock ``` @@ -247,24 +247,26 @@ build-backend = "hatchling.build" To add your MCP server as an extension in Goose: -1. Go to `Settings > Extensions > Add`. -2. Set the `Type` to `StandardIO`. -3. Provide the ID, name, and description for your extension. -4. In the `Command` field, provide the absolute path to your executable. For example: +1. Click the button in the top-left to open the sidebar +2. Click `Extensions` in the sidebar +3. Set the `Type` to `STDIO` +4. Provide a name and description for your extension +5. In the `Command` field, provide the absolute path to your executable: ```plaintext uv run /full/path/to/mcp-wiki/.venv/bin/mcp-wiki ``` -Alternatively in Step 3, you can also publish your package to pypi. Once published, the server can be run directly using uvx. For example: + For example: + ```plaintext + uv run /Users/smohammed/Development/mcp/mcp-wiki/.venv/bin/mcp-wiki + ``` + +For the purposes on this guide, we'll run the local version. Alternatively, you can publish your package to PyPI. Once published, the server can be run directly using `uvx`. For example: ``` uvx mcp-wiki ``` -For the purposes on this guide, we will show you how to run the local version.  - -![Goose Settings for Adding Custom Extension](../assets/guides/custom-extension-settings.png) - --- ## Step 6: Use Your Extension in Goose