time-tracker-mcp

time-tracker-mcp

A local MCP server that reads logged hours from an internal time tracker, providing tools to list time entries, projects, and the active timer. It is read-only, enabling Claude Code to see time-tracking data without writing.

Category
访问服务器

README

time-tracker-mcp

A local MCP server that lets Claude Code read your logged hours from our internal time tracker.

Phase 0 of bench project BP-006 — Remote MCP Skill (remote-mcp-skill). This is the reference implementation: get the tool logic right locally, then port it to AWS.

Why

Open Google Calendar, read last week's meetings, and transcribe them into the tracker by hand. Claude can already see your calendar via the Google Calendar connector — it just can't see the tracker. This closes that gap:

You: What meetings from last week haven't I logged yet?

Claude: [reads calendar, reads tracker, diffs]
        Logged 4h. Calendar shows 7h 45m. Missing:
        - Thu 30 Jul, Prism Standup, 15m
        - Fri 31 Jul, Masterclass, 3h
        Flag: Fri Masterclass overlaps Mentors x Interns 16:30-17:00.

Read-only. It tells you what to enter; it does not enter it.

Tools

Tool Returns
list_time_entries(start, end) entries in a date range — day, start, hours, project, task, description, billable
list_projects() project ids and names
get_active_timer() the running timer, or null

Any range works — a day, a week, a month. Totals and grouping are left to the caller: the tools return rows, Claude does the arithmetic.

Install

git clone https://github.com/mikka-oldst/time-tracker-mcp.git
cd time-tracker-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
cp .env.example .env          # then fill in — see Auth below
.venv/bin/python server.py --smoke

--smoke checks the date conversions offline, then makes one live call per tool. Run it before wiring anything up; it fails loudly and specifically.

Then register it (absolute paths — Claude spawns this as a subprocess with no shell context):

claude mcp add -s user time-tracker -- \
  /full/path/to/time-tracker-mcp/.venv/bin/python \
  /full/path/to/time-tracker-mcp/server.py

Restart your session, confirm with /mcp, and ask it something.

Auth

Two cookie values, pasted once. The server exchanges them for a fresh Convex JWT on demand, so you never hand-paste a token.

DevTools → Application → Cookies → the tracker's domain:

Cookie .env key
__session CLERK_SESSION_COOKIE
__clerk_db_jwt CLERK_DB_JWT

The Clerk session id is read from the cookie's sid claim, so there is nothing else to copy. Leave CLERK_JWT blank — if it is set, it overrides refresh.

Tokens come from Clerk's convex JWT template and last an hour. The default template mints 60-second tokens that expire before you can use them, which is why the template name matters.

How it works, and what surprised us

The tracker is Next.js on Vercel with Clerk auth and a Convex backend. It has no REST API — the browser talks to Convex over a WebSocket. Probing /api/* returns 404 for everything, and the Network tab looks empty unless you filter to WS and read the frames.

Function names and argument shapes came from the ModifyQuerySet frames in that WebSocket. timeEntries:listByWeek takes an arbitrary range despite its name — the UI calls it with a single day.

Three things worth knowing if you extend this:

  • Epoch milliseconds, Manila midnight. Not UTC. Getting it wrong shifts entries by a day. Asserted against real captured frames in smoke().
  • Convex returns HTTP 200 on function failure. Check status in the response body, not the status code.
  • Entries carry 21 fields, most of it Clockify/ClickUp sync plumbing. They get trimmed to 7 before reaching Claude; passing the rest floods the context.

We use httpx against Convex's HTTP query endpoint rather than the official convex Python client, which hung indefinitely with no timeout option.

Limitations

  • Local only. The cookie-refresh flow uses Clerk's undocumented client API and authenticates as you. It cannot run on Lambda. A remote deployment needs a Convex deploy key or a Clockify API key.
  • Read-only. No writing entries. A human should confirm hours.
  • Calendar shows invitations, not attendance. RSVPs are often needsAction, so a meeting on the calendar is not proof you attended it.
  • Overlapping meetings need a human rule. The tools surface the conflict rather than guessing which one wins.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选