ClockifyMCP

ClockifyMCP

Enables personal Clockify time tracking through ChatGPT and other MCP clients, allowing users to manage timers, entries, and reports via natural language.

Category
访问服务器

README

ClockifyMCP

Remote-first MCP server and ChatGPT app for personal Clockify time tracking.

ClockifyMCP exposes a small, review-friendly set of Clockify tools for ChatGPT and other MCP clients:

  • Read profile, workspaces, projects, tasks, clients, tags, entries, current timer, and report summaries.
  • Start/stop timers and create/update personal time entries.
  • Delete personal time entries only with exact server-side confirmation.

The first release intentionally avoids team/admin/project management features to reduce permission and review risk.

Status

ClockifyMCP is a pre-deployment release candidate for a hosted remote MCP server. The tested core includes:

  • Clockify REST client with pagination, retry, and error normalization.
  • Encrypted Clockify API key storage primitives.
  • Local OAuth access-token utilities, authorization-code + PKCE service, JWT jti, and persisted authorization-code/token revocation support.
  • MCP tool descriptors, schema validation, and tool handlers.
  • Fastify HTTP boundary for liveness/readiness, OAuth metadata, MCP server card, OAuth challenge, OAuth authorize/token/revoke routes, Clockify API-key onboarding UI/API, stored credential deletion, initialize, tools/list, and tools/call.
  • Production app factory that wires Postgres credential storage, Postgres OAuth authorization-code and token revocation storage, OAuth service, and Clockify clients from environment variables.

The public deployment target is https://clockify.velryx.cc. Live MCP Inspector and ChatGPT developer-mode validation must still be captured after deployment.

Support: petylo.work+mcp@gmail.com Security: petylo.work+mcp@gmail.com Telegram: @edwy_reed

Development

npm install
npm test
npm run typecheck
npm run build
npm run readiness

Migration SQL lives in src/db/migrations/. Apply it to the production Postgres database before starting the hosted app.

Production OAuth authorization codes are stored in Postgres as short-lived, single-use records. This keeps ChatGPT account linking resilient across app restarts and multi-instance deployments.

Deployment details are documented in docs/deployment.md, including environment variables, migrations, HTTPS proxy requirements, and GET /healthz versus GET /readyz.

Marketplace validation and implementation standards are tracked in docs/standards-and-validation.md.

Run locally:

cp .env.example .env
# Replace CLOCKIFY_CREDENTIAL_ENCRYPTION_KEY and OAUTH_JWT_SECRET in .env.
# Apply src/db/migrations/001_oauth_credentials.sql to the Postgres database from .env.
npm run dev

npm run dev loads .env when it exists. PUBLIC_BASE_URL=http://localhost:3000 is accepted only for local loopback development; deployed ChatGPT/OAuth linking still requires a public HTTPS origin. The local runtime still requires a reachable Postgres database with migrations applied.

Generate a 32-byte encryption key:

node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"

Configuration

Required production environment:

  • PUBLIC_BASE_URL: public HTTPS app origin. Local loopback development may use http://localhost:3000.
  • TRUST_PROXY_HOPS: number of trusted reverse-proxy hops for client IP resolution, default 1 in production runtime.
  • DATABASE_URL: production database connection.
  • CLOCKIFY_CREDENTIAL_ENCRYPTION_KEY: 32-byte base64 key for encrypted Clockify API keys.
  • CLOCKIFY_CREDENTIAL_ENCRYPTION_KEY_VERSION: active encryption key version.
  • OAUTH_JWT_SECRET: signing secret for local OAuth access tokens.
  • OAUTH_ALLOWED_REDIRECT_URIS: comma-separated allow-list for OAuth redirects.
  • OAUTH_TOKEN_TTL_SECONDS: access-token lifetime.
  • SENSITIVE_ROUTE_RATE_LIMIT_MAX: per-client limit for OAuth/onboarding POST attempts.
  • SENSITIVE_ROUTE_RATE_LIMIT_WINDOW_MS: rate-limit window for OAuth/onboarding POST attempts.

For production ChatGPT app linking, add the redirect URI shown in Apps & Connectors, typically https://chatgpt.com/connector/oauth/{callback_id}, to OAUTH_ALLOWED_REDIRECT_URIS.

.env.example includes local sample values only. Never commit real Clockify API keys or OAuth secrets.

npm run readiness is a release gate for marketplace submission. It is expected to fail until live MCP Inspector evidence and ChatGPT developer-mode validation are recorded for the deployed endpoint.

Public ChatGPT submission is also blocked until the Clockify API-key onboarding policy gate in docs/marketplace-readiness.md is resolved. The current v1 flow asks users to enter a Clockify API key into ClockifyMCP, which must be explicitly accepted for public review or replaced with an approved Clockify authorization path.

Security Model

Clockify public API uses API keys. ChatGPT Apps account linking expects OAuth. ClockifyMCP therefore implements an OAuth wrapper:

  1. User links ClockifyMCP through ChatGPT.
  2. ChatGPT redirects the user to the ClockifyMCP onboarding UI.
  3. User enters a Clockify API key in the ClockifyMCP onboarding UI.
  4. The service validates the key with Clockify and stores only encrypted ciphertext plus non-secret metadata.
  5. MCP tools use OAuth token subject + credential owner checks before decrypting credentials.

Clockify API keys are not scope-limited by Clockify, so v1 limits the exposed server-side tool surface to personal time tracking.

OAuth token exchange and Clockify API-key onboarding POST routes have an in-process rate limit. Keep an edge or platform rate limit in front of the public endpoint as well.

Users can disconnect stored Clockify credentials by calling DELETE /api/credential with a valid OAuth bearer token. The endpoint deletes all stored encrypted Clockify credentials for the token subject and returns a no-store response.

MCP Tools

V1 tools:

  • get_clockify_profile
  • search_clockify_entities
  • list_time_entries
  • get_current_timer
  • start_timer
  • stop_timer
  • create_time_entry
  • update_time_entry
  • delete_time_entry
  • summarize_time_report

Tool descriptors are defined in src/mcp/tools.ts; handlers are in src/mcp/handlers.ts.

Marketplace Checklist

Before submitting to ChatGPT or MCP catalogs:

  • Deploy a stable public HTTPS endpoint.
  • Configure deployment readiness probes against GET /readyz.
  • Verify OAuth account linking in ChatGPT developer mode.
  • Validate MCP with MCP Inspector.
  • Capture screenshots and test prompts required by the OpenAI submission form.
  • Publish privacy policy and terms at stable public URLs.
  • Prepare demo Clockify account with sample data and no blocking 2FA/sign-up step.
  • Verify organization permissions and OpenAI project eligibility in the dashboard.
  • Run npm run readiness and resolve every reported blocker.

Distribution Plan

Primary:

  • Public hosted remote MCP endpoint for ChatGPT Apps.
  • GitHub repository as source of truth.
  • Official MCP Registry metadata pointing to the remote endpoint.

Secondary:

  • Smithery remote URL publishing.
  • Glama connector metadata.
  • Docker MCP Catalog after container hardening.

CAKE/Clockify Marketplace add-on support is a later track because it uses X-Addon-Token rather than the API-key OAuth wrapper used by v1.

推荐服务器

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

官方
精选