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

We want AI assistants (OpenCode) to query the dashboard directly. This requires a tool protocol.

Decision

We will implement a Model Context Protocol (MCP) server in cerebro-mcp:

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 (daily/weekly/monthly/yearly)
search_todosSearch TODOs across projects

Configuration

Requires CORTEX_PATH environment variable pointing to your cortex.

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.