- TypeScript 66.7%
- JavaScript 33.3%
| .vibe/plans | ||
| src | ||
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| test-import.js | ||
| test-refactored.js | ||
| test-tools.js | ||
| tsconfig.json | ||
Complex Plan MCP Server
A Model Context Protocol (MCP) server for complex task planning and management.
Features
- Plan Creation: Create structured plans for complex tasks
- Plan Management: Delete plans when no longer needed
- Configuration: Customizable behavior through configuration
- Git Integration: Automatic .gitignore management
- File Management: Open files in your preferred editor
Tools
create_plan
Description: Create a new plan file in the .ai_plans directory
Parameters:
plan_name(string, required): Name of the plan (used for filename)plan_content(string, required): Markdown content of the planworkspace_root(string, optional): Root directory of the workspace (defaults to current directory)
When to use:
- When you need to break down a complex task into manageable steps
- When you want to create a reusable plan for future reference
- When you need to document your thought process for complex operations
Plan Structure:
# Plan: [Task Name]
## Goal
[max 3-line summary]
## Steps
1. [Action] → [File]
2. [Action] → [File]
## Risks/Doubts
- [Question for user]
- [Assumption]
## Verification
- Run `npm test` (example)
- Check `logs/debug.txt` (example)
delete_plan
Description: Delete a plan file from the .ai_plans directory
Parameters:
plan_name(string, required): Name of the plan to deleteworkspace_root(string, optional): Root directory of the workspace (defaults to current directory)
When to use:
- When a plan has been completed and is no longer needed
- When you want to clean up old or obsolete plans
- When you need to remove sensitive information from plans
Important notes:
- The plan directory is not deleted, only the plan.md file is removed
- This operation cannot be undone
- If auto_delete_plans is enabled in configuration, this will be called automatically after plan implementation
open_in_zed
Description: Open a file in the configured editor at a specific location
Parameters:
filepath(string, required): Path to the file to open in the configured editor
When to use:
- When you need to quickly open a file in your preferred editor
- When you want to navigate to a specific file location
- When you need to review or edit files during plan execution
Supported Editors:
The tool supports multiple editors through configuration. Set default_editor in .mcp-config.json to one of:
Modern Editors (require CLI installation):
zed(default) - Zed CLI Setupvscodeorcode- VS Code CLI Setupsublimeorsubl- Sublime Text CLIatom- Atom CLI
JetBrains IDEs (require CLI tools):
pycharm- PyCharm CLIwebstorm- WebStorm CLIintellij- IntelliJ IDEA CLIphpstorm- Requires PhpStorm CLI toolsgoland- Requires GoLand CLI toolsrider- Requires Rider CLI toolsclion- Requires CLion CLI toolsrubyine- Requires RubyMine CLI toolsdatagrip- Requires DataGrip CLI toolsandroidstudio- Requires Android Studio CLI (studiocommand)
Terminal Editors (usually pre-installed):
Other Editors:
notepad++- Windows only, requires Notepad++ with CLI supporttextmate- TextMate CLIbbedit- BBEdit CLInova- Nova CLI
CLI Installation Requirements:
⚠️ Important: Most editors require their command-line tools to be installed and available in your system PATH. For example:
- VS Code: Run
code --install-extensionor add VS Code to PATH - Zed: Install Zed and ensure
zedcommand is available - JetBrains IDEs: Install the "Command Line Tools" from the IDE settings
- Sublime Text: Install the CLI tools from Sublime Text preferences
If you get "command not found" errors, you need to install the corresponding CLI tools for your chosen editor.
Example configuration:
{
"default_editor": "vscode",
"auto_delete_plans": false,
"add_to_gitignore": true
}
Troubleshooting:
- If your editor isn't opening, check if the command works in your terminal first
- Use
which editor-name(Unix) orwhere editor-name(Windows) to verify CLI availability - The tool will fall back to Zed if the configured editor is not recognized
Configuration
The server can be configured using a .mcp-config.json file in your workspace root:
{
"default_editor": "zed",
"auto_delete_plans": false,
"add_to_gitignore": true
}
Configuration Options:
default_editor(string, optional): Default editor for opening files. Default: "zed"auto_delete_plans(boolean, optional): Automatically delete plans after implementation. Default: falseadd_to_gitignore(boolean, optional): Automatically add .ai_plans to .gitignore. Default: true
Installation
npm install -g @modelcontextprotocol/sdk
node dist/index.js
Usage
- Start the server:
node dist/index.js - Use the tools through your MCP client
- Create plans, manage them, and execute complex tasks
Sequential Thinking Integration ✨
This server now includes fully integrated sequential thinking functionality! The sequentialthinking tool is built directly into our server, providing a unified experience for both planning and deep thinking.
Sequential Thinking Tool
Tool Name: sequentialthinking
Description: A detailed tool for dynamic and reflective problem-solving through thoughts. This tool helps analyze problems through a flexible thinking process that can adapt and evolve.
Key Features
- Structured Thought Process: Break down complex problems into manageable steps
- Branching Support: Explore alternative approaches and thought paths
- Revision Capabilities: Revisit and refine previous thoughts
- Multi-step Analysis: Maintain context across multiple thinking steps
- Hypothesis Generation: Develop and verify solution hypotheses
- Adaptive Thinking: Adjust thought count and approach as understanding deepens
When to Use
- Breaking down complex problems into steps
- Planning and design with room for revision
- Analysis that might need course correction
- Problems where the full scope isn't initially clear
- Multi-step problem solving requirements
- Maintaining context across extended reasoning
- Filtering out irrelevant information
Parameters
{
thought: string; // Your current thinking step
nextThoughtNeeded: boolean; // Whether another thought step is needed
thoughtNumber: number; // Current thought number (e.g., 1, 2, 3)
totalThoughts: number; // Estimated total thoughts needed (e.g., 5, 10)
isRevision?: boolean; // Whether this revises previous thinking
revisesThought?: number; // Which thought is being reconsidered
branchFromThought?: number; // Branching point thought number
branchId?: string; // Branch identifier
needsMoreThoughts?: boolean; // If more thoughts are needed
}
Response Format
{
thoughtNumber: number;
totalThoughts: number;
nextThoughtNeeded: boolean;
branches: string[]; // Active branch identifiers
thoughtHistoryLength: number; // Total thoughts processed
}
Example Usage
{
"thought": "First, I need to analyze the requirements and break down the problem into smaller components",
"nextThoughtNeeded": true,
"thoughtNumber": 1,
"totalThoughts": 4
}
Advanced Features
Branching: Create alternative thought paths for exploring different approaches
{
"thought": "Alternative approach: What if we use a different database structure?",
"nextThoughtNeeded": true,
"thoughtNumber": 3,
"totalThoughts": 5,
"branchFromThought": 2,
"branchId": "db-alternative"
}
Revisions: Revisit and refine previous thoughts
{
"thought": "Actually, the initial database approach has security concerns",
"nextThoughtNeeded": true,
"thoughtNumber": 4,
"totalThoughts": 6,
"isRevision": true,
"revisesThought": 2
}
Visual Thought Formatting
The server includes beautiful console formatting for thoughts:
- 💭 Thought N/M - Regular thoughts
- 🔄 Revision N/M - Thought revisions
- 🌿 Branch N/M - Branched thoughts
Benefits of Integration
- Unified Workflow: No need to run separate servers
- Consistent Experience: Same tool interface for planning and thinking
- Better Performance: Integrated architecture
- Simplified Setup: Single server installation
- Enhanced Features: Custom enhancements and improvements
Development
npm install
npm run dev # Start development server
npm run build # Build for production
License
MIT