Labsco
MCP SERVER

ActivityWatch Time Data

by 8bitgentleman

Query your own ActivityWatch time-tracking data, including its full query language.

Desktop & OS Automation
Summary
The query language is the feature.

"How much did I actually work today" is not a stored number — it is window events intersected with the periods you were not away from the keyboard, merged by application and sorted by duration. Exposing AQL means the assistant can compose that, and anything else you think of, instead of picking from a handful of canned reports. One practical note the README is blunt about: each query must arrive as one string with its statements separated by semicolons, and splitting them across array elements is the failure people hit first.

What it is

A small MCP server in front of a local ActivityWatch instance. It does not summarise your time for you — it exposes the buckets and the query language, so the assistant writes the query and you get the numbers your own watchers recorded.

What you get
  • List-buckets — every bucket ActivityWatch is filling, filterable by type such as window, web or afk
  • Run-query — full AQL, so the assistant can join window events against away-from-keyboard periods, group by application, and sort by duration
  • Get-events — raw events straight out of a named bucket, bounded by ISO start and end times and a limit
  • Get-settings — your ActivityWatch configuration, whole or one key at a time
  • Time periods are passed as ranges such as 2024-10-28/2024-10-29, and each query string carries its complete set of statements
  • Queries can be named, which is what ActivityWatch uses for caching them
Requirements

ActivityWatch installed and running — the server talks to its API at http://localhost:5600 and reports connection errors when it is not there. Node.js v14 or higher. No account and no key: the data is already on your machine and never leaves it. To reach an ActivityWatch running elsewhere — a Windows host from inside WSL, or another machine — set AW_API_BASE or pass --aw-api-base, and use a hostname the ActivityWatch server accepts, typically the computer name with a .local suffix.

Setup effort

One command — activitywatch-mcp-server