Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP tools reference

The cerebro MCP server provides 7 tools that allow AI assistants to query cortex data. All tools are thin wrappers over cerebro-core query operations.

Tool list

list_projects

List all tracked projects with their metadata.

Parameters:

NameTypeRequiredDescription
active_onlybooleanNoIf true, only return active projects. Default: true

Returns: array of project objects with name, repo_path, active status, and last activity timestamp.


read_project

Read combined generated and manual content for a specific project.

Parameters:

NameTypeRequiredDescription
namestringYesProject name to read

Returns: combined content including project config, sessions, commits, TODOs, and manual notes, covering status, next actions, and journal excerpts.


read_journal

Read a journal entry for a specific date.

Parameters:

NameTypeRequiredDescription
datestringYesDate in YYYY-MM-DD format

Returns: journal entry content for the specified date, or empty if no entry exists.


read_today

Read today’s journal entry.

Parameters: none

Returns: today’s journal entry content, or empty if no entry exists for today.


read_intent

Read intent/goals for a specific period.

Parameters:

NameTypeRequiredDescription
periodstringYesPeriod type: daily, weekly, monthly, or yearly
identifierstringYesPeriod identifier, such as 2026-04-15 for daily, 2026-W15 for weekly, 2026-04 for monthly, 2026 for yearly

Returns: intent/goals content for the specified period.


search_todos

Search TODO comments across all projects.

Parameters:

NameTypeRequiredDescription
keywordstringNoFilter by keyword: TODO, Needs Fixing, Hack, or Placeholder
projectstringNoFilter by project name

Returns: array of TODO items with path, line number, keyword type, and comment text.


get_stats

Get overall cortex statistics.

Parameters: none

Returns: statistics including project count, total TODO count, session count, commit count, and recent activity metrics.

Configuration

The MCP server reads CORTEX_PATH to locate the cortex data directory. If unset, it falls back to ~/Projects/cortex. Most users with the default layout don’t need to set it.

Start it from any MCP-compliant client. The example below uses OpenCode:

{
  "mcpServers": {
    "cerebro": {
      "command": "cerebro",
      "args": ["mcp"],
      "env": {
        "CORTEX_PATH": "/path/to/cortex"
      }
    }
  }
}

Configure the command and environment variables according to your client’s documentation. The server speaks standard MCP (JSON-RPC) and has no dependency on any specific client.

Command-line tool equivalents

Each MCP tool has a corresponding command-line tool command that returns the same data as human-readable output. If you don’t use an AI assistant, the command-line tool commands give you direct access to your cortex from the terminal.

MCP toolCommand-line tool equivalent
list_projectscerebro projects list
read_projectcerebro projects read <name>
read_journalcerebro journal read <date>
read_todaycerebro journal today
read_intentcerebro intent <period> <identifier>
search_todoscerebro todos
get_statscerebro stats