WakaTime MCP
Python MCP server for WakaTime coding telemetry, project time summaries, languages, and daily goals
Documentation
wakatime-mcp
A lightweight, read-only Model Context Protocol (MCP) server (stdio transport) for personal WakaTime analytics, published on the Official Anthropic MCP Registry (io.github.khoap1220-hue/wakatime-mcp) and built for wakatime/wakatime-cli#1184.
Tools & Question Mapping
Rather than mirroring every raw REST endpoint, wakatime-mcp exposes 4 high-signal read-only tools mapped directly to the core developer questions highlighted in wakatime/wakatime-cli#1184:
| Developer Question | MCP Tool | WakaTime API v1 Endpoints Used | Key Behavior |
|---|---|---|---|
| "What have I been working on?" | wakatime_recent_activity(range_str="last_7_days", project=None) | GET /users/current/summaries | Aggregates coding time across projects, languages, editors, branches, and categories with human-readable durations, percentage shares, and daily breakdown. |
| "What should I say in standup?" | wakatime_standup_brief(target_date="yesterday") | GET /users/current/summaries, GET /users/current/durations | Compares previous coding day + today's progress by project and branch into concise yesterday / today / focus bullets. Automatically falls back up to 7 days if yesterday had 0s (e.g., Monday standup after a weekend). |
| "Am I on track?" | wakatime_goals_progress() | GET /users/current/goals, GET /users/current/status_bar/today | Evaluates enabled daily and weekly goals (more and less targets) against live status-bar progress, returning ahead / on_track / behind and exact remaining minutes needed today. |
| "Why is WakaTime showing weird numbers?" | wakatime_diagnostics(date_str="today") | GET /users/current, GET /users/current/machine_names, GET /users/current/user_agents, GET /users/current/durations | Detects stale or missing heartbeats, unset/UTC profile timezone drift, multi-machine hostname splits, Unknown Project / untracked git branch slices, writes_only mode, and custom keystroke timeout windows (default 15m). |
Authentication & Zero-Config Discovery
wakatime-mcp resolves credentials automatically in the following order:
WAKATIME_API_KEYenvironment variable (plus optionalWAKATIME_API_URL, defaulting tohttps://api.wakatime.com/api/v1).~/.wakatime.cfgINI file (also honoring$WAKATIME_CONFIGand$WAKATIME_HOME/.wakatime.cfg), reading[settings] api_key,api_url,timeout, andhostname— matchingwakatime-cliout of the box with zero duplicate configuration.
Both modern waka_... keys and legacy UUID keys are encoded per WakaTime's HTTP Basic Auth specification (Authorization: Basic <base64(api_key)>).
Security & Privacy Design
- 100% Read-Only Personal Scope: Only
GET /users/current/*endpoints are called; heartbeats, goals, and account settings are never mutated. - Automatic Secret Redaction:
WakaTimeConfig,WakaTimeError, andredact_secrets()scrub raw API keys, Base64 credentials, and query parameters from allrepr()strings and error payloads. - TLS Enforcement: Non-loopback
http://api_urlvalues are rejected by default unlessWAKATIME_ALLOW_INSECURE_HTTP=1is explicitly set for local self-hosted testing.
Quick Start
Install
pip install https://github.com/khoap1220-hue/wakatime-mcp/releases/latest/download/wakatime_mcp-0.1.2-py3-none-any.whl
Or run directly with uv:
uvx --from https://github.com/khoap1220-hue/wakatime-mcp/releases/latest/download/wakatime_mcp-0.1.2-py3-none-any.whl wakatime-mcp
1-Click Client Configuration (Claude Desktop / Cursor / VS Code / Continue)
- 1-Click Claude Desktop Bundle (
.mcpb): Downloadwakatime-mcp.mcpband open it in Claude Desktop. - Zero-Clone
uvxConfig:
If ~/.wakatime.cfg is already configured on your machine by your IDE's WakaTime plugin, no extra env block is required:
{
"mcpServers": {
"wakatime": {
"command": "uvx",
"args": [
"--from",
"https://github.com/khoap1220-hue/wakatime-mcp/releases/latest/download/wakatime_mcp-0.1.2-py3-none-any.whl",
"wakatime-mcp"
]
}
}
}
Or pass WAKATIME_API_KEY explicitly:
{
"mcpServers": {
"wakatime": {
"command": "wakatime-mcp",
"env": {
"WAKATIME_API_KEY": "waka_your_api_key_here"
}
}
}
}
Development & Testing
pip install -e ".[dev]"
ruff check src tests
PYTHONDONTWRITEBYTECODE=1 python -B -m pytest
Roadmap (Planned Next Phases)
This repository intentionally focuses on the personal read-only core. Planned next phases depending on maintainer direction in wakatime/wakatime-cli#1184:
- Organization & Team Dashboards: Scoped read-only tools for
/orgs/:org/dashboards/...team summaries and project velocity. - OAuth 2.0 Flows: Least-privilege OAuth2 scopes (
email,read_logged_time,read_stats) with automatic token refresh. - Streamable HTTP Transport: Remote MCP server deployment support alongside local
stdio. - Optional Go CLI Bridge: Evaluating a standalone binary/repository vs. a thin
wakatime-cli --serve-mcpsubcommand sharing~/.wakatime.cfgparsing.
License
Custom Enterprise MCP & Webhook Engineering
Need a production-hardened MCP server (OAuth 2.1, tenant scoping, annotation mutation guards, Official Registry server.json + Glama Grade-A) or replay-safe Stripe/HubSpot/n8n webhook integration?
- 48h Fixed Starter Slice: $145 via 0%-fee Contra Escrow (100% async — written spec, tested GitHub PR & 2-min walkthrough)
- Portfolio & Services: khoaphan.dev/services
Related Open-Source MCP & A2A Security Suite
| Project | Focus & Verification |
|---|---|
mcp-tool-guard & a2a-card-guard | Zero-dep MCP & A2A v1.0 security guard, 11-CVE multi-lang SCA, RFC 8785 JCS/JWKS verifier & GitHub Action (Featured in awesome-a2a) |
caido-mcp · anythingllm-mcp | Official Anthropic MCP Registry servers for Caido AppSec HTTPQL traffic/findings & AnythingLLM RAG workspaces with fail-closed ACLs |
blender-mcp-suite · shopnex-mcp | Official Anthropic MCP Registry servers for 21-tool Blender 4.1+ 3D automation (zero-zombie Job Objects) & ShopNex e-commerce operations |
wakatime-mcp · trefle-mcp | Read-only Official Anthropic MCP Registry servers for WakaTime developer productivity telemetry & Trefle botanical species data |
khoaphan.dev | Architecture notes, live Ed25519-signed A2A v1.0.1 node & custom MCP engineering sprints (100% written async, zero live meetings) |