article
README
🚀 MCP 任务管理器
Model Context Protocol 服务器用于任务管理,可让 Claude Desktop(或任何 MCP 客户端)在基于队列的系统中管理和执行任务。
🚀 快速开始(用户)
⚙️ 先决条件
- Node.js 18+(可通过
brew install node进行安装) - Claude Desktop(从 Claude Desktop 下载页面 下载安装)
⚙️ 配置
- 打开你的 Claude Desktop 配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json。 你可以按以下步骤找到该文件:- 打开 Claude Desktop。
- 点击菜单栏中的 Claude。
- 选择 "Settings"。
- 点击 "Developer"。
- 在配置中添加以下内容:
{
"tools": {
"taskmanager": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-taskmanager"]
}
}
}
👨💻 开发人员
⚙️ 先决条件
- Node.js 18+(通过
brew install node安装) - Claude Desktop(从 Claude Desktop 下载页面 下载安装)
- tsx(通过
npm install -g tsx安装)
📦 安装
git clone https://github.com/kazuph/mcp-taskmanager.git
cd mcp-taskmanager
npm install
npm run build
⚙️ 开发配置
- 确保 Claude Desktop 已安装并运行。
- 如果尚未安装,请全局安装 tsx:
npm install -g tsx
# 或者
pnpm add -g tsx
- 修改你的 Claude Desktop 配置文件,位于:
~/Library/Application Support/Claude/claude_desktop_config.json。 添加以下内容到你的 MCP 客户端配置中:
{
"tools": {
"taskmanager": {
"args": ["tsx", "/path/to/mcp-taskmanager/index.ts"]
}
}
}
✨ 主要特性
📋 可用操作
任务管理器支持两个主要的操作阶段:
📅 计划阶段
- 接受用户提供的任务列表(字符串数组)。
- 在内部将任务存储为队列。
- 返回执行计划(任务概述、任务 ID、当前队列状态)。
▶️ 执行阶段
- 请求时从队列中返回下一个任务。
- 提供完成任务的反馈机制。
- 从队列中移除已完成的任务。
- 准备下一个任务以供执行。
📄 参数
action: "plan" | "execute" | "complete"tasks: 任务字符串数组(在 "plan" 操作时为必填)taskId: 任务标识符(在 "complete" 操作时为必填)getNext: Boolean 标志,用于请求下一个任务(在 "execute" 操作时使用)
💻 使用示例
基础用法
// 计划阶段
{
action: "plan",
tasks: ["任务 1", "任务 2", "任务 3"]
}
// 执行阶段
{
action: "execute",
getNext: true
}
// 完成任务
{
action: "complete",
Scan to contact