Sugar Extension
This tutorial covers how to add the Sugar MCP Server as a goose extension to delegate development tasks to an autonomous AI system that runs in the background.
- goose Desktop
- goose CLI
When prompted, set SUGAR_PROJECT_ROOT to your project path.
Command
npx -y sugarai-mcp
Runs in your current directory by default.
Configuration
Note that you'll need Node.js installed on your system to run this command, as it uses npx.
Sugar requires Python 3.11+ and the Sugar CLI installed in your project. Install with pip install sugarai and initialize with sugar init.
- goose Desktop
- goose CLI
- Launch the installer
- Click
Yesto confirm the installation - Set SUGAR_PROJECT_ROOT to your project directory (/path/to/your/project), or Sugar will use the current working directory
- Click
Add Extension - Click the button in the top-left to open the sidebar
- Navigate to the chat
- Run the
configurecommand:
goose configure
- Choose to add a
Command-line Extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ● Command-line Extension (Run a local command or script)
│ ○ Remote Extension (SSE)
│ ○ Remote Extension (Streaming HTTP)
└
- Give your extension a name.
┌ 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?
│ Sugar
└
- Enter the command to run when this extension is used.
┌ 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?
│ Sugar
│
◆ What command should be run?
│ npx -y sugarai-mcp
└
- Enter the number of seconds Goose should wait for actions to complete before timing out. Default is
300seconds.
┌ 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?
│ Sugar
│
◇ What command should be run?
│ npx -y sugarai-mcp
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- Enter a description for this extension.
┌ 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?
│ Sugar
│
◇ What command should be run?
│ npx -y sugarai-mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Enter a description for this extension:
│ Autonomous AI development system - delegate tasks and run 24/7
└
- Add an environment variable for this extension.
┌ 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?
│ Sugar
│
◇ What command should be run?
│ npx -y sugarai-mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Enter a description for this extension:
│ Autonomous AI development system - delegate tasks and run 24/7
│
◆ Would you like to add environment variables?
│ Yes
│
◇ Environment variable name:
│ SUGAR_PROJECT_ROOT
│
◇ Environment variable value:
│ /path/to/your/project
│
◇ Add another environment variable?
│ No
│
└ Added Sugar extension
Example Usage
Sugar lets you delegate development tasks to an autonomous AI that works in the background. Tasks are queued and executed independently, so you can continue working while Sugar handles them.
- goose Desktop
- goose CLI
- Open a new session in goose Desktop
- Open a terminal and start a new goose session:
goose session
goose Prompt
Create a task to add input validation to the user registration form. Priority 4.
goose Output
I'll create a Sugar task for adding input validation to the user registration form.
-------- createTask -------
Task created successfully:
- ID: a1b2c3d4-5678-90ab-cdef-ghijklmnopqr
- Title: Add input validation to the user registration form
- Type: feature
- Priority: P4 (High)
- Status: pending
The task has been queued. Sugar will pick it up and work on it autonomously. You can check the status anytime with getStatus or listTasks.
Available Tools
Sugar exposes the following tools through MCP:
| Tool | Description |
|---|---|
createTask | Create a new development task |
listTasks | List tasks with optional filtering |
viewTask | View detailed task information |
updateTask | Update task properties |
removeTask | Remove a task from the queue |
getStatus | Get system status and metrics |
runOnce | Execute one autonomous development cycle |
initSugar | Initialize Sugar in a project |