screentime-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@screentime-mcp-server show my app usage for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
screentime-mcp-server
MCP server for querying macOS Screen Time data. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
Reads app usage data directly from macOS knowledgeC.db via sqlite3 CLI — no native modules or dependencies required.
Requirements
macOS (Screen Time must be enabled)
Node.js >= 18
Full Disk Access must be granted to the host application (Claude Desktop, Terminal, etc.)
Granting Full Disk Access
Open System Settings → Privacy & Security → Full Disk Access
Add the application that runs the MCP server (e.g., Claude Desktop, Terminal, WezTerm)
This is required because knowledgeC.db is in a protected location.
Related MCP server: context-archive
Setup
Claude Code
claude mcp add screentime -- npx -y screentime-mcp-serverClaude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"screentime": {
"command": "npx",
"args": ["-y", "screentime-mcp-server"]
}
}
}Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"screentime": {
"command": "npx",
"args": ["-y", "screentime-mcp-server"]
}
}
}Tools
get_screentime
Get app usage data for a specific date with human-readable app names.
Parameters:
Parameter | Type | Default | Description |
| string | today | Date in |
| number | 60 | Minimum usage duration in seconds |
Example output:
# Screen Time: 2026-02-14
**Total: 5h 30m**
- WezTerm: 2h 15m
- Arc: 1h 30m
- Ableton Live: 55m
- Obsidian: 50m
## Hourly Breakdown
- **09:00**: WezTerm 45m, Arc 12m
- **10:00**: Ableton Live 55m
- **11:00**: WezTerm 40m, Arc 18m
## Timeline Detail
- 09:05-09:50 WezTerm (45m)
- 09:50-10:02 Arc (12m)
- 10:02-10:57 Ableton Live (55m)screentime_sql
Run a custom SQL query directly against knowledgeC.db.
Parameters:
Parameter | Type | Description |
| string | SQL query to execute |
Schema notes:
Table:
ZOBJECTFilter:
ZSTREAMNAME = '/app/usage'App bundle ID:
ZVALUESTRINGTimestamps use Core Data epoch (add
978307200to convert to Unix timestamp)Use
'localtime'modifier for local timezone
App Name Resolution
Bundle IDs are resolved to human-readable names using:
Built-in dictionary (common apps like Safari, Chrome, VS Code, Slack, etc.)
mdfind+mdlslookup (finds any installed app)Fallback: last component of bundle ID, capitalized
License
MIT
Available Tools
2 toolsget_screentimeB
Get app usage data for a specific date. Returns per-app usage grouped by hour with human-readable app names.
Inputs: date, min_seconds.
screentime_sqlA
Run a custom SQL query against macOS knowledgeC.db (Screen Time database). Use ZOBJECT table with ZSTREAMNAME='/app/usage'. Timestamps use Core Data epoch (978307200 offset from Unix). Returns raw pipe-separated results.
Inputs: sql (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
get_screentime and screentime_sql have distinct roles: one is a convenience wrapper for date-specific usage, the other allows arbitrary SQL. However, an agent might be unsure when to use the specific date tool versus writing SQL, especially since both can return usage data.
The names follow different conventions: get_screentime uses a clear verb_noun pattern, while screentime_sql is noun-based and lacks a verb, making the set feel inconsistent. This mixing reduces predictability.
Two tools is quite thin for a server that could expose more granular Screen Time operations (e.g., date ranges, app lists, totals). The SQL escape hatch adds power, but the surface still feels minimal.
The combination of a targeted get_screentime tool and a general SQL query tool covers most retrieval needs, including custom queries. Minor gaps exist (e.g., no built-in date-range summary or app enumeration), but the SQL tool allows agents to compensate.
Maintenance
Related MCP Connectors
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Query selected Google and Bing analytics, search, and advertising reports through MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools to read local Timing.app activity data, generate aggregated time entries, and push them to the Timing Web API.1MIT
- AlicenseCqualityCmaintenanceEnables agents to query a local macOS archive of Knowledge and browser history through read-only stdio MCP tools for status, timelines, search, original records/blobs, schemas, bounded SQL, and usage or domain summaries.143MIT
- AlicenseAqualityCmaintenanceLets MCP clients search iMessages, read Apple Notes including checklist state, and look up Contacts on macOS.12MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to observe and operate macOS desktop apps, including existing browser windows and signed-in sessions, through a local MCP adapter.1MIT