MCP Todo Server
MCP Todo Server
基于 Python 开发的 MCP 服务器,用于在本地 JSON 文件中进行基本任务管理。
该项目实现了模型上下文协议(MCP)的主要能力:资源、工具和提示,允许查询待办任务、注册新任务、将任务标记为已完成以及生成每日摘要模板。
功能
服务器提供以下能力:
资源 — tasks://pending
返回 tasks.json 中待处理的任务。
已完成的任务仍会存储,但不会包含在资源结果中。
工具 — add_task
允许通过提供以下信息注册新任务:
名称;
描述;
优先级(
高、中或低)。
每个任务会自动获得一个格式为:
T-001
T-002
T-003的标识符。
该工具还会验证任务是否有名称,以及优先级是否与允许的值之一对应。
工具 — complete_task
允许使用任务标识符将其标记为已完成。
例如:
T-001找到任务后,其 已完成 状态从 false 变为 true,并且更改会保存到 tasks.json 中。
提示 — daily_summary
根据任务的当前状态生成一个模板。
考虑:
任务总数;
已完成的任务;
待处理的任务;
高优先级的待处理任务。
该模板允许生成总体进展摘要,并将注意力引导至优先级最高的活动。
Related MCP server: Task Manager MCP Server
项目结构
mcp-todo-server/
│
├── server.py
├── tasks.json
├── requirements.txt
├── README.md
└── .gitignore文件 | 描述 |
| 包含 MCP 服务器的实现 |
| 在本地存储任务 |
| 包含项目的依赖项 |
| 项目文档 |
| 定义 Git 排除的文件和目录 |
.venv 目录对应本地虚拟环境,不包含在仓库中。
数据模型
任务以 JSON 格式存储,结构如下:
{
"id": "T-001",
"nombre": "Revisar documento del extraclase",
"descripcion": "Comprobar que las capturas y explicaciones estén completas",
"prioridad": "alta",
"completada": true
}id 字段标识每个任务,而 已完成 字段决定是否应出现在待办任务资源中。
要求
运行项目需要:
Python 3
pip
适用于 Python 的模型上下文协议 SDK
安装
1. 克隆仓库
git clone URL_DEL_REPOSITORIO
cd mcp-todo-server2. 创建虚拟环境
在 Windows 上:
python -m venv .venv3. 激活虚拟环境
在 PowerShell 中:
.\.venv\Scripts\Activate.ps14. 安装依赖项
python -m pip install -r requirements.txt运行
在虚拟环境激活状态下,运行:
python server.py服务器使用标准输入输出(stdio)进行通信,并保持运行状态等待 MCP 客户端连接。
要停止它:
Ctrl + C使用 MCP Inspector 进行测试
可以通过 MCP Inspector 检查服务器的运行情况。
使用 pnpm:
pnpm dlx @modelcontextprotocol/inspector python server.py建立连接后,客户端可以发现并交互所提供的能力:
Resources
└── tasks://pending
Tools
├── add_task
└── complete_task
Prompts
└── daily_summary测试允许验证任务查询、通过工具修改 tasks.json 以及生成每日摘要模板。
使用的技术
Python
模型上下文协议(MCP)
JSON
MCP Inspector
Git
作者
Jendry Linneth Murillo Pérez
编程 IV
第二学期,2026年
This server cannot be deployed
Maintenance
Related MCP Connectors
Daily planner: read and update tasks, events, habits, courses, meals and shared lists.
Local-first task manager: create, edit, and complete tasks, projects, and checklists via MCP.
Manage tasks, Focus Zone, notes, projects, and task history from compatible AI assistants.
Goal-based task manager for humans and AI. Read goals, add subtasks, report results.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables users to manage tasks through a simple JSON file interface. Provides basic task management functionality by reading and writing to a configurable tasks.json file.11 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables task management through natural language with full CRUD operations including add, list, update, complete, and delete tasks with JSON persistence.ISC
- FlicenseNot gradedqualityDmaintenanceManages TODO tasks with operations like add, list, complete, update, and delete, stored in a JSON file.-
- FlicenseNot gradedqualityDmaintenanceEnables managing daily work logs with tools for adding, listing, updating status, deleting, and summarizing tasks, using SQLite for persistent storage.-