What are Extensions?
Extensions are MCP servers that provide:- Tools - Functions the agent can call (e.g., read files, search web, query databases)
- Resources - Data sources the agent can access
- Prompts - Reusable prompt templates
Builtin Extensions
Builtin extensions are implemented incrates/goose-mcp/src/:
- autovisualiser - Automatic visualization generation
- computercontroller - Desktop automation (keyboard, mouse)
- memory - Long-term memory storage
- tutorial - Interactive tutorials
Extension Architecture
Extensions communicate with Goose using the MCP protocol over stdio. Each extension:- Implements the MCP server specification
- Exposes tools/resources/prompts via MCP methods
- Receives requests from the agent
- Returns results in MCP format
Creating a Builtin Extension
1. Define Your Extension
Create a new module incrates/goose-mcp/src/:
2. Register the Extension
Add tocrates/goose-mcp/src/lib.rs:
3. Use the Extension
In your goose configuration or code:Creating an External Extension
External extensions are standalone executables that implement the MCP server protocol.Using Python (FastMCP)
FastMCP makes it easy to build MCP servers in Python:my_extension.py and configure in Goose:
Using TypeScript (MCP SDK)
Using Rust (RMCP)
Create a standalone Rust binary:Tool Design Best Practices
1. Clear Descriptions
Provide clear, concise descriptions:2. Well-Defined Schemas
Use JSON Schema to define parameters:3. Error Handling
Return clear error messages:4. Atomic Operations
Each tool should do one thing well. Split complex operations into multiple tools.5. Idempotency
When possible, make tools idempotent - they can be called multiple times with the same result.Testing Extensions
Using MCP Inspector
Test your extension with the MCP Inspector:Integration Tests
Write integration tests:Extension Configuration
Extensions can be configured via:Environment Variables
Extension Config
Resources and Prompts
Implementing Resources
Implementing Prompts
Next Steps
- Learn about the MCP Protocol
- Understand Tool Creation
- See Provider Development