# Sugar [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/roboticforce/sugar  
**GitHub Stars:** 105  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sugar

## Description
Autonomous AI development system with persistent task queue and background execution

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "sugar": {
    "command": "uvx",
    "args": ["sugarai"]
  }
}
```

## Documentation

## What Sugar MCP server does

Sugar provides a local memory layer for AI coding agents. It separates project-specific knowledge from information that should apply everywhere: project memories live in `.sugar/memory.db`, while global memories live in `~/.sugar/memory.db`. Supported memory types include decisions, preferences, file context, error patterns, research, outcomes, and guidelines.

The memory layer is useful for retaining architecture choices, coding conventions, debugging patterns, research notes, and other context between sessions. Project results take priority during retrieval, while global guidelines retain reserved result slots so cross-project standards remain visible.

Sugar also includes an optional task queue. Tasks can be added from the command line and processed by an autonomous loop that uses the configured AI agent, runs tests, commits working changes, and continues until the queue is empty or stopped. Additional modes support staged orchestration and repeated attempts until tests pass.

## How it works

Sugar uses SQLite for both memory stores and performs semantic retrieval with sentence-transformers and sqlite-vec when the memory extra is installed. The default embedding model is `all-MiniLM-L6-v2`, producing 384-dimensional vectors. If those dependencies are unavailable, searches fall back to SQLite FTS5 and then to `LIKE` queries. Search is local and makes no external API calls.

MCP clients can call tools to search memories, save learnings, retrieve formatted context, obtain a project summary, and browse recent entries. MCP resources expose project context, coding preferences, and global guidelines. Global storage can also be selected explicitly when an agent saves a learning.

## Setup and configuration

Install Sugar with pipx, then initialize it inside a project:

```bash
pipx install sugarai
cd ~/dev/my-app
sugar init
```

For semantic search, install the optional memory dependencies:

```bash
pipx install 'sugarai[memory]'
```

Claude Code can register the memory endpoint with:

```bash
claude mcp add sugar -- sugar mcp memory
```

A separate task endpoint is available for Claude Code:

```bash
claude mcp add sugar-tasks -- sugar mcp tasks
```

Claude Desktop can use the same `sugar mcp memory` command through its MCP configuration. Goose supports the command as a command-line extension, and `sugar opencode setup` provides a one-command setup path for OpenCode.

## Tools and capabilities

The memory MCP interface includes:

- `search_memory` for searching project and global stores with scope labels.
- `store_learning` for saving knowledge, including global entries through `scope: "global"`.
- `recall` for returning formatted Markdown context for a topic.
- `get_project_context` for a full project summary with global guidelines.
- `list_recent_memories` for browsing recent entries by type.

The MCP resources are `sugar://project/context`, `sugar://preferences`, and `sugar://global/guidelines`.

From the command line, `sugar remember` stores entries and `sugar recall` retrieves them. The task queue uses `sugar add`, `sugar run`, `sugar list`, and `sugar status`. Tasks can be marked urgent, assigned a type, run through a four-stage research/plan/implement/review workflow, or configured for iterative execution with a maximum number of attempts.

Agent Skills included with Sugar cover memory use, task planning, quality review, and multi-step orchestration. These skills are distributed as folders containing `SKILL.md` instructions and evaluation data.

## Limitations and notes

Sugar is designed for local storage and offline operation, so memory remains on the machine rather than in a hosted service. Semantic retrieval requires the optional memory installation; the base installation uses keyword-oriented fallbacks. Memory entries have different retention periods: decisions, preferences, file context, and guidelines do not expire, while error patterns, research, and outcomes expire after 90, 60, and 30 days respectively.

The task queue is optional and depends on a configured AI agent. Autonomous issue resolution is also optional and can target labeled GitHub issues, implement fixes, run tests, and open pull requests for review.

_Full upstream README: https://allmcps.com/mcp/sugar/readme_

