mcpField
D
Divide and Conquer MCP Server

Divide and Conquer MCP Server

本地服务
github.com/landicefu生产力76 天前更新

关于 Divide and Conquer MCP Server

Divide and Conquer MCP Server 是为 AI Agent 提供复杂任务拆解与跟踪的 MCP 服务。它以结构化 JSON 保存清单、上下文和进度,支持跨对话延续任务。

主要功能

  1. 01结构化 JSON 任务存储
  2. 02清单状态与进度跟踪
  3. 03保存任务上下文和描述
  4. 04调整清单顺序及插入事项
  5. 05记录元数据、笔记和资源

适用场景

  1. 01拆分并跟进复杂软件开发
  2. 02规划项目并跟踪任务状态
  3. 03分解研究问题并记录来源

MCP 相关

它向 MCP 客户端提供任务初始化、清单编辑、进度查询及任务详情等工具。任务数据以 JSON 文件保存,供后续对话读取。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"divide-and-conquer": {
"command": "npx",
"args": [
"-y",
"@landicefu/divide-and-conquer-mcp-server"
]
}
}
}
启动命令npx -y @landicefu/divide-and-conquer-mcp-server

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@landicefu/divide-and-conquer-mcp-server

工具

15

收录的工具列表 · 更新于 3 周前

参数类型必填说明
metadataobject否任务的可选元数据
metadata.tagsarray否用于对任务分类的标签
metadata.priorityenum否任务的优先级high | medium | low
metadata.estimated_completion_timestring否预计完成时间(ISO 时间戳或持续时间)
task_descriptionstring是对整个任务的中等详细程度描述
initial_checklistarray否可选的初始检查清单项
context_for_all_tasksstring否检查清单中的所有任务都应包含的信息

详细介绍

MseeP.ai 安全评估徽章

Divide and Conquer MCP 服务

smithery 徽章

一个模型上下文协议(MCP)服务,可让 AI Agent 使用结构化 JSON 格式将复杂任务拆分为易于管理的部分。

目录

用途

Divide and Conquer MCP 服务是 Temp Notes MCP 服务的演进版本,专为需要拆分为易于管理的部分的复杂任务而设计。该服务不再使用简单的文本文件,而是采用结构化 JSON 格式存储任务信息、清单和上下文,从而更便于跟踪进度,并在多次对话中保留上下文。

主要功能

  • 结构化 JSON 格式:使用 JSON 结构存储任务信息,而非纯文本
  • 任务跟踪:支持清单功能,并跟踪任务完成状态
  • 上下文保留:提供专用字段来存储任务上下文和详细说明
  • 进度监控:轻松查看已完成和剩余任务
  • 任务排序:保留任务顺序,以便按顺序执行
  • 插入任务:能够在清单中的特定位置插入新任务
  • 元数据:跟踪标签、优先级和预计完成时间等附加信息
  • 备注和资源:存储与任务相关的其他备注和资源

快速开始

  1. 将服务添加到 MCP 配置中:

    {
      "mcpServers": {
        "divide-and-conquer": {
          "command": "npx",
          "args": ["-y", "@landicefu/divide-and-conquer-mcp-server"],
          "disabled": false
        }
      }
    }
    
  2. 在对话中开始使用:

    // Initialize a new task
    await use_mcp_tool({
      server_name: "divide-and-conquer",
      tool_name: "initialize_task",
      arguments: {
        task_description: "Refactor the authentication system",
        context_for_all_tasks: "The current system uses session-based authentication."
      }
    });
    
    // Add checklist items
    await use_mcp_tool({
      server_name: "divide-and-conquer",
      tool_name: "add_checklist_item",
      arguments: {
        task: "Analyze current authentication flow",
        detailed_description: "Review the existing authentication code.",
        context_and_plan: "Look at src/auth/* files. The current implementation uses express-session with MongoDB store."
      }
    });
    

安装

通过 Smithery 安装

通过 Smithery 为 Claude Desktop 自动安装 Divide and Conquer 服务:

npx -y @smithery/cli install @landicefu/divide-and-conquer-mcp-server --client claude
选项 1:使用 npx(推荐)

将服务添加到 MCP 配置中:

{
  "mcpServers": {
    "divide-and-conquer": {
      "command": "npx",
      "args": ["-y", "@landicefu/divide-and-conquer-mcp-server"],
      "disabled": false
    }
  }
}
选项 2:从源代码安装
  1. 克隆代码库:

    git clone https://github.com/landicefu/divide-and-conquer-mcp-server.git
    cd divide-and-conquer-mcp-server
    
  2. 安装依赖项:

    npm install
    
  3. 构建服务:

    npm run build
    
  4. 将服务添加到 MCP 配置中:

    {
      "mcpServers": {
        "divide-and-conquer": {
          "command": "node",
          "args": ["/path/to/divide-and-conquer-mcp-server/build/index.js"],
          "disabled": false
        }
      }
    }
    

工具

Divide and Conquer MCP 服务提供以下工具:

initialize_task

根据指定的描述和可选的初始清单项创建新任务。

update_task_description

更新主要任务描述。

update_context

更新所有任务的上下文信息。

add_checklist_item

向清单添加新项目。

update_checklist_item

更新现有清单项目。

mark_task_done

将清单项目标记为已完成。

mark_task_undone

将清单项目标记为未完成。

remove_checklist_item

从清单中移除项目。

reorder_checklist_item

将清单项目移动到新位置。

add_note

