Timebook

io.github.squidcode由 GitHub 账号 squidcode 发布v0.6.0更新于 Oct 24, 2026

Track time on usetimebook.com - start/stop timers, log entries, list projects/clients.

已验证Streamable HTTP可网页运行效率与工作流

概览

AI 生成的概览

Timebook MCP 服务器,让助手在 Timebook 账户中记录工时:启动和停止计时器、登记条目、列出项目和客户。

可以做什么
查看当前登录用户,并列出权限范围内的项目和客户(只读),以便在操作前确认名称。在项目上启动和停止正在运行的计时器。按时长或按开始与结束时间手动登记工时条目。按项目和日期筛选列出最近的条目。修改条目的字段或删除条目,受令牌归属和已开票条目锁定限制。
适用场景
适合希望用对话方式让 AI 助手在 Timebook 中记录或调整工时的场景,例如为某项任务启动计时器、为项目登记工时,或更正和删除最近的条目。
运行要求
可使用带 OAuth 2.0 的托管 Streamable-HTTP 端点,或通过 stdio 运行本地 npm 包(需 Node.js 18.17 及以上)。本地使用需先在终端执行一次登录,将 API 令牌保存到配置文件。可选环境变量 TIMEBOOK_API_URL 和 TIMEBOOK_WEB_URL 可覆盖 API 与网页主机地址。
安装前请注意
助手可以写入你的工时记录:启动和停止计时器,登记、修改和删除条目。令牌只能修改其自身创建的条目,已开票条目会被锁定。保存的 API 令牌属于凭据,存放在本地配置文件中;如有需要可在 Timebook 设置中撤销。工具的输入输出会经过 MCP 宿主的模型上下文。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Timebook,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.squidcode%2Ftimebook/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "timebook": {
      "type": "http",
      "url": "https://usetimebook.com/mcp"
    }
  }
}

README

Timebook CLI

Command-line client and MCP server for Timebook — track time, manage timers, and expose your Timebook account to AI agents (Claude, Codex, Cursor, …) over the Model Context Protocol.

[npm] [license] [timebook-cli MCP server]

Install

bash
# one-offnpx @squidcode/timebook login
# globallynpm install -g @squidcode/timebooktimebook --help

Requires Node.js 18.17+.

Authenticate

timebook login opens your browser, you log into Timebook (or use an existing session) and pick a scope (which clients/projects this token can touch). The browser delivers the token back to a short-lived loopback HTTP listener, which the CLI then writes to a config file with 0600 permissions.

bash
timebook login

The token is stored at:

  • macOS: ~/Library/Preferences/timebook/config.json
  • Linux: ~/.config/timebook/config.json
  • Windows: %APPDATA%\timebook\Config\config.json

The token never leaves your machine after login. To revoke it server-side, visit https://usetimebook.com/settings/api-tokens.

Use it as a CLI

bash
timebook whoamitimebook projects                         # list projectstimebook clients                          # list clients
timebook start -p "Acme website" -d "Wireframes"timebook status                           # show running timertimebook stop
# manual entriestimebook log -p "Acme website" -t 1h30m -d "Code review"timebook log -p PROJ_ID --start 2026-05-04T09:00 --end 2026-05-04T10:30
timebook entries --project "Acme website" -n 10
# edit / delete (any combination of fields; unset ones stay as-is)timebook entries edit ENTRY_ID -t 2h -d "code review + tests"timebook entries edit ENTRY_ID --start 2026-05-04T09:00 --end 2026-05-04T11:00timebook entries edit ENTRY_ID -d ""                    # clear descriptiontimebook entries delete ENTRY_ID

Duration formats accepted: 1h, 45m, 1h30m, 1.5h, 1:30, or a bare number (interpreted as minutes — e.g. 90 → 1h 30m).

Edit / delete authorization: an API token can only modify entries it created itself. JWT sessions (the web UI) and admin tokens bypass this rule. Invoiced entries are locked for everyone via the API. A 403 with a friendly message is returned on a denied attempt — fix the entry from the web UI or with the token that created it.

Use it as an MCP server

The same binary speaks MCP over stdio when invoked with timebook mcp. Drop it into any MCP-aware host (Claude Code, Claude Desktop, Codex, Cursor, …):

Claude Code / Claude Desktop

json
{  "mcpServers": {    "timebook": {      "command": "npx",      "args": ["-y", "@squidcode/timebook", "mcp"]    }  }}

Or, if installed globally:

