npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nicolasmirson/plan-mode-claude

v2.0.0

Published

Structured planning workflow for AI assistants with MCP integration

Readme

Plan Mode Claude

A structured planning workflow for AI assistants with MCP (Model Context Protocol) integration. Design better software by planning first.

Quick Start

  1. Install globally:

    npm install -g @nicolasmirson/plan-mode-claude
  2. Add to your MCP configuration (.cursor/mcp.json):

    {
      "servers": {
        "plan-mode-claude": {
          "command": "plan-mode-claude"
        }
      }
    }
  3. Restart your editor (Cursor/VS Code) to load the MCP server

  4. Start planning with your AI assistant:

    "Enter plan mode and help me build a user authentication system"

What is Plan Mode?

Plan Mode transforms how AI assistants work by requiring structured planning before execution:

  1. 🧠 Enter Plan Mode - Switch to planning state
  2. 📋 Create Plan - Define title and description
  3. Add Steps - Break down into manageable tasks with priorities
  4. Review & Approve - Present complete plan for approval
  5. 🚀 Execute - Track progress through each step

MCP Integration

Plan Mode Claude integrates seamlessly with editors through MCP:

Available Tools

| Tool | Purpose | Usage | |------|---------|-------| | enter_plan_mode | Start planning session | AI automatically enters planning state | | create_plan | Define plan title/description | create_plan(title, description) | | add_plan_step | Add step with priority/dependencies | add_plan_step(content, priority, deps) | | exit_plan_mode | Present plan for approval | Returns formatted plan for review | | update_step_status | Track progress | update_step_status(stepId, status) | | get_plan_status | Check current state | Shows plan overview and progress |

MCP Configuration

Cursor Setup

Add to .cursor/mcp.json:

{
  "servers": {
    "plan-mode-claude": {
      "command": "plan-mode-claude"
    }
  }
}

VS Code Setup

Add to your VS Code MCP configuration:

{
  "mcp": {
    "servers": {
      "plan-mode-claude": {
        "command": "plan-mode-claude"
      }
    }
  }
}

Manual Configuration

If you need custom paths:

{
  "servers": {
    "plan-mode-claude": {
      "command": "node",
      "args": ["/path/to/global/node_modules/@nicolasmirson/plan-mode-claude/bin/plan-mode-claude"]
    }
  }
}

Example Workflow

Here's how a typical planning session works:

👤 User: "Enter plan mode and help me build a user authentication system"

🤖 AI: I've entered plan mode. Let me create a structured plan for building a user authentication system.

📋 Plan: "Build User Authentication System"
   Description: Implement secure login/signup with JWT tokens and password hashing

📝 Steps:
   1. [HIGH] Set up database schema for users
   2. [HIGH] Create password hashing utilities  
   3. [HIGH] Build signup endpoint with validation
   4. [HIGH] Build login endpoint with JWT generation
   5. [MEDIUM] Add JWT middleware for protected routes
   6. [MEDIUM] Create logout functionality
   7. [LOW] Add password reset flow

👤 User: "Looks good, let's proceed"

🤖 AI: Perfect! I'll start with step 1...

Cursor Rules Integration

Plan Mode Claude automatically creates Cursor rules to optimize your AI assistant's behavior. After installation, you'll find enhanced planning prompts in .cursor/rules/plan-mode-claude.mdc.

Programming API

For advanced users who want to integrate Plan Mode into their own applications:

import { PlanManager } from '@nicolasmirson/plan-mode-claude';

const planManager = new PlanManager();

// Enter plan mode
planManager.enterPlanMode();

// Create a plan
const plan = planManager.createPlan(
  'Build User Authentication',
  'Implement secure login system with JWT tokens'
);

// Add steps with priorities and dependencies
const step1 = planManager.addStep('Set up database schema', 'high');
const step2 = planManager.addStep('Create login endpoint', 'high', [step1.id]);

// Handle approval workflow
planManager.setApprovalCallback(async (request) => {
  console.log('📋 Plan ready for review:');
  console.log(request.markdown);
  return { approved: true };
});

// Execute and track progress
const approval = await planManager.exitPlanMode();
if (approval.approved) {
  planManager.updateStepStatus(step1.id, 'in_progress');
  // ... implement step ...
  planManager.updateStepStatus(step1.id, 'completed');
}

Core Features

  • 🎯 Structured Planning: Break complex tasks into manageable steps
  • Approval Workflow: Review plans before execution
  • 🔄 Progress Tracking: Monitor step completion in real-time
  • 🔗 Dependency Management: Handle step dependencies with cycle detection
  • 📊 Priority Support: Organize steps by priority (high/medium/low)
  • 🎨 Markdown Export: Convert plans to readable format
  • 🔌 MCP Integration: Native editor integration (Cursor, VS Code)
  • 📝 Cursor Rules: Automatic setup of optimized AI prompts

TypeScript Support

Full TypeScript support with comprehensive types:

interface Plan {
  id: string;
  title: string;
  description: string;
  steps: PlanStep[];
  status: 'draft' | 'approved' | 'executing' | 'completed';
}

interface PlanStep {
  id: string;
  content: string;
  status: 'pending' | 'in_progress' | 'completed';
  priority: 'high' | 'medium' | 'low';
  dependencies?: string[];
}

Troubleshooting

MCP Server Not Loading

  1. Check global installation:

    which plan-mode-claude
    # Should return: /usr/local/bin/plan-mode-claude or similar
  2. Verify MCP configuration:

    • Ensure .cursor/mcp.json exists
    • Check JSON syntax is valid
    • Restart your editor after changes
  3. Test server manually:

    plan-mode-claude
    # Should start without errors

Tools Not Available

  1. Restart your editor after installing
  2. Check MCP status in your editor's MCP panel
  3. Verify permissions - ensure the binary is executable

License

MIT