# WakaTime — how to use (mcp.ai)

Connect your WakaTime account and use 17 tools for time tracking straight from your AI agent. Connect in one click, no API key needed. WakaTime offers automatic time tracking for developers, integrating with code editors and delivering dashboards on coding activity, project progress, and productivity.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_wakatime?ms=1787293560000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `wakatime_get_aggregate_stats`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/wakatime`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/wakatime/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/wakatime/get/aggregate/stats` — Tool to retrieve aggregate coding statistics across all WakaTime users for a given time range. Use when analyzing global trends in programming languages, editors, operating systems, and categories.
  - body: { range: string }
- `POST https://api.mcp.ai/api/wakatime/get/current/user/status/bar/today` — Tool to get current user's coding activity today for displaying in IDE status bars. Use when you need a summary of today's coding time broken down by projects, languages, editors, etc.
  - body: { project?: string, timeout?: integer, branches?: string, timezone?: string, writes_only?: boolean }
- `POST https://api.mcp.ai/api/wakatime/get/editors` — Tool to list WakaTime IDE plugins with metadata. Use when you want to discover available IDE integrations and their latest versions.
  - body: { unreleased?: boolean }
- `POST https://api.mcp.ai/api/wakatime/get/goals` — Tool to list a user's goals with progress series and metadata. Use after authenticating the user with read_goals scope.
  - body: { user?: string }
- `POST https://api.mcp.ai/api/wakatime/get/insights` — Tool to retrieve an insight for a user over a time range. Use when analyzing user coding metrics after authentication.
  - body: { user: string, range: string, timeout?: integer, weekday?: integer|string, writes_only?: boolean, insight_type: string }
- `POST https://api.mcp.ai/api/wakatime/get/leaders` — Tool to list public leaders ranked by coding activity. Use when viewing top coders globally or filtering by language, country code, or hireable status.
  - body: { page?: integer, language?: string, is_hireable?: boolean, country_code?: string }
- `POST https://api.mcp.ai/api/wakatime/get/machine/names` — Tool to list a user's machines including last seen time. Use when needing machine names for a specific user.
  - body: { user?: string }
- `POST https://api.mcp.ai/api/wakatime/get/meta` — Tool to retrieve WakaTime API meta information, including public IP addresses used by WakaTime servers. Use when you need to know WakaTime's infrastructure details for network configuration or securit
- `POST https://api.mcp.ai/api/wakatime/get/oauth/authorize` — Tool to generate OAuth 2.0 authorization URL. Use when redirecting users to WakaTime to grant access.
  - body: { scope?: string, state?: string, client_id: string, redirect_uri: string, force_approve?: string, response_type: string }
- `POST https://api.mcp.ai/api/wakatime/get/user` — Tool to get detailed profile information for a WakaTime user by user ID or username. Use 'current' as the user parameter to get the authenticated user's details. Returns comprehensive profile data inc
  - body: { user: string }
- `POST https://api.mcp.ai/api/wakatime/get/user/stats` — Tool to retrieve coding statistics for a user over the default time range. Returns comprehensive metrics including languages, editors, projects, and daily averages. Use when analyzing a user's coding 
  - body: { user: string, timeout?: integer, writes_only?: boolean }
- `POST https://api.mcp.ai/api/wakatime/get/user/stats/by/range` — Tool to retrieve comprehensive coding statistics for a user over a specific time range. Returns breakdowns by language, editor, project, OS, and more, along with daily averages and best day. Use when 
  - body: { user: string, range: string, timeout?: integer, writes_only?: boolean }
- `POST https://api.mcp.ai/api/wakatime/get/user/summaries` — Get user's coding activity for a time range as daily summaries. Returns detailed breakdowns by projects, languages, editors, and more for each day. Use when you need to analyze coding patterns, track 
  - body: { end?: string, user: string, range?: string, start?: string, project?: string, timeout?: integer, branches?: string, timezone?: string, writes_only?: boolean }
- `POST https://api.mcp.ai/api/wakatime/get/users/all/time/since/today` — Tool to retrieve total coding time since account creation for a user. Use after authenticating to fetch all-time stats.
  - body: { user: string, project?: string }
- `POST https://api.mcp.ai/api/wakatime/list/program/languages` — Tool to list all verified program languages supported by WakaTime. Use when you need to discover available programming languages tracked by WakaTime.
  - body: { page?: integer }
- `POST https://api.mcp.ai/api/wakatime/list/user/projects` — List WakaTime projects for a specified user. Returns project names, IDs, creation dates, and last activity times. Use to discover available projects for any user before querying project-specific stats
  - body: { q?: string, page?: integer, user: string }
- `POST https://api.mcp.ai/api/wakatime/list/user/user/agents` — Tool to list plugins and editors which have sent data for a specified user. Use when needing to discover which development environments and tools a user is actively using.
  - body: { user?: string }

## Example prompts
- "What can I do in WakaTime?"
- "Show me a summary of my WakaTime account"

## More
- Page: https://mcp.ai/wakatime
- Agent spec (llms.txt): https://mcp.ai/wakatime/llms.txt
- Postman collection: https://mcp.ai/wakatime/postman.json
