worklog-mcp

worklog-mcp

An MCP server that enables coding agents to log their work, decisions, test runs, PRs, and progress as structured events, either to a local JSONL file or an HTTP endpoint.

Category
访问服务器

README

worklog-mcp

An MCP server that gives a coding agent somewhere to write down what it did and why.

Git already records what changed. What it doesn't record is the reasoning — why this approach over the alternative, what was tried and abandoned, what's still broken, which test run was green when the PR went up. That context lives in a chat transcript that nobody reads again.

This server gives the agent six tools to record it as it works. By default it appends JSONL to a file in your repo. Point it at an HTTP endpoint and it posts there instead.

// .mcp.json
{
  "mcpServers": {
    "worklog": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "github:aadityakushwaha/worklog-mcp"]
    }
  }
}

That's the whole setup. No account, no key, no server. Events land in .worklog/events.jsonl.

Tools

Tool When the agent calls it
log_work finished something meaningful — the why and any open loops
record_decision made an architecturally consequential choice (ADR-style, with alternatives and consequences)
report_test_run ran a suite — result and counts, not full logs
link_pr opened or merged a pull request
update_progress set a work item's status: not_started / in_progress / blocked / done
sync_doc pushed a plan, spec, progress doc, runbook or research note as rendered markdown

Every event carries a sessionId shared across one agent run and a unique id per event. The agent never passes either — they're threaded automatically, so one run's events can be grouped afterwards and a retried call can be de-duplicated by the receiver.

Configuration

Variable Default Meaning
WORKLOG_FILE .worklog/events.jsonl Where to append when there's no receiver
WORKLOG_URL — If set, POST events here instead of writing a file
WORKLOG_API_KEY — Bearer token. Required when WORKLOG_URL is set

Add .worklog/ to .gitignore unless you want the log committed. Some teams do — it makes review of an agent's reasoning part of the PR.

Reading the log

It's JSONL, so the usual tools work:

# what got done, most recent first
jq -r 'select(.tool=="log_work") | "\(.at)  \(.summary)"' .worklog/events.jsonl | tail -20

# every architectural decision, with its alternatives
jq 'select(.tool=="record_decision") | {title, decision, alternatives}' .worklog/events.jsonl

# anything still blocked
jq 'select(.tool=="update_progress" and .status=="blocked")' .worklog/events.jsonl

Sending somewhere else

Set WORKLOG_URL and every event is POSTed to <WORKLOG_URL>/api/agent/events with Authorization: Bearer <WORKLOG_API_KEY>. The body is the event — tool, id, sessionId when known, and the tool's own arguments:

{ "tool": "log_work", "id": "9f2c…", "sessionId": "7a10…", "summary": "…", "intent": "…" }

Answer with:

{ "success": true, "data": { "sessionId": "7a10…", "eventId": "…" } }

The sessionId in the first response is adopted and threaded into every later call, so the receiver owns session identity rather than the client guessing at it. On { "success": false, "error": "…" } or a non-2xx, the tool call returns that error to the agent.

That's the entire contract — a single endpoint. A receiver is an afternoon's work in whatever you already run.

Making it automatic

Logging that depends on the agent remembering to log is logging that stops after a week. Wire it to a Stop hook so it fires at the end of every session:

// .claude/settings.json
{
  "hooks": {
    "Stop": [{ "matcher": "", "hooks": [{ "type": "command",
      "command": "echo 'Before finishing: call log_work with what you did and why.'" }] }]
  }
}

Development

npm install
npm run build   # tsc → dist/  (dist is committed so npx needs no build step)
npm test

Licence

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选