为任务添加备注。

add_resource

为任务添加资源。

update_metadata

更新任务元数据。

clear_task

清除当前任务数据。

get_checklist_summary

返回包含完成状态的清单摘要。为节省上下文窗口空间,摘要中会有意排除上下文信息。

get_current_task_details

获取当前任务(第一个未完成的任务)的详细信息及完整上下文,同时获取其他所有任务的有限字段。当前任务包含所有字段,包括 context_and_plan。其他任务仅包含 task、detailed_description 和完成状态(不包含 context_and_plan)。处理任务时,推荐使用此工具。

使用示例

初始化复杂任务
await use_mcp_tool({
  server_name: "divide-and-conquer",
  tool_name: "initialize_task",
  arguments: {
    task_description: "Refactor the authentication system to use JWT tokens and improve security",
    context_for_all_tasks: "The current system uses session-based authentication with cookies. We need to migrate to JWT for better scalability and security.",
    initial_checklist: [
      {
        task: "Analyze current authentication flow",
        detailed_description: "Review the existing authentication code to understand the current flow.",
        context_and_plan: "Look at src/auth/* files. The current implementation uses express-session with MongoDB store. Pay special attention to session expiration handling."
      },
      {
        task: "Design JWT implementation",
        detailed_description: "Create a design document outlining how JWT will be implemented.",
        context_and_plan: "Consider token structure, storage, and refresh mechanisms. Research best practices for JWT implementation in Node.js applications. Reference the security requirements document in docs/security.md."
      }
    ],
    metadata: {
      tags: ["security", "refactoring", "authentication"],
      priority: "high",
      estimated_completion_time: "2 weeks"
    }
  }
});
获取清单摘要
const summary = await use_mcp_tool({
  server_name: "divide-and-conquer",
  tool_name: "get_checklist_summary",
  arguments: {
    include_descriptions: true
  }
});

// Result contains a formatted summary of the checklist with completion status (context is excluded to save space)
获取当前任务详情
const taskDetails = await use_mcp_tool({
  server_name: "divide-and-conquer",
  tool_name: "get_current_task_details",
  arguments: {}
});

// Result contains:
// - ultimate_goal: The final goal of the entire task (task_description)
// - tasks: Array of all tasks, where the current task (first uncompleted) has all fields including context_and_plan,
//   while other tasks have limited fields (task, detailed_description, done) without context_and_plan
// - current_task_index: Index of the current task (first uncompleted)
// - Additional task metadata, notes, resources, etc.

使用场景

1. 复杂的软件开发任务

处理复杂的软件开发任务时,AI Agent 往往会遇到上下文窗口限制,难以在单次对话中完成所有步骤。Divide and Conquer MCP Server 支持 Agent:

  • 将大型任务拆分成更小、更易管理的部分
  • 在多次对话中跟踪进度
  • 保留原本可能丢失的重要上下文
  • 按逻辑顺序组织任务
  • 记录决策和资源
2. 项目规划与管理

对于项目规划与管理任务,该服务支持:

  • 创建包含任务和子任务的结构化项目计划
  • 跟踪进度和完成状态
  • 保留上下文和需求
  • 记录决策和资源
  • 在多次对话中协作
3. 研究与分析

开展研究与分析时,Agent 可以:

  • 将研究问题拆分成需要调查的具体领域
  • 跟踪进度和研究结果
  • 保留上下文和背景信息
  • 记录来源和资源
  • 以结构化方式整理研究结果

JSON 结构

该服务使用以下 JSON 结构存储任务信息:

{
  "task_description": "A medium-level detailed description about the whole task. The final goal we want to achieve.",
  
  "checklist": [
    {
      "done": false,
      "task": "A short yet comprehensive name for the task",
      "detailed_description": "A longer description about what we want to achieve with this task",
      "context_and_plan": "Related information, files the agent should read, and more details from other tasks, as well as a detailed plan for this task. This is typically the longest string."
    }
  ],
  
  "context_for_all_tasks": "Information that all tasks in the checklist should include.",
  
  "metadata": {
    "created_at": "ISO timestamp",
    "updated_at": "ISO timestamp",
    "progress": {
      "completed": 0,
      "total": 1,
      "percentage": 0
    },
    "tags": ["tag1", "tag2"],
    "priority": "high|medium|low",
    "estimated_completion_time": "ISO timestamp or duration"
  },
  
  "notes": [
    {
      "timestamp": "ISO timestamp",
      "content": "Additional notes or observations about the overall task"
    }
  ],
  
  "resources": [
    {
      "name": "Resource name",
      "url": "URL or file path",
      "description": "Description of the resource"
    }
  ]
}

配置存储

默认情况下,Divide and Conquer MCP Server 将任务数据存储在以下位置:

  • macOS/Linux:~/.mcp_config/divide_and_conquer.json(展开后为 /Users/username/.mcp_config/divide_and_conquer.json)
  • Windows:C:\Users\username\.mcp_config\divide_and_conquer.json

首次初始化任务时会自动创建此文件。如果读取任务数据时文件不存在,服务将返回空任务结构,并在下次写入时创建该文件。

服务会处理以下情况:

  • 读取时文件不存在:返回空任务结构
  • 目录不存在:写入时自动创建目录结构
  • 文件已损坏或无法访问:返回相应的错误消息

贡献

欢迎贡献!欢迎提交 Pull Request。

许可证

本项目采用 MIT License 授权,详情请参阅 LICENSE 文件。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。