使用说明
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_readPlan",
"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.
Claude代码配置
要将此服务器与Claude Code一起使用,请将以下内容添加到您的 ~/.claude/claude.json (全球)或 .claude/settings.json (项目层面):
全局配置 (~/.claude/claude.json):
{
"mcpServers": {
"complex_plans": {
"command": "npx",
"args": ["-y", "@tuchsoft/mcp-complex-plans", "--disabled-tools=sequentialThinking"]
}
}
}
或者通过Claude Code CLI:
claude mcp add complex_plans npx -- -y @tuchsoft/mcp-complex-plans --disabled-tools=sequentialThinking
注意
sequentialThinking:Claude内置了本地扩展推理。强烈建议禁用sequentialThinking工具(如上所示),以避免冗余和与克劳德自己的推理冲突。禁用后,该工具将完全从Claude的上下文中删除——有关它的说明将不可见。
推荐的CLAUDE.md代码段
将此添加到您的项目 CLAUDE.md 指导克劳德何时使用计划工具:
## Complex Plans
**FOR COMPLEX, MULTI-FILE EDITS, ALWAYS GENERATE A MARKDOWN PLAN FIRST:** If the user requests a complex task that requires editing multiple files, traversing the project, or making many changes, **YOU MUST** create a markdown plan and ask the user to confirm it before proceeding. Use the `complex_plans_createPlan` tool (and subsequent `complex_plans_readPlan`, `complex_plans_updatePlan`, `complex_plans_listPlans`, `complex_plans_openInEditor`, and optionally `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 instructions provided by each tool. When asked to create a plan, always use `complex_plans_createPlan`.
**IMPORTANT**: Ignore the built-in `EnterPlanMode` and `ExitPlanMode` tools — use `complex_plans_createPlan` instead for all planning workflows.
注射说明注释: 服务器在初始化时自动向模型发送一组指令(例如,使用
complex_plans工具集,以及何时auto_delete_plans将现有计划视为历史数据)。上面的片段仍然可以作为后备或额外强调。
用法
- 当任务复杂、长或需要编辑许多文件时,模型应自行决定何时使用该工具。
- 要强制模型创建计划,只需包含以下内容
Create a plan before implementing - 要编辑计划,请执行以下操作:
- 您可以通过编辑计划文件手动完成此操作。该部分
Additional user provided details您可以在此处提供模型遗漏的其他信息。记得从中删除Risks/Doubts任何你能给出明确答案的部分。 - 您可以通过提示要求模型这样做
Edit the plan to...(或Edit my XYZ plan to...如果不是在同一次谈话中)
- 您可以通过编辑计划文件手动完成此操作。该部分
配置
服务器支持以下多种配置方法 优先顺序 (从高到低):
- 项目级配置文件 (
[your_project]/<plans_dir>/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 |
自动将计划目录添加到.gitignore |
plans_dir |
字符串 | ".complex_plans" |
--plans-dir= |
MCP_COMPLEX_PLANS_PLANS_DIR |
用于存储计划文件的目录名称 |
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,
"plans_dir": ".complex_plans",
"disabled_tools": ["listPlans"]
}
CLI参数:
node dist/index.js --default-editor=vscode --auto-delete-plans=false --plans-dir=.complex_plans --disabled-tools=listPlans,deletePlan
环境变量:
export MCP_COMPLEX_PLANS_DEFAULT_EDITOR="vscode"
export MCP_COMPLEX_PLANS_AUTO_DELETE_PLANS="false"
export MCP_COMPLEX_PLANS_PLANS_DIR=".complex_plans"
export MCP_COMPLEX_PLANS_DISABLED_TOOLS="listPlans,deletePlan"
工具
可用工具
- 创建计划:为复杂任务创建结构化计划
- 更新:使用搜索/替换块修改现有计划
- 删除计划:删除已完成或过时的计划
- listPlans:列出当前项目中的所有可用计划
- openInEditor:在配置的编辑器中打开文件进行查看
- 顺序思维:动态问题解决和分析工具
顺序思维
顺序思维的实现基于 顺序思考,有关详细的工具文档和使用模式,请参阅该仓库。
发展
npm install
npm run build
npm link #To then test using npx as normal
许可证
麻省理工学院