ActivityWatch
Connects AI assistants to ActivityWatch for real-time computer activity awareness and time tracking analysis. Enables natural language queries about app usage, browsing history, and productivity patterns through high-level tools without requiring AQL
What is ActivityWatch?
ActivityWatch is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to connects ai assistants to activitywatch for real-time computer activity awareness and time tracking analysis. enables natural language queries about app usage, browsing history, and productivity patte...
Connects AI assistants to ActivityWatch for real-time computer activity awareness and time tracking analysis. Enables natural language queries about app usage, browsing history, and productivity patterns through high-level tools without requiring AQL
This server falls under the Monitoring & Observability and Analytics categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Connects AI assistants to ActivityWatch for real-time comput
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx activitywatch-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use ActivityWatch
The ActivityWatch MCP server connects AI assistants to your local ActivityWatch time-tracking daemon, enabling natural language queries about app usage, browsing history, and productivity patterns without needing to write AQL (ActivityWatch Query Language) queries manually. It exposes high-level tools to list buckets, run queries, fetch raw events, and access settings — so you can ask Claude how much time you spent in VS Code today or which websites consumed the most hours this week, and get real answers from your local data.
Prerequisites
- ActivityWatch installed and running locally (download from activitywatch.net)
- Node.js 18+ and npm for building from source (npm package not yet published)
- ActivityWatch watchers configured (e.g., aw-watcher-afk, aw-watcher-window, aw-watcher-web) to collect data
- An MCP-compatible client such as Claude Desktop
Install ActivityWatch and ensure it is running
Download and install ActivityWatch from activitywatch.net for your platform. Start it and verify the web UI is accessible at http://localhost:5600 to confirm the API is running.
Clone and build the MCP server from source
Clone the activitywatch-mcp-server repository, install Node.js dependencies, and build the TypeScript project.
git clone https://github.com/8bitgentleman/activitywatch-mcp-server.git
cd activitywatch-mcp-server
npm install
npm run buildAdd the server to your MCP client configuration
Edit your Claude Desktop config file to register the ActivityWatch MCP server. Use the AW_API_BASE environment variable if ActivityWatch is running on a non-default host or port.
{
"mcpServers": {
"activitywatch": {
"command": "node",
"args": ["/path/to/activitywatch-mcp-server/dist/index.js"]
}
}
}Optionally configure a custom ActivityWatch API endpoint
If ActivityWatch is running on a remote machine or non-default port, set AW_API_BASE to override the default localhost connection.
{
"mcpServers": {
"activitywatch": {
"command": "node",
"args": ["/path/to/activitywatch-mcp-server/dist/index.js"],
"env": {
"AW_API_BASE": "http://mydesktop.local:5600/api/0"
}
}
}
}Restart your MCP client and test
Restart Claude Desktop and ask it to list your ActivityWatch buckets. You should see a list of your configured watchers, confirming the server is connected to the ActivityWatch API.
ActivityWatch Examples
Client configuration
Claude Desktop config using the locally built ActivityWatch MCP server.
{
"mcpServers": {
"activitywatch": {
"command": "node",
"args": ["/Users/yourname/activitywatch-mcp-server/dist/index.js"],
"env": {
"AW_API_BASE": "http://localhost:5600/api/0"
}
}
}
}Prompts to try
Natural language queries about your computer activity and productivity patterns.
- "What ActivityWatch buckets do I have configured?"
- "Which applications did I use most today?"
- "How much time did I spend in VS Code this week?"
- "What websites consumed the most time today?"
- "Show me my productivity patterns for the last 7 days"
- "How many hours did I spend in meetings versus coding yesterday?"Troubleshooting ActivityWatch
Connection refused or no buckets found
Verify ActivityWatch is running by opening http://localhost:5600 in a browser. If it is not running, start it from your Applications folder or system tray. The MCP server connects to the ActivityWatch REST API and requires the daemon to be active.
AQL query errors when asking complex questions
The MCP server abstracts most AQL complexity, but if you use the run-query tool directly, note that all query statements must be combined in a single string within the array, separated by semicolons — not split across multiple array elements. Example: ["events = query_bucket('aw-watcher-window_hostname'); RETURN = events"].
No data returned for time period queries
Check that ActivityWatch watchers (aw-watcher-afk, aw-watcher-window) are installed and running. Without active watchers, the buckets exist but contain no events. Visit the ActivityWatch web UI at http://localhost:5600 to verify data is being collected.
Frequently Asked Questions about ActivityWatch
What is ActivityWatch?
ActivityWatch is a Model Context Protocol (MCP) server that connects ai assistants to activitywatch for real-time computer activity awareness and time tracking analysis. enables natural language queries about app usage, browsing history, and productivity patterns through high-level tools without requiring aql It connects AI assistants to external tools and data sources through a standardized interface.
How do I install ActivityWatch?
Follow the installation instructions on the ActivityWatch GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with ActivityWatch?
ActivityWatch works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is ActivityWatch free to use?
Yes, ActivityWatch is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
ActivityWatch Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to ActivityWatch? Here are other popular monitoring & observability servers you can use with Claude, Cursor, and VS Code.
Netdata
★ 78.9kReal-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Kubeshark
★ 11.9keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
Mission Control
★ 4.9kSelf-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
Grafana
★ 3.0kThis MCP server enables natural-language querying of Grafana logs by automatically detecting log sources and service labels. It provides read-only access to log data with intelligent caching for efficient repeat queries.
Sentrux
★ 2.4kReal-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improvement of code quality. Pure Rust.
OpenInference
★ 986OpenTelemetry Instrumentation for AI Observability
Browse More Monitoring & Observability MCP Servers
Explore all monitoring & observability servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up ActivityWatch in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use ActivityWatch?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.