Skip to main content
Glama
rogeriolaa

dev-diary-mcp

by rogeriolaa

dev-diary-mcp

License: MIT Node MCP

一个模型上下文协议(Model Context Protocol)服务器,可将普通 Markdown 文件文件夹变成任何 LLM 都能读写的可搜索工作日志。

无需数据库,无需应用。你的工作日志就是 diary/2026-08-22.md——人类可读、可 diff、对 git 友好——你的 AI 助手可以获得四个工具来使用它:

工具

功能

log_work

向今天的文件追加带时间戳的条目(含标签)

search_diary

跨所有条目进行全文搜索,可选的标签筛选

daily_summary

某一天记录的所有内容

stats

总计、活跃天数、当前连续天数、热门标签

为什么

"记录我今天做了什么"是每个人坚持一周后就会放弃的任务。但你的 AI 助手已经知道你都做了什么——因为它帮你做过。为它提供针对 Markdown 文件夹的工具,保持工作日志就会成为与 AI 协作的副产品。

运行演示

该仓库附带一个真正的 MCP 客户端,可端到端驱动服务器(握手 → listTools → 工具调用),因此你无需编辑器即可验证一切:

npm install
npm run build
npm run demo

输出:

=== 1. listTools ===
 • log_work — Append a timestamped entry...
 • search_diary — Full-text search across every entry...
 • daily_summary — Everything logged on a given date...
 • stats — Totals, active days, streaks, top tags...

=== 2. log_work x3 ===
Logged to 2026-08-22.md at 19:05 (tags: bugfix, websocket)
...

=== 5. stats ===
📊 1 entries across 2 day(s)
🔥 Streak: 2 consecutive day(s)
🏷️ Top tags: #bugfix (1), #websocket (1)

然后查看 diary/*.md——这就是你的数据。纯 Markdown。

连接到你的编辑器/代理

Claude Desktop / Cursor / 任何 MCP 客户端

{
  "mcpServers": {
    "dev-diary": {
      "command": "node",
      "args": ["/absolute/path/to/dev-diary-mcp/dist/server.js"],
      "env": { "DIARY_DIR": "/absolute/path/to/your/diary" }
    }
  }
}

Hermes Agent

hermes mcp add dev-diary --command node --args /path/to/dist/server.js

交互式检查

npx @modelcontextprotocol/inspector node dist/server.js

存储格式

每天一个文件(diary/YYYY-MM-DD.md),条目使用 H2 标题并嵌入标签:

## 14:32 #bugfix #websocket
Fixed the race condition in the WebSocket broadcast queue

## 16:10 #testing
Wrote E2E test covering two-client sync

因为它只是文件,你可以 grep、备份、手动编辑或提交。服务器在每次调用时都会读取磁盘上的内容——无需使缓存失效。

工作原理(约 190 行 TypeScript)

使用官方 @modelcontextprotocol/server SDK(2026-07-28 规范)构建:

  • McpServer + registerTool(name, { description, inputSchema }, handler) — 模式使用 Standard Schema;本项目使用 Zod v4

  • StdioServerTransport — 编辑器生成进程并通过 stdin/stdout 进行 JSON-RPC 通信

  • 工具处理器在 DIARY_DIR(默认:./diary)下读写 Markdown

配套文章:《我构建了一个维护工作日志的 MCP 服务器——以下是我学到的所有内容》(草稿位于本仓库中)。

许可证

MIT

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.

  • Securely search and manage workspace context files for AI agents and teams.

  • Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.

View all MCP Connectors

Latest Blog Posts

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/rogeriolaa/dev-diary-mcp'

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