TODO列表存储服务

一个基于Model Context Protocol (MCP)的Go服务器,提供TODO列表的持久化存储和读写功能。

  • by Buhrietoe
  • Go
  • 本地部署
  • 更新于
在 GitHub 查看 Buhrietoe/todo-mcp

使用说明

全部-MCP

一个实现模型上下文协议(MCP)工具的最小Go服务器,用于持久TODO列表存储。

概述

服务器提供两个MCP工具:

  • todo_read –返回当前TODO内容。
  • todo_write –覆盖TODO内容并将其持久化 TODO.md.

它使用 github.com/modelcontextprotocol/go-sdk/mcp 通过STDIO公开这些工具,使其易于与任何兼容MCP的客户端集成。

安装

# Install the binary to your $GOPATH/bin (or $HOME/go/bin)

go install -v github.com/Buhrietoe/todo-mcp@latest

MCP配置示例:

"todo": {
    "type": "stdio",
    "command": "todo-mcp"
}

或者使用提供的Makefile快捷方式:

make build   # builds the binary `todo-mcp`
make run     # builds then runs the binary

测试

go test ./...

持久性

待办事项存储在 TODO.md 在工作目录中。服务器在启动时加载此文件(如果存在),并在每次启动后写入更新 todo_write 电话。

MCP工具定义

  • todo_read –只读,幂等。返回存储的字符串。
  • todo_write –破坏性的、非幂等的。需要a content 字段(字符串)并覆盖存储的值。

许可证

MIT许可证(见许可证文件)。