Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
From the repo.
Track your AI coding sessions — tokens, models, tools, files, and cost — all in your browser.
OpenCode Usage Tracking is a local-first analytics dashboard for OpenCode. It reads your OpenCode SQLite database and visualizes every session — token usage, model breakdowns, tool calls, files edited, todos, and cost — so you can understand exactly how you work with AI.
No cloud. No telemetry. No sign-up. 100% local.
| Metric | Description |
|---|---|
| Sessions | Every AI coding session with timestamps, duration, and agent |
| Tokens | Input, output, reasoning, and cache-read tokens per session |
| Models | Which AI models you use and how much you use them |
| Tools | Every tool call (read, write, bash, etc.) with success/error counts |
| Projects | Activity breakdown across all your codebases |
| Files | Most-edited files ranked by patch count |
| Todos | Tasks created and completed during sessions |
| Agents | Per-agent session counts, tokens, and tool usage |
| Cost | Token cost per session, model, and project |
# Clone the repo
git clone https://github.com/Amanuel-Tesfaye-R/opencode-usage-tracking.git
cd opencode-usage-tracking
# Install dependencies
npm install
# Start the dashboard
npm run dev
Open http://localhost:3777 in your browser.
Run this once to set up automatic launch:
npm run setup
This configures OpenCode to open the usage tracking dashboard in your browser every time it starts.
docker run -v ~/.local/share/opencode:/data -p 3777:3777 amanuel/opencode-usage-tracking
The npm run setup command creates a launcher script that:
If you prefer to set up manually:
npm run buildscripts/launch.sh or scripts/launch.ps1)OpenCode Usage Tracking reads your local OpenCode database:
| Platform | Default Path |
|---|---|
| Linux/macOS | ~/.local/share/opencode/opencode.db |
| Windows | %USERPROFILE%\.local\share\opencode\opencode.db |
The database is opened with PRAGMA query_only — the dashboard never modifies your OpenCode data.
OPENCODE_DB_PATH="/path/to/opencode.db" npm run dev
| Route | Description |
|---|---|
/ | Overview — KPIs, activity chart, token flow, cache rate, models, tools, projects |
/sessions | Sessions — searchable table with project filters and range selection |
/sessions/[id] | Session Detail — full message timeline, tool calls, files changed, todos |
/tools | Tool Calls — every tool call across all sessions, filterable and paginated |
/projects | Projects — activity breakdown across your codebases |
/models | Models — model usage distribution and cost breakdown |
/files | Files — most-edited files across all sessions |
/todos | Todos — tracked tasks with status and priority |
/agents | Agents — per-agent usage statistics |
/gateway | Gateway Wall — live Zen free-tier status, ping history, and the runtime readout (API keys, context, spend, LSP) |
node:sqlite (zero native dependencies)Works best in Chromium-based browsers (Chrome, Edge, Arc). Firefox and Safari are supported but may have minor rendering differences.
Is my data uploaded anywhere? No. Everything stays on your machine. The dashboard reads your local SQLite file and never sends data anywhere.
Does it modify my OpenCode database?
No. It opens the database with PRAGMA query_only and never writes to it.
Which OpenCode version is required?
Any version that writes to the standard SQLite database at ~/.local/share/opencode/opencode.db.
Can I use this without OpenCode? Not really — the dashboard reads the OpenCode database. But if you have the database file, it works standalone.
Why port 3777? Because OpenCode uses 3777 by default. The dashboard sits alongside it on the same port.
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureMIT — see LICENSE for details.
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.