这是一个提供与 Clockify 时间跟踪 API 全面集成的 Model Context Protocol (MCP) 服务器。该服务器通过标准化接口实现自动时间条目管理、项目组织、任务跟踪和报告。
想以故事形式阅读 LinkedIn 文章
npm install -g @ratheesh-aot/clockify-mcp-server
在您的 MCP 客户端配置中添加以下内容:
{
"mcpServers": {
"clockify": {
"command": "clockify-mcp-server",
"env": {
"CLOCKIFY_API_KEY": "your_clockify_api_key"
}
}
}
}
your_clockify_api_key 替换为您自己的 API 密钥重启您的 MCP 客户端(Claude Desktop)并开始询问:
如果您希望从源码构建或参与开发:
git clone https://github.com/ratheesh-aot/clockify-mcp.git
cd clockify-mcp
npm install
npm run build
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["/full/path/to/clockify-mcp/dist/index.js"],
"env": {
"CLOCKIFY_API_KEY": "your_api_key_here"
}
}
}
}
get_current_user:获取当前用户信息get_workspaces:列出所有可访问的工作区get_workspace_users:获取工作区内的所有用户create_time_entry:创建新的时间条目,可选项目/任务关联get_time_entries:检索时间条目,带有全面的过滤选项update_time_entry:修改现有时间条目delete_time_entry:删除时间条目stop_time_entry:停止当前运行的时间条目create_project:创建具有客户关联的新项目get_projects:列出项目,带有过滤和分页get_project:获取详细的项目信息update_project:修改项目详情delete_project:删除项目create_task:在项目内创建任务get_tasks:列出任务,带有过滤选项get_task:获取详细的任务信息update_task:修改任务详情delete_task:删除任务create_client:创建新客户get_clients:列出客户,带有过滤update_client:修改客户信息delete_client:删除客户create_tag:创建用于分类的新标签get_tags:列出可用标签update_tag:修改标签详情delete_tag:删除标签get_detailed_report:生成全面的时间跟踪报告get_summary_report:生成带有分组选项的汇总报告{
"tool": "create_time_entry",
"arguments": {
"workspaceId": "workspace_id",
"description": "正在实施功能",
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T17:00:00Z",
"projectId": "project_id",
"billable": true
}
}
{
"tool": "get_time_entries",
"arguments": {
"workspaceId": "workspace_id",
"start": "2024-01-01T00:00:00Z",
"end": "2024-01-31T23:59:59Z",
"project": "project_id",
"page": 1,
"pageSize": 100
}
}
{
"tool": "create_project",
"arguments": {
"workspaceId": "workspace_id",
"name": "网站重新设计",
"clientId": "client_id",
"billable": true,
"isPublic": false,
"color": "#FF5722"
}
}
“命令未找到”错误:
# 检查是否正确安装
npm list -g @ratheesh-aot/clockify-mcp-server
# 如需重新安装
npm uninstall -g @ratheesh-aot/clockify-mcp-server
npm install -g @ratheesh-aot/clockify-mcp-server
“无效的 API 密钥”错误:
MCP 连接问题:
欢迎贡献!请随时提交 Pull Request。
MIT 许可证 - 详情见 LICENSE 文件。
由 Ratheesh Kumar 创建