Skip to main content
Glama
todo list mcp server

todo list mcp server

📝 个人待办事项列表 MCP 服务器

Python 3.10+ MCP License: MIT

一个极简且功能完备的模型上下文协议(MCP)服务器,为 AI 助手提供强大的本地待办事项列表管理器。该服务器演示了 AI 如何管理本地状态并与持久化数据(CRUD 操作)交互,而无需依赖外部 API 或复杂的数据库。

🌐 在线演示与媒体

Related MCP server: Todo MCP Server

📸 截图

MCP Inspector 测试

✨ 核心特性

  • 🤖 原生 AI 集成: 与 Claude Desktop、Cursor 和 Antigravity 无缝协作。

  • 🛠️ 完整的 CRUD 操作: 添加、列出、完成和删除任务。

  • 📊 实时摘要: 提供只读资源,汇总待办任务与已完成任务。

  • 🔒 私有本地存储: 使用 JSON 将数据严格存储在本地机器上。

  • ⚙️ 零配置: 借助现代 Python 打包方案,开箱即用。

🛠️ 技术栈表格

类别

技术

用途

协议

模型上下文协议(MCP)

AI 与工具之间的通信标准

语言

Python 3.10+

核心逻辑与执行

SDK

mcp[cli](FastMCP)

Anthropic 官方 Python SDK

包管理器

pip / pyproject.toml

现代依赖管理

数据库

本地 JSON 文件

持久化本地状态存储

⚙️ 工作原理

  1. 工具调用: AI 客户端向 MCP 服务器发送 JSON-RPC 请求(例如 add_task)。

  2. 执行: Python 服务器解析本地 todos.json 文件。

  3. 修改: 服务器使用新任务更新 JSON 文件并保存。

  4. 响应: 服务器向 AI 客户端返回成功确认。

🏗️ 项目架构

graph LR
    A[AI Assistant] <-->|JSON-RPC via stdio| B[Todo MCP Server]
    B -->|Read/Write| C[(todos.json)]
    B --> D[Tools: add, list, delete, complete]
    B --> E[Resources: todo://summary]

📂 项目结构

├── docs/                      # Learning outcomes and documentation
│   ├── inspector.png
│   └── resend-experience.md
├── src/
│   └── todo_mcp/              # Core MCP server package
│       ├── __init__.py
│       ├── __main__.py        # Execution entrypoint
│       └── server.py          # Tools and resources logic
├── .gitignore
├── pyproject.toml             # Modern Python package configuration
└── README.md

💻 本地设置与安装

前置条件

  • Python 3.10 或更高版本

  • Node.js(如果使用 Inspector,则需要 npx)

安装

克隆仓库并使用 pip 进行本地安装:

git clone https://github.com/Arslan-Codes097/todo-list-mcp-server.git
cd todo-list-mcp-server
pip install .

本地运行(Inspector)

要在交互式 MCP Inspector UI 中测试工具:

npx @modelcontextprotocol/inspector python -m todo_mcp

连接到 AI 客户端(零安装)

使用此服务器的最简单方式是通过 uvx。它会自动下载并运行服务器,无需手动克隆仓库。

将以下内容添加到客户端的 config.json 中:

{
  "mcpServers": {
    "todo-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Arslan-Codes097/todo-list-mcp-server.git",
        "python",
        "-m",
        "todo_mcp"
      ]
    }
  }
}

👤 作者与致谢

Arslan

作为对模型上下文协议的实践探索而构建。

Available Tools

4 tools
add_taskB

Add a new task to the todo list.

Inputs: task (required). Returns: result

complete_taskA

Mark a task as completed using its ID (index).

Inputs: task_id (required). Returns: result

delete_taskA

Delete a task from the list using its ID.

Inputs: task_id (required). Returns: result

list_tasksA

List all tasks in the todo list.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a distinct purpose: add, list, complete, and delete tasks. There is no ambiguity or overlap between them.

    Naming Consistency5/5

    All tools follow the consistent verb_noun pattern (add_task, list_tasks, complete_task, delete_task), making the naming predictable and clear.

    Tool Count5/5

    With just 4 tools, the server is tightly scoped to the core operations of a todo list, and each tool is necessary and sufficient for basic task management.

    Completeness5/5

    The tools cover the full lifecycle of a todo item: create (add_task), read (list_tasks), update (complete_task), and delete (delete_task). No essential operations are missing for a simple todo list.

    Related MCP Connectors

    Related MCP Servers