Skip to content

Parth3930/recursive-thinking-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chain-of-Thought Recursive Thinking MCP Server

v2.2.0 - Expert Roles, Custom Checklists, and Strict Validation!

Token-efficient MCP server that makes AI agents think deeper through structured reasoning chains, self-critique, and automatic rethinking loops.

🎯 What's New in v2.2.0

Feature Description Benefit
Expert Roles AI assumes specific personas (e.g., Security Architect) Rigorous perspective-based thinking
Custom Checklists Validate solutions against specific requirements Tailored quality enforcement
Strict Mode Prevents finalization unless all criteria are met High-bar production quality
Chain of Thought AI explains WHY it chose each solution Transparent reasoning, better decisions
Self-Evaluation AI rates its own solutions (1-10 scale) Honest assessment of solution quality
Rethink Loop Automatic rethinking if rating <7 or issues found Continuous improvement

✨ Features

  • 🧠 Chain of Thought: AI must explain reasoning behind every decision
  • 🎭 Expert Roles: Inject specialized expertise into the thinking process
  • 📋 Custom Checklists: Force AI to validate against your specific requirements
  • ⚖️ Strict Mode: Ensure the AI never settles for "good enough"
  • 📊 Self-Evaluation: AI rates solutions with score (1-10), good/bad flag, and rationale
  • 🔄 Continuous Rethinking: Automatically rethinks if solution scored <7 or has weaknesses
  • 🎯 Phase-Based Workflow: Structured 5-phase thinking process
  • 💰 Token Optimized: Smart compression, phase-focused prompts (~70% reduction)

🔄 How It Works

The 5 Phases

┌─────────────┐
│  1. EXPLORE │ ──→ Propose solution with reasoning & expert perspective
└──────┬──────┘
       ▼
┌─────────────┐
│  2. JUSTIFY │ ──→ Critically examine reasoning & assumptions
└──────┬──────┘
       ▼
┌─────────────┐
│  3. EVALUATE│ ──→ Rate solution (1-10) against checklist
└──────┬──────┘
       ▼
   ┌───┴───┐
   │ Score │
   │ ≥7?   │ ──NO─→ ┌─────────────┐
   └───┬───┘        │  4. RETHINK │ ──→ Improve based on weaknesses
       │YES         └──────┬──────┘
       ▼                   │
┌─────────────┐            │
│  5. FINALIZE│ ←──────────┘
└─────────────┘

🚀 Usage

Starting a Thinking Session with Advanced Config

await mcp.callTool('recursive_thinking', {
  action: 'start',
  task: 'Design a highly available database schema for a global payment system',
  config: {
    role: 'Database Reliability Engineer',
    checklist: [
      'Must handle 10k transactions/sec',
      'ACID compliance mandatory',
      'Multi-region failover strategy',
      'Data encryption at rest and in transit'
    ],
    strictMode: true,
    minRating: 8
  }
});

⚙️ Configuration Options

Parameter Type Default Description
role string - Expert persona to assume (e.g., 'Senior DevOps')
checklist string[] [] Specific requirements to validate against
strictMode boolean false If true, fails instead of finalizing if criteria aren't met
maxDepth number 5 Maximum recursion depth
minConfidence number 0.85 Stop when confidence meets threshold
minRating number 7 Minimum acceptable score (1-10)
enableRethinking boolean true Enable continuous refinement loop

📦 Installation

npx -y recursive-thinking-mcp

📄 License

MIT

🔗 Links

About

Token-efficient MCP server for AI agents to achieve production-ready solutions through iterative refinement

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors