
一个实时计时表工具——通过浏览器记录可计费时数,或通过AI助手记录,两者都看到完全相同的数据.
概览
一个实时计时表工具——通过浏览器记录可计费时数,或通过AI助手记录,两者都看到完全相同的数据. 1. 安装 uv 2. uv init 3. uv 添加 fastmcp fastapi "uvicorn[标准]" 4. uv 运行 fastmcp 版本——确认安装 5. 此 repo 的数据库. py, main.py, 和 静态/ 已经为您写出 6. uv 运行 uvicorn 主: app -- reload 7. 访问 [[T0] (website)和 [[T1] (MCP) 8. 连接 Claude 桌面 (见下文) 9. 向地平线省长部署公共URL(见下文) 1. mcp.http app(path="/")——不是"/mcp"——因为app.mount(""/mcp",mcp app)已经添加了该前缀. 设置双倍为/mcp/mcp. 2. FastAPI(listspan=mcp app.listspan)——在建设时通过,后未设定,或MCP会话管理器默默地从未初始化. 原名FastMCP Cloud——同名团队,同名想法,现名在作此作前已核实. 个人项目免费. 1. 将该项目推至GitHub repo 2.
概述(AI 翻译)
一个实时计时表工具——通过浏览器记录可计费时数,或者通过一个 AI助手,两人都看到了完全相同的数据.
□ 完成设置检查列表
- 安装
uv - [
uv init . uv add fastmcp fastapi "uvicorn[standard]"- [[T3]——确认安装
- 此回购的[[T4],[T5],和[T6]已经为您所写
uv run uvicorn main:app --reload- 访问[T8和[T9
- 连接克洛德桌面(见下文)
- 向地平线省长部署公共URL(见下文)
里面的东西 # # What’s inside
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢? 它会做什么?
|.
[T10] (中文(简体) ). 登录新时间条目——立即出现在网站上 QQ
[T11] (中文(简体) ). 一个雇员的条目,按日期范围选择过滤
按雇员分列的每个项目总工时(实际[T13])
list_projects 至少有一个登录条目的每个项目 QQ
timesheet://projects 当前已知工程名称的集合 QQ
[T16]
□ 连接 Claude 桌面
本页由 AI 翻译,技术细节请以原文为准。
README
TimeTrack
A real timesheet tool — log billable hours through a browser, or through an AI assistant, and both see the exact same data.
Complete Setup Checklist
- Install
uv uv init .uv add fastmcp fastapi "uvicorn[standard]"uv run fastmcp version— confirm the install- This repo’s
database.py,main.py, andstatic/are already written for you uv run uvicorn main:app --reload- Visit
http://127.0.0.1:8000(website) andhttp://127.0.0.1:8000/mcp(MCP) - Connect Claude Desktop (see below)
- Deploy to Prefect Horizon for a public URL (see below)
What’s inside
| Primitive | Name | What it does |
|---|---|---|
| Tool | log_time |
Logs a new time entry — appears on the website immediately |
| Tool | get_timesheet |
One employee’s entries, optionally filtered by date range |
| Tool | get_project_summary |
Total hours per project, broken down by employee (real GROUP BY) |
| Tool | list_projects |
Every project with at least one logged entry |
| Resource | timesheet://projects |
The current set of known project names |
| Prompt | generate_weekly_report |
Structures a weekly hours report request |
Connecting Claude Desktop
{
"mcpServers": {
"timetrack": { "url": "http://127.0.0.1:8000/mcp" }
}
}
Two rules that matter in main.py (verified against official FastMCP docs)
mcp.http_app(path="/")— not"/mcp"— sinceapp.mount("/mcp", mcp_app)already adds that prefix. Setting both doubles it into/mcp/mcp.FastAPI(lifespan=mcp_app.lifespan)— passed at construction, not set afterward — or the MCP session manager silently never initializes.
Going live: Prefect Horizon
Formerly known as FastMCP Cloud — same team, same idea, current name verified before writing this. Free for personal projects.
- Push this project to a GitHub repo
- Sign in to Prefect Horizon with GitHub
- Connect the repo — dependencies auto-detected from
pyproject.toml - Optionally verify first:
fastmcp inspect main.py:mcp - Deploy — live at
https://your-project-name.fastmcp.app/mcp
Worth confirming directly whether the website’s static routes come along with the deployment — Horizon is purpose-built for the MCP piece specifically. If not, deploying the whole app to a general host like Railway is the fallback.
Files
database.py— SQLite persistence, tested including real aggregation and a genuine restart-and-recover proofmain.py— FastAPI app with MCP mounted in, using the verified-correct mounting patternstatic/— the original frontend (3 tabs: entries, summary, log time)timetrack_notebook.ipynb— full walkthrough, database layer fully executed live
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"timetrack": { "url": "http://127.0.0.1:8000/mcp" }
}
}