Skip to content

Claude Code + aeqi

Connect Claude Code to your aeqi runtime over MCP. Claude Code gets persistent memory, quest tracking, agent delegation, and event automation — driving the same primitives the dashboard does.

Prerequisites

  • aeqi account with a company at app.aeqi.ai on a company or owner tier — API keys and MCP access require a Company subscription; trial and free accounts get 402 Payment Required (see Authentication)
  • Claude Code
  • aeqi CLI access — see Installation

1. Keys

Two keys, both from the dashboard:

See Authentication for rotation.

2. MCP Server

Register the aeqi CLI as an MCP server with claude mcp add (Claude Code stores the registration in ~/.claude.json, not settings.json):

claude mcp add aeqi \
  --env AEQI_SECRET_KEY=sk_... \
  --env AEQI_API_KEY=ak_... \
  --env AEQI_PLATFORM_URL=https://app.aeqi.ai \
  -- aeqi mcp

To share the server with everyone working in a repository, use a project-level .mcp.json at the repo root instead (inject the keys from your environment rather than committing them):

{
  "mcpServers": {
    "aeqi": {
      "command": "aeqi",
      "args": ["mcp"],
      "env": {
        "AEQI_SECRET_KEY": "sk_...",
        "AEQI_API_KEY": "ak_...",
        "AEQI_PLATFORM_URL": "https://app.aeqi.ai"
      }
    }
  }
}

aeqi mcp authenticates with the platform on startup, then routes tool calls directly to your company's runtime. Verify with claude mcp list. Use an absolute path to the aeqi binary if it is not on Claude Code's PATH.

Private deployments may use a deployment-specific config path instead of hosted keys.

3. Tools

Once connected, Claude Code can call:

Tool Actions
me profile, permissions
ideas store, search, list, update, delete, link, feedback, walk
quests create, list, show, update, close, cancel
agents get, hire, retire, list, projects
events create, list, enable, disable, delete, trigger, trace
code search, context, impact, diff_impact, file, file_summary, stats, index, incremental, synthesize
sessions search

Full catalog: MCP Integration.

4. Hooks

Hooks make Claude Code work with aeqi automatically. Add each block under "hooks" in settings.json.

Recall gate — require context before editing

"PreToolUse": [
  {
    "matcher": "Edit",
    "hooks": [{ "type": "command", "command": "aeqi/scripts/hook-run.sh check-recall.sh" }]
  },
  {
    "matcher": "Write",
    "hooks": [{ "type": "command", "command": "aeqi/scripts/hook-run.sh check-recall.sh" }]
  }
]

Blocks Edit/Write until ideas(action='search') has run for the current context.

Mark recall after ideas tool calls

"PostToolUse": [
  {
    "matcher": "mcp__aeqi__ideas",
    "hooks": [{ "type": "command", "command": "aeqi/scripts/hook-run.sh mark-recall.sh" }]
  }
]

Session primer — inject project context on startup

"SessionStart": [
  {
    "matcher": "startup",
    "hooks": [{ "type": "command", "command": "aeqi/scripts/session-primer.sh startup" }]
  }
]

Loads the active project's primer — architecture, rules, open quests, agent status — into the session as Claude Code starts.

Session finalize — re-index on exit

"Stop": [
  {
    "matcher": "",
    "hooks": [{ "type": "command", "command": "aeqi/scripts/session-finalize.sh" }]
  }
]

Re-indexes the code graph and clears session state.

5. CLAUDE.md

Keep CLAUDE.md minimal — the primer hook injects everything else.

# My Project

Solo developer. All projects are mine. Decide and execute.

aeqi MCP provides context, memory, workflow, and coordination.
The session primer is the system prompt.

How It Fits Together

  1. StartupSessionStart runs the primer, loading project context and graph status
  2. Before editingPreToolUse requires an ideas(action='search') first
  3. During work — Claude Code stores learnings as ideas, creates and closes quests, delegates to agents
  4. ExitStop re-indexes the code graph and clears session state

Knowledge accumulates across sessions. Next time you (or another agent) starts, the primer loads the latest state.

Full `settings.json`

The MCP server itself is registered via claude mcp add or .mcp.json as shown above — settings.json carries only the hooks:

{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup",
        "hooks": [{ "type": "command", "command": "aeqi/scripts/session-primer.sh startup" }]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Edit",
        "hooks": [{ "type": "command", "command": "aeqi/scripts/hook-run.sh check-recall.sh" }]
      },
      {
        "matcher": "Write",
        "hooks": [{ "type": "command", "command": "aeqi/scripts/hook-run.sh check-recall.sh" }]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "mcp__aeqi__ideas",
        "hooks": [{ "type": "command", "command": "aeqi/scripts/hook-run.sh mark-recall.sh" }]
      }
    ],
    "Stop": [
      {
        "matcher": "",
        "hooks": [{ "type": "command", "command": "aeqi/scripts/session-finalize.sh" }]
      }
    ]
  }
}

Next Steps

Cookies for sign-in and analytics. No third-party tracking.