任务管理服务

一个将Taskwarrior任务管理功能暴露给AI助手和代理编码工具的MCP服务器,提供创建、查询、修改和管理任务的结构化工具集。

  • by JoeyMckenzie
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 JoeyMckenzie/taskwarrior-mcp

使用说明

任务日志mcp

一个MCP服务器,它公开 任务战士 任务管理到人工智能助手和代理编码工具。它包裹着 task CLI和surface提供了一组结构化工具,用于直接从您的AI编码环境中创建、查询、修改和管理任务。

需求

  • 任务战士 v3.x(不支持v2)
  • Node.js v18或更高版本

安装Taskwarrior

macOS(Homebrew):

brew install task

Linux(apt):

sudo apt install taskwarrior

验证安装并确认您使用的是版本3:

task --version

工具

工具 说明
task_list 使用可选的Taskwarrior筛选器字符串列出任务
task_get 通过数字ID获取单个任务
task_add 添加具有可选项目、优先级、标签和截止日期的新任务
task_bulk_add 一次添加多个任务
task_complete 按ID将任务标记为已完成
task_modify 修改现有任务的描述、项目、优先级、标签或截止日期
task_delete 按ID删除任务
task_annotate 向任务添加注释(注释)
task_summary 获取所有任务的高级摘要,包括计数和项目细分
task_start 任务的开始时间跟踪
task_stop 停止任务的时间跟踪

工具详情

task_list

列出任务。接受可选 filter 使用标准Taskwarrior筛选器语法的字符串。

filter: "project:work status:pending"
filter: "priority:H due:today"
filter: "+home"

task_get

按数字ID返回单个任务。

id: 42

task_add

创建新任务。仅 description 是必需的。

description: "Write release notes"
project: "work"
priority: "H"   // H, M, or L
tags: ["docs", "release"]
due: "2024-12-31"

task_bulk_add

在一次调用中创建多个任务。接受具有与相同字段的任务对象数组 task_add。需要至少一个任务。

tasks: [
  { description: "Set up CI", project: "infra", priority: "H" },
  { description: "Write tests", project: "infra", tags: ["testing"] },
  { description: "Update docs", due: "2024-12-31" }
]

task_complete

按ID标记已完成的任务。

id: 7

task_modify

更新现有任务上的字段。除以下字段外的所有字段 id 是可选的。标签可以单独添加或删除。

id: 7
description: "Updated description"
project: "personal"
priority: "L"
tags: { add: ["urgent"], remove: ["waiting"] }
due: "2025-01-15"

task_delete

按ID删除任务。

id: 7

task_annotate

将注释附加到现有任务。

id: 7
annotation: "Blocked on review from Alice"

task_summary

不争论。按状态返回任务计数,按项目返回细分。

task_start / task_stop

按ID启动或停止任务的活动时间跟踪。

id: 7

MCP配置

服务器使用MCP协议通过stdio进行通信,可以直接通过以下方式运行 npx --无需安装或克隆。

克劳德桌面版

将以下内容添加到您的Claude Desktop配置文件中。

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 窗户: %APPDATA%\Claude\claude_desktop_config.json
{
    "mcpServers": {
        "questlog": {
            "command": "npx",
            "args": ["-y", "questlog-mcp"]
        }
    }
}

克劳德代码(CLI)

claude mcp add questlog -- npx -y questlog-mcp

光标

打开光标设置,导航到MCP部分,并添加新的服务器条目:

{
    "questlog": {
        "command": "npx",
        "args": ["-y", "questlog-mcp"]
    }
}

帆板运动

将服务器添加到您的Windsurf MCP配置中 ~/.codeium/windsurf/mcp_config.json:

{
    "mcpServers": {
        "questlog": {
            "command": "npx",
            "args": ["-y", "questlog-mcp"]
        }
    }
}

VS代码(继续)

将服务器添加到您的继续 config.json:

{
    "mcpServers": [
        {
            "name": "questlog",
            "command": "npx",
            "args": ["-y", "questlog-mcp"]
        }
    ]
}

发展

克隆存储库并安装依赖项:

git clone https://github.com/joeymckenzie/taskwarrior-mcp.git
cd taskwarrior-mcp
bun install

运行类型检查器和linter:

bun run types:check
bun run lint

运行测试套件:

bun test

构建可分发的:

bun run build

注: 包子 开发需要v1.0或更高版本。最终用户通过运行 npx 只需要Node.js。

许可证

麻省理工学院