> ## Documentation Index
> Fetch the complete documentation index at: https://cortex-e852fafe-t3code-rewrite-docs-declutter.mintlify.site/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.

Memory for [Muse Code](https://dev.meta.ai/docs/muse-code), Meta's terminal
coding agent. 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.

| 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`) |

<Steps>
  <Step title="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#api-key-headers)
      for all supported headers.
    </Note>
  </Step>

  <Step title="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`.
    </Warning>
  </Step>
</Steps>

It runs on the same engine as the [Claude Code plugin](/plugins/claude-code), so the [modes](/plugins/claude-code#modes) and [config variables](/plugins/claude-code#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.