mcp-todo-server
mcp-todo-server
基于模型上下文协议(MCP)的基础待办事项服务器,
使用官方 @modelcontextprotocol/sdk 以 TypeScript 实现。
课外作业 1 — 编程 IV — 模型上下文协议。
暴露的能力
类型 | 名称 | 描述 |
资源 |
| 返回存储在 |
工具 |
| 添加新任务(名称、描述、优先级) |
工具 |
| 根据给定 ID 将现有任务标记为已完成 |
提示词 |
| 生成当前任务状态的摘要模板 |
Related MCP server: MCP Todo Server
项目结构
mcp-todo-server/
├── src/
│ └── server.ts # Servidor MCP principal
├── tasks.json # Almacenamiento de tareas (base de datos simple)
├── tsconfig.json # Configuración de TypeScript
├── package.json
└── README.md要求
Node.js 18 或更高版本
npm
安装
npm install这将安装依赖项:@modelcontextprotocol/sdk、zod(模式验证),
以及开发依赖项 typescript、@types/node 和 tsx。
运行
开发模式(直接运行 TypeScript,无需编译):
npm run dev生产模式(先编译为 JavaScript,然后运行):
npm run build
npm start服务器通过 stdio(标准输入/输出)进行通信,这是 Claude Desktop 和大多数本地 MCP 客户端使用的传输方式。启动成功后 你将在终端看到:
Servidor MCP 'mcp-todo-server' corriendo por stdio...该消息特意输出到 stderr,以免干扰通过 stdout 传输的 JSON-RPC 消息。
如何在没有图形客户端的情况下测试
可以使用官方 Inspector,它会打开一个 Web 界面,方便手动调用
资源、工具和提示词:
npx @modelcontextprotocol/inspector npx tsx src/server.ts每种能力的使用示例
读取任务资源 → 以 JSON 格式返回 tasks.json 中的 tasks 数组。
工具 add_task,参数:
{ "name": "Repasar JSON-RPC", "description": "Leer la especificación 2.0", "priority": "media" }工具 complete_task,参数:
{ "id": 1 }提示词 daily_summary 不需要参数:它会自动生成一个摘要,
包含待办任务和已完成任务,并按优先级分组。
作者
Camila — 哥斯达黎加国立大学,编程 IV。
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, list, and complete todo items through MCP.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Local-first task manager: create, edit, and complete tasks, projects, and checklists via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis MCP server provides tools to manage a todo list with CRUD operations, enabling listing, creating, updating, and deleting todos.-
- AlicenseNot gradedqualityDmaintenanceA CRUD todo list server that exposes tools to create, list, and conclude tasks, compatible with any MCP host.5 npmMIT
- FlicenseNot gradedqualityDmaintenanceA stateful todo-list MCP server that allows adding, listing, completing, and deleting tasks with priority levels, and exposes a markdown resource of the current board.1-
- AlicenseBqualityCmaintenanceA basic MCP server for managing a todo list stored in a local JSON file, enabling task creation, completion, listing, and daily summary generation.25 npmMIT