时间表ai
用于本地时间跟踪的MCP服务器。直接从您的AI编码代理跟踪您如何度过时间——没有外部服务,没有帐户,一切都留在您的机器上。
为什么
AI编码代理(Claude Code、Cursor、Windsurf……)已经知道你在做什么。这个MCP服务器让他们 自动跟踪您的时间 当你工作时,你不必记住启动/停止计时器或手动填写时间表。
在一天结束时,您会有一个完整的日志,记录您所做的工作,以及工作时间,按项目和任务分组,准备导出到公司的时间表系统。
特性
- 自动会话跟踪 --每个代理会话都会记录其项目名称
- 启动/停止计时器 --实时跟踪时间,启动新计时器时自动停止之前的计时器
- 手动记录 --事后记录时间条目
- 标签和过滤器 --使用标签对条目进行分类,按任务/标签/日期/项目进行筛选
- 摘要 --获取按任务分组的时间报告
- 每个会话文件 --每个会话都存储为单独的JSON文件
~/.mcp-timesheet/ - 完全本地化 --没有外部服务,没有帐户,没有数据离开您的机器
工具
| 工具 | 说明 |
|---|---|
start_timer | 为任务启动计时器(自动停止任何正在运行的计时器) |
stop_timer | 停止当前正在运行的计时器 |
timer_status | 检查当前计时器的运行时间 |
log_time | 手动记录任务的时间 |
get_task_summary | 使用可选筛选器按任务分组获取时间摘要 |
list_entries | 使用可选筛选器列出时间条目 |
delete_entry | 按ID删除时间条目 |
安装
npm install -g timesheet-ai或者从源代码运行:
git clone https://github.com/TLmaK0/timesheet-ai.git
cd timesheet-ai
npm install
npm run build设置
克劳德代码
添加到全局配置(~/.claude.json 在...之下 mcpServers):
{
"mcpServers": {
"timesheet-ai": {
"command": "npx",
"args": ["-y", "timesheet-ai"]
}
}
}然后将以下内容添加到您的项目中 CLAUDE.md (或全局指令),以便代理自动跟踪时间:
## Time tracking
You are connected to a time tracking system. Session time is tracked automatically,
but you MUST describe what you're working on.
Every time the user gives you a new task or changes topic, call `start_timer` with:
- task: a concise description (e.g. "Fix login bug", "Add CSV export")
- tags: relevant categories (e.g. "dev", "bugfix", "review", "docs")
Call `start_timer` BEFORE you start working on the task.
When a task is completed and there's no new task, call `stop_timer`.
When the user asks about time spent, use `get_task_summary` or `list_entries`.克劳德桌面版
添加到您的Claude桌面配置(claude_desktop_config.json):
{
"mcpServers": {
"timesheet-ai": {
"command": "npx",
"args": ["-y", "timesheet-ai"]
}
}
}其他MCP客户端
任何兼容MCP的客户端都可以使用此服务器。只需指出:
npx -y timesheet-ai使用示例
配置后,您的AI代理将在您工作时跟踪时间。您还可以直接与它交互:
- *启动API重构的计时器,标记为dev和后端*
- *“停止计时器”*
- *“为设计审查会议记录45分钟”*
- *“我这周花了多少时间?”*
- *“按任务显示3月份的摘要”*
- *“列出标记为bugfix的所有条目”*
数据存储
所有时间条目都存储在本地 ~/.mcp-timesheet/ 作为单独的JSON会话文件。没有数据发送到任何外部服务。
许可证
麻省理工学院
