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

5. MCP server for OpenCode integration

Date: 2026-04-22

Status

Accepted

Context

OpenCode and other AI assistants should be able to query the dashboard directly. This requires a tool protocol.

Decision

The cerebro-mcp crate implements an MCP server:

Tools exposed

ToolPurpose
read_projectRead project info + generated page
list_projectsList all tracked projects
get_statsOverall statistics
read_journalRead journal entry by date
read_todayRead today’s journal
read_intentRead intent for daily, weekly, monthly, or yearly periods
search_todosSearch TODOs across projects

Configuration

The server reads CORTEX_PATH to locate the cortex data directory and falls back to ~/Projects/cortex if unset. See ADR-0011 for config priority in the command-line tool and TUI.

Consequences

Pros

  • AI assistants can access context directly
  • Supports AI-assisted workflows
  • Uses a standard protocol

Cons

  • Adds an MCP SDK dependency
  • Requires server maintenance

Notes

Binary: target/release/cerebro-mcp. Configure in OpenCode’s opencode.json.