5. MCP server for OpenCode integration
Date: 2026-04-22
Status
Accepted
Context
AI assistants (OpenCode) should be able to query the dashboard directly. This requires a tool protocol.
Decision
The cerebro-mcp crate implements an MCP server:
Tools exposed
| Tool | Purpose |
|---|---|
read_project | Read project info + generated page |
list_projects | List all tracked projects |
get_stats | Overall statistics |
read_journal | Read journal entry by date |
read_today | Read today’s journal |
read_intent | Read intent for daily, weekly, monthly, or yearly periods |
search_todos | Search TODOs across projects |
Configuration
Reads CORTEX_PATH to locate the cortex data directory; falls back to ~/Projects/cortex if unset. (See ADR-0011 for the CLI/TUI config priority.)
Consequences
Pros
- AI can access context directly
- Enables AI-assisted workflow
- Standard protocol
Cons
- MCP SDK dependency
- Server maintenance
Notes
Binary: target/release/cerebro-mcp. Configure in OpenCode’s opencode.json.