
MCP Task Manager Server
一个本地模型上下文协议服务器,为 AI 代理提供后端工具,以管理项目和任务,并使用 SQLite 进行持久存储,从而能够以结构化的方式跟踪具有依赖关系、优先级和状态的项目任务。
Tools
createProject
Creates a new, empty project entry in the Task Management Server database. This tool is used by clients (e.g., AI agents) to initiate a new workspace for tasks. It returns the unique identifier (UUID) assigned to the newly created project. An optional name can be provided; otherwise, a default name including a timestamp will be generated.
addTask
Adds a new task to a specified project within the Task Management Server. Requires the project ID and a description for the task. Optionally accepts a list of dependency task IDs, a priority level, and an initial status. Returns the full details of the newly created task upon success.
listTasks
Retrieves a list of tasks for a specified project. Allows optional filtering by task status ('todo', 'in-progress', 'review', 'done'). Provides an option to include nested subtasks directly within their parent task objects in the response. Returns an array of task objects.
showTask
Retrieves the full details of a single, specific task, including its dependencies and direct subtasks. Requires the project ID and the task ID. Returns a task object containing all details if found.
setTaskStatus
Updates the status ('todo', 'in-progress', 'review', 'done') for one or more tasks within a specified project. Requires the project ID, an array of task IDs (1-100), and the target status. Verifies all tasks exist in the project before updating. Returns the count of updated tasks.
expandTask
Breaks down a specified parent task into multiple subtasks based on provided descriptions. Requires the project ID, the parent task ID, and an array of descriptions for the new subtasks. Optionally allows forcing the replacement of existing subtasks using the 'force' flag. Returns the updated parent task details, including the newly created subtasks.
getNextTask
Identifies and returns the next actionable task within a specified project. A task is considered actionable if its status is 'todo' and all its dependencies (if any) have a status of 'done'. If multiple tasks are ready, the one with the highest priority ('high' > 'medium' > 'low') is chosen. If priorities are equal, the task created earliest is chosen. Returns the full details of the next task, or null if no task is currently ready.
exportProject
Exports the complete data set for a specified project as a JSON string. This includes project metadata, all tasks (hierarchically structured), and their dependencies. Requires the project ID. The format is fixed to JSON for V1. Returns the JSON string representing the project data.
importProject
Creates a *new* project by importing data from a JSON string. The JSON data must conform to the structure previously generated by the 'exportProject' tool. Performs validation on the input data (parsing, basic structure, size limit). Returns the unique project_id of the newly created project upon success.
updateTask
Updates specific details of an existing task within a project. Requires the project ID and task ID. Allows updating description, priority, and/or dependencies. At least one optional field (description, priority, dependencies) must be provided. Returns the full details of the updated task upon success.
deleteTask
Deletes one or more tasks within a specified project. Requires the project ID and an array of task IDs to delete. Note: Deleting a task also deletes its subtasks and dependency links due to database cascade rules. Returns the count of successfully deleted tasks.
deleteProject
Permanently deletes a project and ALL associated tasks and dependencies. Requires the project ID. This is a highly destructive operation and cannot be undone. Returns a success confirmation upon completion.
README
MCP 任务管理器服务器
<div align="center"> <img src="public/images/mcp-task-manager-logo.svg" alt="MCP 任务管理器 Logo" width="200" height="200" /> </div>
一个本地模型上下文协议 (MCP) 服务器,为客户端驱动的项目和任务管理提供后端工具,使用 SQLite 数据库。
概述
此服务器充当本地 MCP 客户端(如 AI 代理或脚本)的持久后端,这些客户端需要在不同的项目中管理结构化的任务数据。它处理数据存储并提供一套标准化的交互工具,而战略工作流程逻辑则驻留在客户端中。
主要特性:
- 基于项目: 任务在不同的项目中组织。
- SQLite 持久性: 使用本地 SQLite 文件(默认为
./data/taskmanager.db
)进行简单、自包含的数据存储。 - 客户端驱动: 为客户端提供工具;不规定工作流程。
- MCP 兼容: 遵循模型上下文协议进行工具定义和通信。
- 任务管理: 支持创建项目、添加任务、列出/显示任务、更新状态、将任务扩展为子任务,以及识别下一个可执行的任务。
- 导入/导出: 允许将项目数据导出为 JSON,并从 JSON 导入以创建新项目。
已实现的 MCP 工具
以下工具可供 MCP 客户端使用:
createProject
:- 描述: 创建一个新的空项目。
- 参数:
projectName
(字符串,可选,最大 255) - 返回:
{ project_id: string }
addTask
:- 描述: 向项目添加新任务。
- 参数:
project_id
(字符串,必需,UUID),description
(字符串,必需,1-1024),dependencies
(字符串数组,可选,最大 50),priority
(枚举 'high'|'medium'|'low', 可选,默认 'medium'),status
(枚举 'todo'|'in-progress'|'review'|'done', 可选,默认 'todo') - 返回: 已创建任务的完整
TaskData
对象。
listTasks
:- 描述: 列出项目的任务,可选择过滤和包含子任务。
- 参数:
project_id
(字符串,必需,UUID),status
(枚举 'todo'|'in-progress'|'review'|'done', 可选),include_subtasks
(布尔值,可选,默认 false) - 返回:
TaskData
或StructuredTaskData
对象数组。
showTask
:- 描述: 检索特定任务的完整详细信息,包括依赖项和直接子任务。
- 参数:
project_id
(字符串,必需,UUID),task_id
(字符串,必需) - 返回:
FullTaskData
对象。
setTaskStatus
:- 描述: 更新一个或多个任务的状态。
- 参数:
project_id
(字符串,必需,UUID),task_ids
(字符串数组,必需,1-100),status
(枚举 'todo'|'in-progress'|'review'|'done', 必需) - 返回:
{ success: true, updated_count: number }
expandTask
:- 描述: 将父任务分解为子任务,可以选择替换现有子任务。
- 参数:
project_id
(字符串,必需,UUID),task_id
(字符串,必需),subtask_descriptions
(字符串数组,必需,1-20,每个 1-512),force
(布尔值,可选,默认 false) - 返回: 更新后的父
FullTaskData
对象,包括新的子任务。
getNextTask
:- 描述: 根据状态 ('todo')、依赖项 ('done')、优先级和创建日期识别下一个可执行的任务。
- 参数:
project_id
(字符串,必需,UUID) - 返回: 下一个任务的
FullTaskData
对象,如果没有准备好的任务,则返回null
。
exportProject
:- 描述: 将完整的项目数据导出为 JSON 字符串。
- 参数:
project_id
(字符串,必需,UUID),format
(枚举 'json', 可选,默认 'json') - 返回: 表示项目的 JSON 字符串。
importProject
:- 描述: 从导出的 JSON 字符串创建一个新项目。
- 参数:
project_data
(字符串,必需,JSON),new_project_name
(字符串,可选,最大 255) - 返回: 新创建项目的
{ project_id: string }
。
updateTask
:- 描述: 更新现有任务的特定详细信息(描述、优先级、依赖项)。
- 参数:
project_id
(字符串,必需,UUID),task_id
(字符串,必需,UUID),description
(字符串,可选,1-1024),priority
(枚举 'high'|'medium'|'low', 可选),dependencies
(字符串数组,可选,最大 50,替换现有依赖项) - 返回: 更新后的
FullTaskData
对象。
deleteTask
:- 描述: 删除一个或多个任务(以及它们的子任务/依赖关系链接,通过级联)。
- 参数:
project_id
(字符串,必需,UUID),task_ids
(字符串数组,必需,1-100) - 返回:
{ success: true, deleted_count: number }
deleteProject
:- 描述: 永久删除项目和所有相关数据。 谨慎使用!
- 参数:
project_id
(字符串,必需,UUID) - 返回:
{ success: true }
(注意:有关详细的 Zod 模式和参数描述,请参阅相应的 src/tools/*Params.ts
文件。)
开始使用
-
先决条件: Node.js (推荐 LTS 版本), npm。
-
安装依赖项:
npm install
-
在开发模式下运行: (使用
ts-node
和nodemon
进行自动重新加载)npm run dev
服务器将通过 stdio 连接。日志(JSON 格式)将打印到 stderr。SQLite 数据库将在
./data/taskmanager.db
中创建/更新。 -
构建生产版本:
npm run build
-
运行生产版本:
npm start
配置
- 数据库路径: 可以通过设置
DATABASE_PATH
环境变量来覆盖 SQLite 数据库文件的位置。 默认为./data/taskmanager.db
。 - 日志级别: 可以使用
LOG_LEVEL
环境变量设置日志级别(例如,debug
、info
、warn
、error
)。 默认为info
。
项目结构
/src
: 源代码。/config
: 配置管理。/db
: 数据库管理器和模式 (schema.sql
)。/repositories
: 数据访问层(SQLite 交互)。/services
: 核心业务逻辑。/tools
: MCP 工具定义 (*Params.ts) 和实现 (*Tool.ts)。/types
: 共享 TypeScript 接口(目前最少,主要在 repos/services 中)。/utils
: 日志记录、自定义错误等。createServer.ts
: 服务器实例创建。server.ts
: 主应用程序入口点。
/dist
: 编译后的 JavaScript 输出。/docs
: 项目文档(PRD、功能规范、RFC)。/data
: SQLite 数据库文件的默认位置(自动创建)。tasks.md
: 用于开发的手动任务跟踪文件。- 配置文件 (
package.json
,tsconfig.json
,.eslintrc.json
等)
代码检查和格式化
- 代码检查:
npm run lint
- 代码格式化:
npm run format
(代码在提交时通过 Husky/lint-staged 自动进行代码检查/格式化)。
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。