Roka Roka Docs

MCP

Watch mode

roka-mcp watch tails a log file. With --on-crash, a new line matching the crash pattern triggers the same prune pipeline used by the MCP tools. Pro API key required.

npx roka-mcp watch ./logs/dev.log --on-crash --api-key rk_live_...

Flags

FlagDescription
<path>Required. Log file to tail. If it does not exist yet, watch waits for it to be created.
--on-crashEnable crash-triggered pruning
--budget <n>Character budget for pruned output (default 4000)
--api-key, -kPro API key, or ROKA_API_KEY

What happens on crash

  1. A new line matches ERROR, FATAL, CRITICAL, Exception, Traceback, or panic.
  2. Watch prunes the recently buffered context with the same local engine as the tools.
  3. Result is written to .roka/crash-context.txt (directory created if needed), with a timestamp header.

Runs in the foreground until Ctrl+C / SIGTERM.

Without a verified Pro key, watch refuses to start tailing — same gate as connect and serve.