任务管理服务器

基于艾森豪威尔矩阵的全功能任务管理服务器,提供任务分类、搜索、统计和持久化存储功能。

  • by Worthies
  • Go
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 Worthies/Eisenhower

使用说明

艾森豪威尔MCP服务器

✨✨✨ 用于艾森豪威尔矩阵任务管理的全功能MCP服务器

概述

这是一个模型上下文协议(MCP)服务器,它基于艾森豪威尔矩阵(也称为紧急重要矩阵)提供全面的任务管理功能。它通过将任务分为四个象限来帮助您确定任务的优先级:

  • 紧急且重要 (先做):需要立即关注的关键任务
  • 不紧急且重要 (日程表):需要计划和安排的重要任务
  • 紧急且不重要 (委派):如果可能,委派任务
  • 不紧急也不重要 (消除):消除或最小化的任务

特性

  • ✅ 任务的完整CRUD操作
  • 📊 使用艾森豪威尔矩阵象限进行任务分类
  • 🔍 搜索和过滤功能
  • 📈 统计和分析
  • 💾 使用SQLite3的持久存储
  • 🔌 通过stdio支持标准MCP协议
  • 🛠️ 与官方合作建造 github/modelcontextprotocol/go-sdk
  • 🏷️ 新 按项目组织任务的项目字段
  • ⏱️ 新 开始时间戳跟踪,记录任务开始的时间

👉 看 功能.md 获取完整的功能列表和路线图

安装

先决条件

  • 达到1.21或更高
  • SQLite3

从源代码构建

git clone https://github.com/worthies/eisenhower.git
cd eisenhower
go mod download
go build -o eisenhower

或者使用Makefile:

make build   # Build the server
make install # Build and install to ~/.local/bin
make help    # Show all available commands

用法

运行服务器

默认情况下,服务器将数据存储在 ~/.config/eisenhower.db:

./eisenhower-mcp-server

要指定自定义数据库路径,请执行以下操作:

./eisenhower -db /path/to/your/database.db

VS代码副本集成

将以下内容添加到您的VS代码设置中(.vscode/settings.json 或用户设置):

{
  "github.copilot.chat.mcp.servers": {
    "eisenhower": {
      "command": "/absolute/path/to/eisenhower-mcp-server",
      "args": ["-db", "~/.config/eisenhower.db"]
    }
  }
}

或者在MCP设置文件中(~/.config/Code/User/globalStorage/github.copilot-chat/mcp-servers.json):

{
  "mcpServers": {
    "eisenhower": {
      "command": "/absolute/path/to/eisenhower",
      "args": ["-db", "~/.config/eisenhower.db"]
    }
  }
}

可用工具

服务器提供以下MCP工具:

1. create_task

在艾森豪威尔矩阵中创建一个新任务。

参数:

  • title (必填):任务标题
  • quadrant (必填):以下之一: urgent_important, not_urgent_important, urgent_not_important, not_urgent_not_important
  • description (可选):详细说明
  • priority (可选):优先级1-5(默认值:3)
  • status (可选):以下之一: pending, in_progress, completed, cancelled (默认值: pending)
  • due_date (可选):RFC3339格式的到期日期(例如。, 2024-12-31T23:59:59Z)
  • started_at (可选):RFC3339格式的开始时间戳(例如。, 2024-12-31T23:59:59Z)
  • tags (可选):逗号分隔的标签
  • project (可选):项目名称(默认值: Routine)

2. get_task

按ID检索特定任务。

参数:

  • id (必填):任务ID

3. list_tasks

列出所有具有可选筛选功能的任务。

参数:

  • quadrant (可选):按象限筛选
  • status (可选):按状态筛选
  • project (可选):按项目名称筛选
  • updated_since (可选):按在此时间之后更新的任务进行筛选(RFC3339格式,例如。 2024-12-31T23:59:59Z)
  • updated_until (可选):按在此时间之前更新的任务进行筛选(RFC3339格式,例如。 2024-12-31T23:59:59Z)
  • summary (可选):按摘要内容筛选(LIKE模式匹配)

4. update_task

更新现有任务。

参数:

  • id (必填):任务ID
  • 所有其他字段来自 create_task 是可选的

5. delete_task

按ID删除任务。

参数:

  • id (必填):任务ID

6. search_tasks

按标题、描述或标签搜索任务。

参数:

  • query (必填):搜索词

7. move_task

将任务移动到其他象限。

参数:

  • id (必填):任务ID
  • quadrant (必填):目标象限

8. complete_task

将任务标记为已完成。

参数:

  • id (必填):任务ID

9. get_statistics

获取所有任务的统计数据(按象限和状态计数)。

参数: 无

10. get_projects

使用可选筛选从所有任务中获取唯一的项目名称。

参数:

  • include_completed (可选):如果为真,则包括所有任务都已完成或取消的项目。如果为false,则仅显示至少有一个挂起或正在进行的任务的项目。默认值为true(显示所有项目)。

VS代码复制示例用法

配置后,您可以直接在VS Code Copilot Chat中与艾森豪威尔矩阵交互:

Create a task "Finish project report" in urgent_important quadrant with high priority
List all pending tasks in the not_urgent_important quadrant
Search for tasks related to "meeting"
Move task 5 to urgent_important quadrant
Show me statistics about my tasks

👉 看 用法.md 获取全面的使用指南和示例

数据库模式

服务器使用具有以下模式的SQLite数据库:

CREATE TABLE tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL,
    description TEXT,
    quadrant TEXT NOT NULL CHECK(quadrant IN ('urgent_important', 'not_urgent_important', 'urgent_not_important', 'not_urgent_not_important')),
    priority INTEGER DEFAULT 3 CHECK(priority >= 1 AND priority <= 5),
    status TEXT DEFAULT 'pending' CHECK(status IN ('pending', 'in_progress', 'completed', 'cancelled')),
    due_date DATETIME,
    started_at DATETIME,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    finished_at DATETIME,
    tags TEXT,
    progress INTEGER DEFAULT 0 CHECK(progress >= 0 AND progress <= 100),
    summary TEXT,
    project TEXT DEFAULT 'Routine'
);

项目结构

eisenhower/
├── main.go                      # Main entry point
├── internal/
│   ├── database/
│   │   └── database.go          # Database layer with SQLite operations
│   └── handlers/
│       └── handlers.go          # MCP tool handlers
├── go.mod
├── go.sum
├── LICENSE
└── README.md

发展

运行测试

go test ./...

添加新工具

  1. 在中添加工具定义 internal/handlers/handlers.go
  2. 实现处理函数
  3. 在中注册该工具 RegisterTools 方法

许可证

看 许可证 文件以获取详细信息。

贡献

欢迎投稿!请随时提交拉取请求。

关于艾森豪威尔矩阵

艾森豪威尔矩阵,也称为紧急重要矩阵,是一个时间管理框架,可帮助您根据紧迫性和重要性对任务进行优先级排序。它以德怀特·D·艾森豪威尔的名字命名,据报道,艾森豪威尔曾说过:

“重要的事情很少紧急,紧急的事情很少重要。”

了解更多: 维基百科上的艾森豪威尔矩阵