Skip to main content
Glama
by hsgui

Daily Work MCP Server

一个用于记录、查询和总结每日工作内容的本地 MCP Server,基于 FastAPI + FastMCP + SQLite 实现。

运行前准备

  1. 安装依赖:

    conda create -n daily-work-mcp python=3.11 -y conda activate daily-work-mcp pip install -r requirements.txt
  2. 初始化数据库(首次运行必须执行):

    python scripts/init_db.py

启动方式

启动 HTTP API(可选)

uvicorn app.main:app --reload

默认监听 http://127.0.0.1:8000,包含以下 REST 接口:

  • POST /entries:新增工作内容

  • GET /entries:按 daily/weekly 查询

  • GET /entries/search:全文搜索

  • GET /entries/export:导出 JSON 或 CSV

  • GET /entries/summary:最近 N 天标签聚合

  • GET /entries/reminder:检查今日是否已有记录

  • GET /tags / POST /tags:标签管理

启动 MCP Server

python scripts/run_mcp_server.py

默认以 STDIO transport 运行;如果需要通过 HTTP/Streamable HTTP 暴露端口,可改用:

python scripts/run_mcp_server.py --transport streamable-http --host 127.0.0.1 --port 8888

该脚本会调用 app/mcp/server.py 中的 mcp.run() 并注册全部工具:

  • record_work_entry:新增条目

  • list_work_entries:按日/周查询

  • search_work_entries:关键字检索

  • summarize_recent_work:标签汇总

  • check_today_recorded:今日提醒状态

  • list_tags / create_tag:标签列表与新增

MCP 客户端连接该进程后即可直接调用上述工具。

使用示例

  • 新增条目(REST):

    curl -X POST http://127.0.0.1:8000/entries \ -H "Content-Type: application/json" \ -d '{"description":"排查登录问题","tags":["infra/login"]}'
  • 查询本周条目(REST):

    curl "http://127.0.0.1:8000/entries?range=weekly"
  • MCP 调用:在支持 MCP 的客户端中,将 scripts/run_mcp_server.py 作为 Server 入口,即可在会话中调用 record_work_entrylist_work_entries 等工具。

更多需求说明见 requirements.md

-
security - not tested
F
license - not found
-
quality - not tested

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hsgui/daily-work-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server