> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydradb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Muse Code

> Give Muse Code, Meta's terminal coding agent, long-term memory with HydraDB.

The HydraDB plugin gives [Muse Code](https://dev.meta.ai/docs/muse-code), Meta's
terminal coding agent, memory across sessions. Muse Code's hooks **cannot inject context back to the model**, so
recall is agent-invoked through **MCP** or **skills**, while **hooks** handle
automatic capture and doc sync.

The MCP setup below enables recall. For automatic capture and doc sync, also [set up the plugin's skills and hooks](https://github.com/hydra-db/hydradb-muse-code-plugin#setup) in your workspace.

| Extension point | Role |
| - | - |
| **MCP** (`mcp_servers`) | recall (`hydradb_query`) + ingest |
| **Skills** (`.claude/skills/`) | `/hydradb …` slash commands (manual recall / remember / sync) |
| **Hooks** (`.muse/hooks.json`) | automatic capture (`Stop`) + doc sync (`SessionStart`, `PostToolUse`) |

**1. Add the MCP server**

```json theme={"dark"}
{
  "mcp_servers": {
    "hydradb": {
      "transport": "streamable_http",
      "url": "https://mcp.hydradb.com",
      "headers": {
        "Authorization": "Bearer ${HYDRADB_API_KEY}",
        "X-HydraDB-Database": "your-database"
      },
      "enabled": true,
      "mode": "optional"
    }
  }
}
```

> [!NOTE]
>
> API-key requests to the MCP server require the `X-HydraDB-Database` header
> (your database ID). See the [MCP reference](/plugins/mcp.md#api-key-headers)
> for all supported headers.

**2. Set credentials & run with the required flags**

```bash theme={"dark"}
export HYDRADB_API_KEY="your-api-key"
export HYDRADB_DATABASE="your-database"

# --trust-workspace loads project skills + hooks; --yolo (or an approval
# profile) lets the auto-recall skill run node; both are required or recall
# silently no-ops in headless mode.
muse exec --trust-workspace --yolo "what did we decide about X?"
```

> [!WARNING]
>
> Only use `--yolo` in a workspace you trust. It bypasses command approval,
> so any project hooks loaded by `--trust-workspace` run against your local
> environment. In untrusted checkouts, prefer an approval profile that
> permits only the recall skill's `node` call instead of `--yolo`.

It runs on the same engine as the [Claude Code plugin](/plugins/claude-code.md), so the [modes](/plugins/claude-code.md#modes) and [config variables](/plugins/claude-code.md#config-variables) there apply here too.

## Feedback and contributions

This plugin is open source. Feel free to [raise an issue](https://github.com/hydra-db/hydradb-muse-code-plugin/issues) or [contribute on GitHub](https://github.com/hydra-db/hydradb-muse-code-plugin).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.