Skip to main content
Extensions are how you add custom functionality to goose. By implementing a Model Context Protocol (MCP) server, you can provide tools, resources, and prompts that agents can discover and use.

Extension Types

Goose supports several types of extensions:

Tools

Functions the agent can call (e.g., API integrations, file operations)

Resources

Data sources the agent can read (e.g., databases, documentation)

Prompts

Pre-defined prompt templates for common tasks

OAuth Apps

Extensions with authentication flows for third-party services

Quick Start: Python MCP Server

The fastest way to create an extension is using FastMCP, a Python framework for MCP servers.

Installation

Basic Server

Create my_tools.py:

Register with Goose

Add to ~/.config/goose/config.yaml:

Test the Extension

In the session:

Tool Design Best Practices

1. Clear Descriptions

Provide detailed descriptions so the agent understands when to use your tool:
Good descriptions improve agent accuracy. Include:
  • What the tool does
  • When to use it
  • What parameters mean
  • What the return value represents

2. Type Safety

Use type hints for automatic schema generation:

3. Error Handling

Provide clear error messages:

4. Idempotency

Make tools safe to retry:

Resources

Resources provide read access to data:
Resources use URI patterns for identification. The agent can discover and read them as needed.

Prompts

Prompts are reusable templates:
Provide specific, actionable feedback. """
Save as my-tools.ts and register:

Rust MCP Server

For performance-critical extensions in Rust:
See the Tool Creation guide for more Rust examples.

Testing Your Extension

Manual Testing

Test your MCP server standalone:
Then send JSON-RPC messages via stdin:

MCP Inspector

Use the MCP Inspector for interactive testing:
This opens a web UI where you can:
  • View available tools
  • Test tool calls
  • Inspect request/response formats

Integration Testing

Test with goose:
Enable debug logging to see tool calls:

Distribution

PyPI Package

Publish your Python extension:
Users can install:
And configure:

npm Package

For TypeScript extensions:
Users install:

Next Steps

Extension Development

In-depth extension development guide

MCP Protocol

Learn the Model Context Protocol specification

Tool Creation

Best practices for designing tools

Built-in Extensions

Study built-in extension implementations