Skip to main content

SETUP

Constant SETUP 

Source
pub const SETUP: &str = r#"
## MCP Server Configuration

Subcog exposes tools and resources via the Model Context Protocol (MCP).

### Claude Desktop Setup

Add to `~/.config/claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "subcog": {
      "command": "subcog",
      "args": ["serve"]
    }
  }
}
```

### Claude Code Plugin Setup

Add to `~/.claude/settings.json`:

```json
{
  "mcpServers": {
    "subcog": {
      "command": "subcog",
      "args": ["serve"]
    }
  }
}
```

### Configuration File

Create `~/.config/subcog/config.toml`:

```toml
# Default data_dir is ~/.config/subcog; override if desired.
data_dir = "~/.config/subcog"

[features]
secrets_filter = true
pii_filter = false
auto_capture = true
```

## Available MCP Tools

Once configured, these tools are available:

| Tool | Description |
|------|-------------|
| `subcog_capture` | Capture a memory |
| `subcog_recall` | Search memories |
| `subcog_status` | Check system status |
| `subcog_namespaces` | List memory namespaces |
| `subcog_consolidate` | Consolidate memories (LLM) |
| `subcog_enrich` | Enrich a memory (LLM) |
| `subcog_reindex` | Rebuild search index |
| `prompt_understanding` | Guidance for using Subcog MCP tools |

## Available MCP Resources

| Resource | Description |
|----------|-------------|
| `subcog://help` | Help index |
| `subcog://help/{topic}` | Topic-specific help |
| `subcog://_` | List all memories across all domains |
| `subcog://project/_` | List project-scoped memories |
| `subcog://user/_` | List user-scoped memories |
| `subcog://org/_` | List org-scoped memories (if enabled) |
| `subcog://memory/{id}` | Get specific memory |

## Filter Syntax (for subcog_recall filter)

```
ns:decisions          # filter by namespace
tag:rust              # filter by tag
tag:rust,mcp          # OR (any tag)
tag:rust tag:error    # AND (all tags)
-tag:test             # exclude tag
since:7d              # last 7 days
source:src/*          # source path
```
"#;
Expand description

Setup and configuration guide.