clockify-mcp-server

clockify-mcp-server

Enables logging time entries to Clockify via LLM agents, supporting bulk creation, project lookup by name, and local timezone handling. A local stdio MCP server that converts natural language time requests into Clockify API calls.

Category
访问服务器

README

clockify-mcp-server

Log your project hours in Clockify by asking your agent, instead of clicking through the web UI.

"add 4h on ACME every morning this week and 4h on Evil Corp every afternoon"

→ one approval prompt, 10 entries created, 40h total.

A local stdio MCP server. Each person runs it themselves with their own API key — nothing is shared or hosted.

Tool What it does
list_projects Active projects in your workspace
log_time Create entries in bulk — project by name, date + start/end in local time
list_time_entries Your entries between two dates
delete_time_entries Delete entries

Times are always local to your Clockify profile timezone. You say 09:00, the server reads settings.timeZone from your Clockify profile and converts to UTC. You never deal with UTC, and neither does the agent.

Not supported yet: tags, clients, running timers (start/stop), editing existing entries, reports.


Use it

Everything you need if you just want to log time. Takes about two minutes.

1. Install bun (tested on 1.3.14) and the dependencies:

curl -fsSL https://bun.sh/install | bash # install bun if needed
git clone <this-repo> && cd clockify-mcp-server
bun install

There is no build step — bun runs the TypeScript directly.

2. Get your Clockify API key:

  • Clockify → your avatar → Preferences → ADVANCED tab → Manage API keys → GENERATE NEW

3. Register the server with your agent.

Claude Code — copy this as-is, from the repo root you just cloned into:

claude mcp add clockify -s user -e CLOCKIFY_API_KEY=<key> -- bun "$PWD/src/index.ts"

-s user writes it to your personal config so it loads in every project, not just this one (the default scope, local, would bind it to this directory). $PWD is expanded by your shell before claude sees it, so the stored path is absolute.

Any other harness (Cursor, VS Code, Zed, Claude Desktop…) — same three things in its MCP config. Print the path to paste:

echo "$PWD/src/index.ts"
{
  "mcpServers": {
    "clockify": {
      "command": "bun",
      "args": ["<paste the absolute path here>"],
      "env": { "CLOCKIFY_API_KEY": "<key>" }
    }
  }
}

The path must be absolute: your agent starts the server from whatever directory it happens to be working in, not from this repo.

4. Check it — in a fresh session:

list my clockify projects
log 2 hours on <project> today from 09:00 to 11:00, description test
show my clockify entries for this week
delete that entry

Open the Clockify web UI after the second prompt and confirm the entry reads 09:00–11:00. If it shows a different time, your Clockify profile timezone is not what you think it is — fix it in Clockify preferences, everything here follows from it.

Environment

Variable Required Notes
CLOCKIFY_API_KEY yes Preferences → Advanced → Manage API keys
CLOCKIFY_WORKSPACE_ID no Defaults to your active workspace — only needed if you are in several
CLOCKIFY_API_BASE no Regional hosts: https://euc1.clockify.me/api/v1 (EU), euw2 (UK), use2 (US), apse2 (AU)

If something goes wrong

  • CLOCKIFY_API_KEY is not set — the key did not reach the server process. Put it in the harness config's env, not in your shell.
  • Ambiguous project "x". Candidates: … — deliberate. The server refuses to guess an id; use one of the listed names.
  • 404s on every call — your workspace is on a regional host. Set CLOCKIFY_API_BASE.
  • Entries land at the wrong hour — check your Clockify profile timezone (see step 4).

Develop it

None of this is needed to just use the server.

bun test      # unit tests, no network
bun run check # biome format + lint, applies fixes
bun run start # start the server on stdio (needs CLOCKIFY_API_KEY)

bun install also installs the git hooks (preparelefthook install), so biome check --write runs on your staged files at commit time and restages what it fixed. Nothing else to set up.

For local runs, bun auto-loads .env from the repo root, so a gitignored CLOCKIFY_API_KEY=<key> there saves you retyping it. That only works when the working directory is the repo, which is why the harness config above passes the key explicitly.

Layout

src/clockify.ts      # API client, memoised user/project/task lookups, timezone conversion
src/index.ts         # McpServer + the four tools + stdio wiring
src/clockify.test.ts # the parts worth testing: DST conversion, name resolution, payload building
docs/                # Clockify API request/response samples
plans/               # what was built and what was deliberately left out

The interesting code is localToUtc / interval in src/clockify.ts — a stdlib Intl.DateTimeFormat round-trip, no date library. Change it and run bun test; the DST cases are the ones that catch mistakes.

Shipping to someone without bun: bun build --compile --outfile clockify-mcp src/index.ts produces one self-contained binary to point the harness at instead.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选