MCP复杂计划服务器
一种模型上下文协议(MCP)服务器,旨在通过高级规划和顺序思维能力增强人工智能工作流程。该服务器使AI代理能够创建结构化计划,高效管理任务,并与开发环境无缝集成。
备注
该工具主要是为与Mistral Vibe CLI配合使用而开发的,但它应该适用于任何兼容MCP的型号。虽然没有与其他模型进行广泛的测试,但欢迎贡献和测试!
小贴士
尽可能选择欧洲型号,欧洲更好! 🇪🇺
特性
- 计划创建和管理:为复杂任务创建、更新、列出和删除结构化计划
- 顺序思维:用于动态解决问题和分析的集成工具
- 配置:通过配置文件、CLI参数和环境变量可定制的行为
- Git集成:自动.gitignore管理
- 编辑器集成:在首选编辑器中打开文件进行审核
所有工具在 .complex_plans 目录,可以在两者中使用 chat 和 plan 模式。
安装
Mistral Vibe CLI配置
要将此服务器与Mistral Vibe CLI一起使用,请将以下配置添加到您的 ~/.vibe/config.toml:
重要
移除 mcp_servers = [] 从文件的上半部分开始执行此操作![[mcp_servers]]
name = "complex_plans"
transport = "stdio"
command = "npx"
args = ["-y", "@tuchsoft/mcp-complex-plans"]
[tools.complex_plans_createPlan]
permission = "always"
[tools.complex_plans_updatePlan]
permission = "always"
[tools.complex_plans_openInEditor]
permission = "always"
[tools.complex_plans_sequentialThinking]
permission = "always"
[tools.complex_plans_listPlans]
permission = "always"
[tools.complex_plans_readPlan]
permission = "always"
[tools.complex_plans_deletePlan]
permission = "ask"在计划/聊天模式下使用
要在计划/聊天模式下使用这些工具,请创建或编辑 ~/.vibe/agents/plan.toml (和/或 chat.toml)配置文件:
enabled_tools = [
"complex_plans_createPlan",
"complex_plans_updatePlan",
"complex_plans_openInEditor",
"complex_plans_sequentialThinking",
"complex_plans_listPlans"
]为了获得更好的结果
为了获得更好的结果, 编辑系统提示 包含如下代码片段,以指示模型何时使用此工具:
**FOR COMPLEX, MULTI-FILE EDITS, ALWAYS GENERATE A MARKDOWN PLAN FIRST:** if the user request a complex task that require editing multiple files, traverse the project or make a lot of changes, **YOU MUST** create a markdown plan and ask the user to confirm it before proceeding, use the `complex_plans_createPlan` tool (and consequitive `complex_plans_readPlan`, `complex_plans_updatePlan`, `complex_plans_listPlans`, `complex_plans_openInEditor`, (optional) `complex_plans_deletePlan` tools).
**ALWAYS** ask the user to review and accept the plan after calling `complex_plans_openInEditor` and **BEFORE** doing anything else, do not proceed with the implementation until the user has accepted the plan.
Follow the instrucion provided by the tool itself.
Also if the user request a plan creation **ALWAYS** use the `complex_plans_createPlan` tool.可选地,也添加这个其他块,以确保尽可能使用思维链:
**ALWAYS USE AN INTERNAL CHAIN OF THOUGHT**: Before answering to the user, writing code, editing a file, or performing whatever action, **always** use an internal chain of thought to verify your findings trough the use of the `complex_plans_sequentialthinking` tool.
Use as many tokens as you believe are necessary for your internal reasoning.
Output limit and verbosity constraints do not apply to your internal reasoning.
Always use the `complex_plans_sequentialthinking` tool for any task that is not a direct question-answer, as a rule of thumb if you are reading a file, you must also use the `complex_plans_sequentialthinking` tool.用法
- 当任务复杂、长或需要编辑许多文件时,模型应自行决定何时使用该工具。
- 要强制模型创建计划,只需包含以下内容
Create a plan before implementing - 要编辑计划,请执行以下操作:
- 您可以通过编辑计划文件手动完成此操作。该部分 Additional user provided details 您可以在此处提供模型遗漏的其他信息。记得从中删除 Risks/Doubts 任何你能给出明确答案的部分。 - 您可以通过提示要求模型这样做 Edit the plan to... (或 Edit my XYZ plan to... 如果不是在同一次谈话中)
配置
服务器支持以下多种配置方法 优先顺序 (从高到低):
- 项目级配置文件 (
[your_project]/.complex_plans/config.json)-最高优先级 - CLI参数 -覆盖环境变量
- 环境变量 -覆盖默认值
- 默认值 -最低优先级
配置选项
| 选项 | 类型 | 默认值 | CLI参数 | 环境变量 | 描述 |
|---|---|---|---|---|---|
default_editor | 字符串 | "zed" | --default-editor= | MCP_COMPLEX_PLANS_DEFAULT_EDITOR | 打开文件的默认编辑器 |
auto_delete_plans | 布尔值 | false | --auto-delete-plans= | MCP_COMPLEX_PLANS_AUTO_DELETE_PLANS | 实施后自动删除计划 |
add_to_gitignore | 布尔值 | true | --add-to-gitignore= | MCP_COMPLEX_PLANS_ADD_TO_GITIGNORE | 自动将.complex_plans添加到.gitignore |
disabled_tools | string\[\] | [] | --disabled-tools= | MCP_COMPLEX_PLANS_DISABLED_TOOLS | 要禁用的工具列表(逗号分隔) |
配置示例
配置文件 (.complex_plans/config.json):
{
"default_editor": "vscode",
"auto_delete_plans": false,
"add_to_gitignore": true,
"disabled_tools": ["listPlans"]
}CLI参数:
node dist/index.js --default-editor=vscode --auto-delete-plans=false --disabled-tools=listPlans,deletePlan环境变量:
export MCP_COMPLEX_PLANS_DEFAULT_EDITOR="vscode"
export MCP_COMPLEX_PLANS_AUTO_DELETE_PLANS="false"
export MCP_COMPLEX_PLANS_DISABLED_TOOLS="listPlans,deletePlan"工具
可用工具
- 创建计划:为复杂任务创建结构化计划
- 更新:使用搜索/替换块修改现有计划
- 删除计划:删除已完成或过时的计划
- listPlans:列出当前项目中的所有可用计划
- openInEditor:在配置的编辑器中打开文件进行查看
- 顺序思维:动态问题解决和分析工具
顺序思维
顺序思维的实现基于 顺序思维,有关详细的工具文档和使用模式,请参阅该仓库。
发展
npm install
npm run build
npm link #To then test using npx as normal许可证
麻省理工学院
