Back to Goose

Sugar Extension

documentation/docs/mcp/sugar-mcp.mdx

1.33.14.0 KB
Original Source

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CLIExtensionInstructions from '@site/src/components/CLIExtensionInstructions'; import GooseDesktopInstaller from '@site/src/components/GooseDesktopInstaller';

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.

:::tip Quick Install <Tabs groupId="interface"> <TabItem value="ui" label="goose Desktop" default> Launch the installer

When prompted, set SUGAR_PROJECT_ROOT to your project path. </TabItem> <TabItem value="cli" label="goose CLI"> Command

sh
npx -y sugarai-mcp

Runs in your current directory by default. </TabItem> </Tabs> :::

Configuration

:::info Note that you'll need Node.js installed on your system to run this command, as it uses npx. :::

:::info Sugar requires Python 3.11+ and the Sugar CLI installed in your project. Install with pip install sugarai and initialize with sugar init. :::

<Tabs groupId="interface"> <TabItem value="ui" label="goose Desktop" default> <GooseDesktopInstaller extensionId="sugar" extensionName="Sugar" description="Autonomous AI development system - delegate tasks and run 24/7" command="npx" args={["-y", "sugarai-mcp"]} timeout={300} customStep3="Set SUGAR_PROJECT_ROOT to your project directory (/path/to/your/project), or Sugar will use the current working directory" envVars={[ { name: "SUGAR_PROJECT_ROOT", label: "Project directory (optional, defaults to current)" } ]} /> </TabItem> <TabItem value="cli" label="goose CLI"> <CLIExtensionInstructions name="Sugar" description="Autonomous AI development system - delegate tasks and run 24/7" command="npx -y sugarai-mcp" envVars={[ { key: "SUGAR_PROJECT_ROOT", value: "/path/to/your/project" } ]} infoNote={ <> Set SUGAR_PROJECT_ROOT to your project directory, or Sugar will use the current working directory. </> } /> </TabItem> </Tabs>

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.

<Tabs groupId="interface"> <TabItem value="ui" label="goose Desktop" default> 1. Open a new session in goose Desktop </TabItem> <TabItem value="cli" label="goose CLI">
  1. Open a terminal and start a new goose session:
sh
goose session
</TabItem> </Tabs>

goose Prompt

Create a task to add input validation to the user registration form. Priority 4.

goose Output

:::note Desktop

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:

ToolDescription
createTaskCreate a new development task
listTasksList tasks with optional filtering
viewTaskView detailed task information
updateTaskUpdate task properties
removeTaskRemove a task from the queue
getStatusGet system status and metrics
runOnceExecute one autonomous development cycle
initSugarInitialize Sugar in a project