ActivityWatch MCP服务器
Connect ActivityWatch to enable LLM queries on time-tracking data
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: ActivityWatch MCP服务器. It is used for: Connect ActivityWatch to enable LLM queries on time-tracking data Full Skill content: https://321skill.com/skills/activitywatch-time-query/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the inability of developers to directly query personal time-tracking data using natural language. In daily work, we use ActivityWatch to record time spent across various applications and devices, but analyzing this data often requires manually opening the ActivityWatch interface or writing scripts to query the API, which is inefficient. With this MCP server, LLMs can directly retrieve buckets, events, and query results from ActivityWatch as if calling a standard tool.
Usage is straightforward: simply install and run ActivityWatch locally, then add this server via the configuration file of an MCP client (such as Claude for Desktop). Afterward, you can query your time usage with natural language instructions, such as "How much time did I spend in my IDE last week?" or "List all activity-type buckets." It supports listing buckets, running AQL queries, fetching raw events, and reading settings—all operations are conducted through the standard MCP protocol.
It is ideal for developers, product managers, and data analysts who need to quantify personal productivity. Particularly for those already using ActivityWatch for time tracking, it eliminates the tedious steps of manually exporting data, allowing AI assistants to directly provide analytical insights. For team managers, integrating this tool can also facilitate quick understanding of team members' time allocation structures, aiding management decisions.
It is recommended to consistently use this tool when configuring MCP clients and ensure the ActivityWatch server is always running. Note that it primarily relies on a local ActivityWatch instance; if ActivityWatch is not running or the network address differs, specify it via the environment variable AW_API_BASE. Additionally, query results depend on the completeness of ActivityWatch data, so regular checks on data recording are advised.
Key Features
Compared to the official ActivityWatch REST API, this Skill encapsulates query capabilities as a natural language-invocable tool via the MCP protocol, eliminating the need to manually construct HTTP requests or parse JSON—LLMs can directly understand and return structured results. Furthermore, it supports the AQL query language, whereas other time-tracking MCP servers (such as Toggl's MCP) typically offer only basic CRUD operations.
Limitations
Requires Node.js v14+ and a locally running ActivityWatch server. Data query scope is limited by the duration and completeness of records in the local ActivityWatch instance; unsynchronized data over extended periods may be incomplete.
FAQ
How to connect to a non-local ActivityWatch instance?
Set the environment variable `AW_API_BASE`, e.g., `export AW_API_BASE=http://mydesktop.local:5600/api/0`, or use the `--aw-api-base` command-line argument.
Which MCP clients are supported?
Any client supporting the MCP protocol can be used, such as Claude for Desktop or Gemini CLI. Simply add this server to the configuration file.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/activitywatch-time-query/raw/index.md to read the original Skill definition (Markdown format) for ActivityWatch MCP服务器, and install it according to the instructions.
Raw Markdown URL for AI: /skills/activitywatch-time-query/raw/index.md