Skip to main content

Prerequisites

  • Node.js 20+
  • An MCP-compatible client (Claude Desktop, Claude Code, Cursor, VS Code, etc.)

Installation

If you have @cohaku/cli installed globally:
cohaku init
This will:
  1. Initialize the database
  2. Auto-detect installed AI tools (Claude Code, Cursor, VS Code, Windsurf, etc.)
  3. Register the MCP server with each detected tool
See Integrations for the full list of 12 supported tools.

Manual Setup

For manual configuration, see the individual integration guides:

Claude Code

Claude Desktop

Cursor

VS Code

Windsurf

OpenCode

Verify Connection

Start your MCP client and check that the Cohaku tools appear. You should see 24 tools including add_memory, search_memories, get_context, session_start, generate_claude_md, etc.

First Usage

Once connected, your AI agent can immediately start using Cohaku:
Agent: "Remember that this project uses React 19 with TypeScript"
→ calls add_memory({ content: "Project uses React 19 with TypeScript", layer: "rule", type: "rule" })

Agent: "What do you know about this project?"
→ calls search_memories({ query: "project" })
→ returns the stored memory with relevance score

CLI Commands

If installed globally, the cohaku CLI provides commands for all memory operations:
CommandDescription
cohaku initInitialize database and register MCP with detected tools
cohaku memory addStore a new memory
cohaku memory searchSearch memories
cohaku memory contextLoad prioritized context
cohaku graph entity addAdd a knowledge graph entity
cohaku graphSearch the knowledge graph
cohaku generate <tool>Export memories to editor config
cohaku statusShow memory statistics
See the CLI reference for the full command list.

Configuration

The default database path is ~/.config/cohaku/memory.db. This can be configured via environment variables:
VariableDefaultDescription
COHAKU_DB_PATH~/.config/cohaku/memory.dbSQLite database file path

Next Steps

  • Learn about Memory Layers to understand how memories are organized
  • Browse the MCP Tools reference for all available tools
  • Explore the CLI reference for terminal-based memory management
  • See all Integrations for supported AI coding tools