json
{  "mcpServers": {    "timebook": {      "command": "timebook",      "args": ["mcp"]    }  }}

The MCP server reuses the token saved by timebook login — run timebook login once in a terminal before starting the agent.

Use it as a remote MCP (Claude.ai web)

Timebook also runs as a hosted Streamable-HTTP MCP server at https://usetimebook.com/mcp with full OAuth 2.0 (Dynamic Client Registration + PKCE + refresh-token rotation). No CLI install required — Claude.ai discovers it via the standard well-known endpoints:

  • Auth-server metadata: https://usetimebook.com/.well-known/oauth-authorization-server
  • Resource metadata: https://usetimebook.com/.well-known/oauth-protected-resource/mcp

Connect from Claude.ai → Settings → Connectors → Add → paste https://usetimebook.com/mcp. You'll be redirected to Timebook's consent page once, then Claude can use all the same tools listed below. Same OAuth-style permissions you'd see for any first-class connector.

The HTTP endpoint also accepts Authorization: Bearer tbk_* (your existing API token) for any client that prefers token-paste over OAuth — including server-to-server use.

Tools exposed to the model

ToolWhat it does
whoamiCurrent authenticated user (read-only)
list_projectsAll projects in scope (read-only)
list_clientsAll clients in scope (read-only)
get_active_timerThe running timer, or null (read-only)
start_timerStart a timer on a project
stop_timerStop the running timer
log_timeLog a manual entry (duration OR startTime+endTime)
list_entriesRecent entries (default 50, max 500), project + date filters
update_entryEdit one or more fields on an entry (description, duration, startTime, endTime, project, rate). Token must own the entry.
delete_entryDelete an entry. Token must own it. Invoiced entries are locked.

Try it with prompts

Once the MCP server is connected, ask the model in plain English:

  • "Start a timer on my Acme website project for landing-page wireframes."
  • "How much time did I log on the Recycler project last week?"
  • "Log 1 hour 30 minutes against ChatNexus from 9am this morning at the Software Development rate, with description 'code review of the auth refactor'."
  • "What am I currently working on?" — invokes get_active_timer.
  • "Stop my timer."
  • "My last entry on Recycler should be 2 hours, not 1h45m. Fix it." — invokes list_entries then update_entry.
  • "Delete the entry I just made by mistake." — invokes delete_entry. Will 403 if the entry was created by a different token (web UI, another agent) — say so to the model so it doesn't keep retrying.

The model picks the right tool, asks list_projects first if it needs to disambiguate a name, and writes through start_timer / log_time / stop_timer.

Privacy

Timebook CLI runs on your machine and only talks to your Timebook account.

  • Authentication: timebook login mints a personal API token via Timebook's OAuth-style consent screen. The token is stored locally with 0600 permissions (~/Library/Preferences/timebook/config.json on macOS, ~/.config/timebook/config.json on Linux, %APPDATA%\timebook\Config\config.json on Windows). It is never transmitted anywhere except https://usetimebook.com (or your override) on outgoing API calls.
  • Telemetry: none. Neither the CLI nor the MCP server reports usage, errors, or analytics anywhere.
  • MCP host data: when you use timebook mcp from inside Claude / Cursor / etc., the MCP host (not Timebook) controls what the model sees. Tool inputs and outputs flow through the host's normal model-context pipeline.
  • Revoking access: visit https://usetimebook.com/settings/api-tokens to revoke the token at any time.

For Timebook's product-level privacy policy, see https://usetimebook.com/privacy.

Configuration

Override the API/web hosts (useful for self-hosted Timebook or local dev):

bash
TIMEBOOK_API_URL=https://api.example.com \TIMEBOOK_WEB_URL=https://example.com \timebook login

You can also pass --api-url and --web-url to timebook login once; subsequent commands re-use the saved values.

If timebook login errors with State mismatch or you want to see exactly which requests reach the loopback callback, run with --debug:

bash
timebook login --debug

Develop

bash
git clone https://github.com/squidcode/timebook-clicd timebook-clinpm installnpm run dev -- --help        # tsx-powered hot-loopnpm run build                # emits dist/npm run lint && npm run typecheck && npm run test

Pre-commit hooks (ESLint + Prettier via lint-staged) are wired up by husky on npm install.

Release

prepublishOnly runs lint + typecheck + tests + build, then:

bash
npm publish --access public

License

MIT © Squidcode LLC. See LICENSE.

来源:README.md,提交 d2416f1

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v0.6.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分