时间追踪MCP服务器

一个生产就绪的Docker化MCP服务器,通过自然语言连接Claude与Everhour时间追踪API,管理项目、追踪时间、处理发票并生成报告。

  • by Npab19
  • API Blueprint
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 Npab19/MCP-Everhour

使用说明


Everhour MCP Server

A production-ready, Dockerized MCP server that connects Claude to the Everhour time tracking API -- manage projects, track time, handle invoices, and generate reports through natural language.
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Built With
  3. Getting Started
  4. Usage
  5. Available Tools
  6. Roadmap
  7. Contributing
  8. License
  9. Contact
  10. Acknowledgments

关于项目

此MCP(模型上下文协议)服务器将Everhour时间跟踪API公开为一组Claude可以直接使用的工具。它允许您完全通过自然对话来管理您的时间跟踪工作流程:

  • 跟踪时间、开始/停止计时器和管理考勤卡
  • 创建和管理项目、任务和部分
  • 处理客户、发票和费用
  • 安排资源并管理休假分配
  • 生成关于项目、客户和团队成员的报告
  • 管理webhooks以实现实时集成

该服务器作为Cloudflare隧道后面的Docker容器运行,不需要暴露的端口或复杂的网络设置。

(back to top)

构建于

(back to top)

入门指南

先决条件

  • 码头工人 和 Docker Compose 已安装
  • 一 Everhour API密钥 (设置>集成>API在Everhour)
  • A. Cloudflare隧道令牌 (从 Cloudflare零信任仪表板)

安装

  1. 克隆存储库:

    git clone https://github.com/npab19/everhour-mcp.git
    cd everhour-mcp
    
  2. 复制示例环境文件:

    cp .env.example .env
    
  3. 请填写您的凭据 .env:

    EVERHOUR_API_KEY=your_everhour_api_key
    MCP_BEARER_TOKEN=<generate with command below>
    Cloudflare_Token=your_cloudflare_tunnel_token
    

    生成安全的MCP承载令牌:

    python3 -c "import secrets; print(secrets.token_urlsafe(32))"
    
  4. 启动服务:

    docker compose up -d
    

提示: 您还可以使用GitHub容器注册表中的预构建映像,而不是在本地构建。更换 build: . 排队 docker-compose.yml 和 image: ghcr.io/npab19/everhour-mcp:latest.

(back to top)

用法

Claude.ai网络连接器

在Claude.ai中添加一个新的MCP连接器,URL为:

https://<your-tunnel-url>/mcp?api_key=<MCP_BEARER_TOKEN>

这将自动在您的所有设备上同步。

克劳德桌面版

将以下内容添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "everhour": {
      "type": "http",
      "url": "https://<your-tunnel-url>/mcp",
      "headers": {
        "Authorization": "Bearer <MCP_BEARER_TOKEN>"
      }
    }
  }
}

(back to top)

可用工具

类别 工具 描述
客户 list_clients, get_client, create_client, update_client, update_client_budget, delete_client_budget 管理客户及其预算
发票 list_invoices, get_invoice, create_invoice, update_invoice, refresh_invoice, set_invoice_status, export_invoice, delete_invoice 创建、管理和导出发票
开支 list_expenses, create_expense, update_expense, delete_expense, list_expense_categories, create_expense_category, update_expense_category, delete_expense_category 跟踪费用并管理类别
附件 create_attachment, add_attachment_to_expense, download_attachment, delete_attachment 上传和管理文件附件
日程 list_assignments, create_assignment, update_assignment, delete_assignment 资源计划员任务
休息时间 list_time_off_types, create_time_off_type, update_time_off_type, delete_time_off_type, list_allocations, create_allocation, update_allocation, delete_allocation 管理休假类型和分配
项目 list_projects, get_project, create_project, update_project, archive_project, update_project_billing, delete_project, sync_project, list_project_sections, get_section, create_section, update_section, delete_section 全面的项目和部门管理
任务 list_project_tasks, get_task, search_tasks, create_task, update_task, delete_task, update_task_estimate, delete_task_estimate 任务CRUD和时间估计
自定义字段 list_project_fields, create_field, update_field, delete_field, reorder_fields 管理项目自定义字段
时间记录 list_team_time, list_user_time, list_task_time, list_project_time, add_time, update_time, delete_time 记录和查询时间条目
计时器 start_timer, get_running_timer, list_team_timers, stop_timer 实时定时器管理
时间卡 get_timecard, list_user_timecards, list_all_timecards, clock_in, clock_out, update_timecard, delete_timecard 打卡和考勤卡管理
时间表 list_user_timesheets, list_team_timesheets, request_timesheet_approval, discard_timesheet_approval, approve_or_reject_timesheet 时间表审批工作流程
报告 get_projects_report, get_clients_report, get_users_report 仪表板报告和摘要
用户 get_current_user, list_team_users 用户和团队信息
网络钩子 get_webhook, create_webhook, update_webhook, delete_webhook Webhook管理

(back to top)

路线图

  • [x] Everhour API全面覆盖(16个资源组,80多个工具)
  • [x] 承载令牌认证中间件
  • [x] Cloudflare隧道集成
  • [x] GitHub Actions用于GHCR发布的CI/CD
  • [x] 使用重试后处理速率限制
  • []OAuth 2.1支持Claude.ai原生身份验证
  • []用于频繁访问数据的缓存层
  • []批量时间输入的批处理操作

请参阅 问题 以获取拟议功能和已知问题的完整列表。

(back to top)

贡献

欢迎捐款。贡献:

  1. 分叉项目
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支机构(git push origin feature/amazing-feature)
  5. 打开拉取请求

(back to top)

许可证

根据MIT许可证分发。看 LICENSE 了解更多信息。

(back to top)

联系

项目链接: https://github.com/npab19/everhour-mcp

(back to top)

致谢

(back to top)