# WakaTime (Coding Stats) MCP

> WakaTime (Coding Stats) MCP connects your coding data to your agent. Get detailed stats showing total time spent across specific date ranges, track progress against custom goals, and list every project your IDE has recorded activity for.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** coding-stats, time-tracking, developer-productivity, wakatime, activity-monitoring

## Description

Need to know where you actually spend your development hours? This MCP analyzes the raw data from your IDE, giving you a clear picture of your coding habits without manual effort. You can ask your agent for summarized statistics—say, total time logged over the last 30 days—or track how far along you are with specific personal goals. It also lists every project your plugins detect, providing daily activity totals per workspace. If your work involves external apps like Google Calendar, it even pulls that data in so nothing slips through the cracks. Connecting WakaTime to Vinkius lets your agent use this MCP and synthesize all that complex time logging into a simple conversation. It’s pure insight: you get an objective view of who's working on what, right when you need to know.

## Tools

### create_external_duration
Records activity time that came from outside your IDE, like a calendar entry.

### create_heartbeat
Sends a raw ping to record immediate coding activity when you start working.

### get_all_time_since_today
Retrieves the total amount of time logged across all projects since your account was created.

### get_goal
Pulls specific details about a user-defined coding goal you set up.

### get_stats
Gathers summarized coding statistics for any given date range.

### list_commits
Lists project commits and shows exactly how much time you spent on each one.

### list_custom_rules
Shows you the rules currently set up to modify or remove coding activity records.

### list_durations
Retrieves blocks of coding time that were joined together after a pause in typing.

### list_external_durations
Gets activity time that was imported from external applications, such as Google Calendar.

### list_goals
Displays a list of all coding goals you have set and how close you are to hitting them.

### list_heartbeats
Retrieves the raw, ping-level data showing every instance you started coding in your IDE.

### list_projects
Lists every unique project that has generated activity on your system.

### list_summaries
Provides daily summaries of all recorded coding activity.

### update_custom_rules
Allows you to change the rules that modify or delete your coding activity data based on patterns.

## Prompt Examples

**Prompt:** 
```
Show me my coding stats for the last 7 days.
```

**Response:** 
```
I've retrieved your stats for the last 7 days. You coded for a total of 24 hours and 15 minutes. Your top language was TypeScript (12h), followed by Python (8h). Your most active project was 'vurb-mcp-server'.
```

**Prompt:** 
```
What are my current coding goals and how am I doing?
```

**Response:** 
```
You have 2 active goals: 'Code 4 hours daily' which is currently at 85% completion for this week, and 'Contribute to Open Source' which is at 40%. Keep it up!
```

**Prompt:** 
```
Give me a summary of my coding activity for yesterday.
```

**Response:** 
```
Yesterday, you logged 5 hours and 30 minutes of coding activity. You worked on 3 projects: 'API-Gateway' (3h), 'Frontend-App' (2h), and 'Documentation' (30m).
```

## Capabilities

### Calculate overall coding time
Retrieve total coding hours logged since your WakaTime account was created.

### Get period-specific stats
Fetch summarized coding statistics for custom date ranges like the last 7 or 30 days.

### List and check goals
See a list of your defined coding targets and review your current percentage completion for any goal.

### Track project activity
Get a comprehensive list of every detected project, along with daily time summaries for each one.

### Analyze raw keystrokes
Inspect raw coding pings and duration blocks to understand exact start times and gaps in your work sessions.

## Use Cases

### The Scope Creep Audit
A team lead asks their agent, 'Show me the total time spent on Project Alpha versus Project Beta last quarter.' The agent runs the query using 'get_stats' and delivers a clear comparison, instantly identifying where focus drifted.

### The Performance Review Prep
A developer needs to prove they hit their quarterly goals. They ask for their progress against all targets using 'list_goals', getting a comprehensive report that confirms 95% completion on their main objective.

### Debugging Time Loss
A consultant suspects the team is losing time between coding sessions. They run the raw activity data via 'list_heartbeats' and review the gaps, pinpointing exactly where the workflow breaks down.

### Cross-Functional Reporting
A developer needs to include meeting hours in their productivity report. Instead of manually logging it, they let the agent use 'list_external_durations' to pull verified time from their calendar.

## Benefits

- Pinpoint wasted time. Use 'get_stats' to check specific date ranges and see if your coding hours align with where you thought they did.
- Manage expectations. Check progress against custom targets using the 'list_goals' tool so team leads can report on goals, not just effort.
- Visualize your work flow. The 'list_projects' function gives an immediate overview of all tracked projects and how much time was spent in each one.
- Account for everything. If you track non-coding tasks like meetings in Google Calendar, the 'list_external_durations' tool makes sure that time is included.
- Analyze the nitty-gritty. Need to know exactly when your agent saw you stop typing? The 'list_heartbeats' tool gives raw ping data for deep analysis.

## How It Works

The bottom line is you talk to your agent about your code time, and it pulls all the detailed data for you.

1. Subscribe to this MCP and provide your unique WakaTime API key.
2. Your agent connects the credentials and prepares access to your coding history.
3. You ask a natural language question—like 'How long did I work on the backend last month?'—and get an immediate, summarized answer.

## Frequently Asked Questions

**How do I use WakaTime (Coding Stats) MCP to check my total time?**
You ask your agent for the 'get_all_time_since_today' statistic. It provides one single number representing every minute logged since you first connected your account.

**Can I track external work hours with WakaTime (Coding Stats) MCP?**
Yes, the 'list_external_durations' tool pulls activity from sources like Google Calendar. This ensures non-coding time is included in your overall picture.

**What does list_heartbeats do with WakaTime (Coding Stats) MCP?**
The 'list_heartbeats' tool retrieves the raw, minute-by-minute ping data from your IDE plugins. This is useful for forensic analysis of when work activity truly began and ended.

**How do I compare projects using WakaTime (Coding Stats) MCP?**
You can use the 'list_projects' tool to see all options, then ask your agent to run a summary query against those specific project names. This gives you clear time allocations.

**Can I update my coding rules with WakaTime (Coding Stats) MCP?**
Yes, the 'update_custom_rules' tool lets you adjust how WakaTime processes your activity data. You can modify patterns to ensure only relevant time is counted.