| name | timing-local-mcp | |||
|---|---|---|---|---|
| description | Query the Timing app's local SQLite database to retrieve time tracking data: app usage, window titles, durations, and project assignments. Uses three read-only MCP tools: list_timing_tables, get_timing_schema, and query_timing_db. | |||
| compatibility |
|
list_timing_tables()— lists all tables in the databaseget_timing_schema(table_name)— returns column definitions for a tablequery_timing_db(sql_query, limit)— executes a read-only SQL query;limitdefaults to 200 rows, increase as needed for large date ranges
- AppActivity — core records: app, window title, start/end timestamps, project assignment
- Application — app metadata: bundle ID, display name
- Title — window title strings referenced by AppActivity
- Project — Timing projects for categorising entries
- TaskActivity — task-level time tracking
All startDate and endDate fields in AppActivity are Unix timestamps (REAL). Always convert using:
datetime(startDate, 'unixepoch', 'localtime')Always exclude soft-deleted entries:
WHERE aa.isDeleted = 0The Title table uses stringValue for the window title string — not title.
Pass a higher limit value when querying large date ranges to avoid truncated results.
-- Time spent per app today
SELECT app.title AS app,
ROUND(SUM(aa.endDate - aa.startDate) / 60.0, 1) AS minutes
FROM AppActivity aa
JOIN Application app ON aa.applicationID = app.id
WHERE aa.isDeleted = 0
AND datetime(aa.startDate, 'unixepoch', 'localtime') >= date('now')
GROUP BY app.title
ORDER BY minutes DESC;-- Activity log for a specific hour
SELECT datetime(aa.startDate, 'unixepoch', 'localtime') AS start,
datetime(aa.endDate, 'unixepoch', 'localtime') AS end,
app.title AS app,
t.stringValue AS window
FROM AppActivity aa
JOIN Application app ON aa.applicationID = app.id
LEFT JOIN Title t ON aa.titleID = t.id
WHERE aa.isDeleted = 0
AND datetime(aa.startDate, 'unixepoch', 'localtime') >= '2026-01-01 09:00:00'
AND datetime(aa.startDate, 'unixepoch', 'localtime') < '2026-01-01 10:00:00'
ORDER BY aa.startDate;When the user asks about their time tracking data:
- If the question is exploratory (e.g. "what did I work on today?"), start with the time-per-app query and offer to drill down.
- If a specific app, project, or time range is mentioned, query directly with the appropriate filters.
- If the schema is unfamiliar, call
get_timing_schemaon the relevant table before querying. - Always present results in a readable format — convert minutes to hours where appropriate, and summarise before listing raw rows.