hivecode
Real-time analytics dashboard for Claude Code, tracking sessions, tool usage, file changes, and token costs via an MCP server.
README
HiveCode
Real-time analytics dashboard for Claude Code
Track sessions, tool usage, file changes, token costs, and more — all from a real-time local dashboard. Built as an MCP server that plugs directly into Claude Code.
Features
- Real-time Dashboard — Live WebSocket updates as Claude Code works
- Session Tracking — Monitor every Claude Code session with full detail
- Tool Analytics — See which tools are used most, average durations, success rates
- File Change Log — Track every file created, edited, or deleted
- Cost Tracking — Token usage and estimated API costs with daily breakdowns
- Canvas Charts — Visual bar and line charts for activity trends
- Activity Feed — Live stream of all events as they happen
- MCP Server — Plugs directly into Claude Code via Model Context Protocol
- Update Notifications — Get notified when a new version is available
- Mobile Responsive — Works on phone and tablet
- 100% Local — All data stored in SQLite on your machine
Quick Start
# Clone the repo
git clone https://github.com/ZedoxDevelopment/hivecode.git
cd hivecode
# Install dependencies
npm install
# Start the dashboard
npm start
Open http://localhost:3800 in your browser.
Seed Demo Data
Want to see the dashboard in action before connecting Claude Code?
node src/seed-demo.js
Connect to Claude Code
Add HiveCode as an MCP server in your Claude Code settings:
~/.claude/settings.json
{
"mcpServers": {
"hivecode": {
"command": "node",
"args": ["/path/to/hivecode/src/mcp-server.js"],
"env": {}
}
}
}
Or run the MCP server standalone:
npm run mcp
MCP Tools
| Tool | Description |
|---|---|
hivecode_start_session |
Start tracking a new Claude Code session |
hivecode_log_tool |
Log a tool call with duration and success status |
hivecode_log_file |
Log a file change (create/edit/delete) |
hivecode_log_tokens |
Log token usage for cost tracking |
hivecode_end_session |
End the current session with a summary |
hivecode_stats |
Get dashboard statistics |
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/stats |
Dashboard overview stats |
| GET | /api/sessions |
List all sessions |
| GET | /api/sessions/:id |
Session detail with events |
| GET | /api/tools |
Tool usage analytics |
| GET | /api/files |
Recent file changes |
| GET | /api/daily |
Daily stats for charts |
| POST | /api/event |
Log events via HTTP |
| GET | /api/version |
Current version info |
| GET | /api/version/check |
Check for updates |
| GET | /api/health |
Health check |
Dashboard Pages
- Overview — Stats grid, 14-day activity chart, recent sessions, top tools
- Sessions — Searchable/filterable session list with drill-down detail view
- Tools — Usage distribution chart, per-tool bars, performance table
- Files — Searchable file change log across all sessions
- Costs — Cost/token trend charts with daily breakdown table
- Activity Feed — Real-time event stream via WebSocket
- Settings — MCP config, data export, seed/clear data
Configuration
| Environment Variable | Default | Description |
|---|---|---|
HIVECODE_PORT |
3800 |
Dashboard server port |
Tech Stack
- Backend: Express.js, WebSocket (ws), better-sqlite3
- Frontend: Vanilla JS, Canvas charts, CSS custom properties
- Protocol: MCP (Model Context Protocol) over JSON-RPC stdio
- Database: SQLite with WAL mode
Project Structure
hivecode/
src/
server.js # Express + WebSocket server
db.js # SQLite schema + prepared statements
mcp-server.js # MCP protocol handler + tools
seed-demo.js # Demo data generator
public/
index.html # Dashboard shell
app.js # Frontend application
style.css # Dark theme styles
data/ # SQLite database (auto-created)
version.json # Version + changelog for update checks
package.json
License
MIT — Zedox Development
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.