Advanced MCP server with 44+ metaprompt strategies including AI Core Principles, Vibe Coding Rules, and metadata-driven intelligent selection
npm install prompt-plus-plus-mcpAn advanced MCP (Model Context Protocol) server that intelligently enhances prompts using 44+ metaprompt strategies. Features enterprise-grade architecture with caching, performance monitoring, and multiple workflow patterns.
- šÆ 3-Step Intelligent Workflow: LLM-guided category ā strategy ā execution pipeline
- š§ 44+ Metaprompt Strategies: Comprehensive collection across 5 specialized categories
- š¤ Smart Auto-Selection: AI-powered strategy matching with 95%+ accuracy
- ā” High Performance: Sub-millisecond selection with intelligent caching
- š”ļø Enterprise Ready: Health monitoring, structured logging, graceful error handling
- š§ Developer Experience: Hot reloading, performance metrics, TypeScript throughout
- š¦ Zero Dependencies: Completely local execution, no external APIs
- šØ Custom Prompts: Create and use your own prompt strategies alongside built-in ones
- š Strategy Collections: Create personal collections of favorite strategies for quick access
#### Option 1: Using npx (Recommended)
No installation needed! Configure Claude Desktop to use npx:
Claude Desktop Configuration:
Add to your claude_desktop_config.json:
``json`
{
"mcpServers": {
"prompt-plus-plus": {
"command": "npx",
"args": [
"-y",
"prompt-plus-plus-mcp"
]
}
}
}
#### Option 2: Global Installation
`bash`
npm install -g prompt-plus-plus-mcp
Claude Desktop Configuration:
`json`
{
"mcpServers": {
"prompt-plus-plus": {
"command": "prompt-plus-plus-mcp"
}
}
}
> The MCP server ONLY provides prompt templates and metadata. The LLM (Claude) makes ALL decisions about which strategy to use.
This is a Meta-Prompt Server - it doesn't enhance prompts directly. Instead, it provides the LLM with:
1. All available strategy templates and metadata
2. Instructions for the LLM to analyze and select
3. The framework for the LLM to apply enhancements
`mermaid`
graph TD
A[User Prompt] --> B[MCP Server]
B --> C[Present All Strategies to LLM]
C --> D[LLM Analyzes & Selects]
D --> E[LLM Applies Selected Strategy]
E --> F[Enhanced Prompt]
Let's walk through what happens when you use Prompt++ to refine a prompt:
Your Original Prompt: "Write a function to process user data"
Step 1: You ask Claude:
``
Use auto_refine prompt with user_prompt: "Write a function to process user data"
Step 2: MCP Server sends to Claude:
`
You are an expert prompt engineer. Your task is to analyze the user's prompt and select the most appropriate strategy from all available options, then apply it.
User's Prompt: Write a function to process user data
Available Strategy Categories & Options:
{
"core_strategies": {
"category": "Core Strategies",
"description": "Fundamental prompt enhancement approaches",
"strategies": {
"star": {
"name": "ECHO Prompt",
"description": "Comprehensive multi-stage refinement",
"best_for": ["complex tasks", "creative work"],
"complexity": "high"
},
"done": {
"name": "Done Prompt",
"description": "Structured approach with role-playing",
"best_for": ["general tasks", "business problems"],
"complexity": "medium"
},
// ... 8 more strategies
}
},
"software_development": {
"category": "Software Development",
"description": "Code and system design focused strategies",
"strategies": {
"boomerang": {
"name": "Boomerang Development",
"description": "Iterative development with testing cycles",
"best_for": ["api development", "feature implementation"],
"triggers": ["iterative", "testing", "development"],
"complexity": "medium"
},
// ... 3 more strategies
}
},
// ... 3 more categories with 30+ more strategies
}
Your Process:
1. Analyze the user's prompt
2. Review all available strategies
3. Select the most appropriate strategy
4. Apply the selected strategy
`
Step 3: Claude (the LLM) Analyzes and Responds:
`
SELECTED STRATEGY: boomerang (software_development)
REASONING: The user wants to implement a specific algorithm. The Boomerang Development strategy is optimal because:
- It focuses on iterative development with testing
- Perfect for algorithm implementation
- Includes performance considerations
- Emphasizes clean, testable code
REFINED PROMPT:
Create a robust data processing function with the following specifications:
Core Requirements:
- Function name: processUserData()
- Input validation for all parameters
- Comprehensive error handling with specific error types
- Return type annotations and documentation
Implementation Details:
- Use TypeScript for type safety
- Include input sanitization for security
- Add logging for debugging purposes
- Handle edge cases (null, undefined, empty objects)
Testing Requirements:
- Unit tests for valid inputs
- Error case testing
- Performance benchmarks for large datasets
- Integration tests with sample data
Documentation:
- JSDoc comments explaining purpose and parameters
- Usage examples with different data types
- Error handling examples
Quality Assurance:
- Follow existing code patterns in the project
- Use consistent naming conventions
- Implement defensive programming practices
KEY IMPROVEMENTS:
- Added specific implementation requirements
- Included performance optimization needs
- Specified testing requirements
- Added code quality standards
- Defined clear deliverables
`
This workflow gives the LLM maximum control at each decision point:
#### Step 1: Category Selection
``
Use step1_get_categories prompt with user_prompt: "Write a function to process user data"
MCP Server provides all 5 categories to Claude:
- Core Strategies (10 strategies)
- Software Development (4 strategies)
- AI Core Principles (13 strategies)
- Vibe Coding Rules (11 strategies)
- Advanced Thinking (6 strategies)
Claude analyzes and responds:
`json`
{
"selected_category": "software_development",
"reasoning": "The prompt involves writing code functionality, which aligns with software development practices and requires technical implementation guidance",
"analysis": "The prompt requests function creation with data processing, indicating need for coding best practices, error handling, and testing considerations"
}
#### Step 2: Strategy Selection
``
Use step2_get_strategies prompt with category_name: "software_development" and user_prompt: "Write a function to process user data"
MCP Server provides all Software Development strategies to Claude:
- architect: System design and architecture
- boomerang: Iterative development with testing cycles
- reviewer: Code review and QA frameworks
- devops: CI/CD and infrastructure automation
Claude reviews and responds:
`json`
{
"selected_strategy": "boomerang",
"strategy_name": "Boomerang Development",
"reasoning": "The iterative development approach is optimal for function creation as it emphasizes testing, feedback loops, and incremental improvement - essential for robust data processing",
"expected_improvements": "Will add comprehensive testing framework, error handling patterns, input validation, and documentation standards"
}
#### Step 3: Execute Strategy
``
Use step3_execute_strategy prompt with strategy_key: "boomerang" and user_prompt: "Write a function to process user data"
MCP Server provides the boomerang template to Claude, who applies it to create:
`
REFINED PROMPT:
Design and implement a data processing function using iterative development methodology:
Phase 1: Core Implementation
- Define processUserData() with clear interface
- Implement basic data transformation logic
- Add comprehensive TypeScript types
- Create initial error handling structure
Phase 2: Testing & Validation
- Write unit tests before extending functionality
- Test with various data formats (JSON, arrays, objects)
- Validate input sanitization and security measures
- Performance test with realistic datasets
Phase 3: Refinement & Documentation
- Refactor based on test feedback
- Add comprehensive JSDoc documentation
- Implement logging and monitoring hooks
- Create usage examples and integration guides
Quality Gates:
- All tests must pass before proceeding to next phase
- Code review checklist completion
- Performance benchmarks meet requirements
- Security validation passes
KEY IMPROVEMENTS:
- Structured iterative approach prevents scope creep
- Test-driven development ensures reliability
- Clear phases enable progress tracking
- Quality gates maintain high standards
STRATEGY APPLIED: Boomerang Development
`
python
Server code that made decisions
if "fibonacci" in prompt or "algorithm" in prompt:
return "boomerang" # Server decided!
elif "decision" in prompt:
return "devils_advocate" # Server decided!
`$3
`python
Server only provides data
return {
"all_strategies": get_all_strategies(),
"instruction": "You analyze and decide"
}
LLM makes the decision!
`š¬ Real-World Process Examples
$3
User Prompt:
"Build a real-time chat system with websockets"Process:
1. MCP Server Action:
- Loads metadata for all 44+ strategies
- Formats them with descriptions, use cases, complexity
- Sends everything to Claude
2. Claude's Analysis:
`
Analyzing prompt characteristics:
- Domain: Software development
- Type: System implementation
- Complexity: High
- Key aspects: real-time, networking, architecture
Reviewing all strategies...
Best matches:
- architect: System design focus ā
- boomerang: Iterative development ā
- devops: Infrastructure needs ā
`3. Claude's Selection:
`
SELECTED: architect
REASON: Building a real-time system requires careful architectural planning
`4. Claude's Enhancement:
Applies architect methodology to create comprehensive system design prompt with scalability, security, and performance considerations
$3
User Prompt:
"I need to make a difficult decision about our product roadmap"What Claude Does:
1. Step 1: Reviews all 5 categories, selects "AI Core Principles" for its decision-making frameworks
2. Step 2: From 13 AI Core Principles, selects "devils_advocate" for systematic analysis
3. Step 3: Applies Devil's Advocate methodology to create comprehensive decision framework
$3
User:
"Help me optimize database queries"MCP Server: Presents ALL strategies to Claude
Claude independently selects 3-5 relevant ones:
- boomerang (iterative optimization)
- reviewer (performance review)
- pattern_recognizer (identify optimization patterns)
Then compares their approaches and provides multiple refinement options.
š All 44+ Available Strategies
$3
| Strategy | Use Case | Complexity |
|----------|----------|------------|
| ECHO (star) | Complex creative tasks, detailed analysis | High |
| Done | Structured tasks, role-playing scenarios | Medium |
| Physics | Scientific analysis, technical problems | Medium |
| Morphosis | Quick improvements, simple tasks | Low |
| Verse | Technical prompts, information flow | Medium |
| Math | Mathematical reasoning, formal proofs | High |
| Phor | Advanced technique combination | High |
| Bolism | Optimization tasks, structured output | Medium |
| Arpe | Advanced reasoning, complex logic | High |
| Touille | General refinement, balanced approach | Medium |$3
| Strategy | Best For | Time Investment |
|----------|----------|-----------------|
| Architect | System design, microservices, scalability | High |
| Boomerang | Iterative development, testing, refactoring | Medium |
| Reviewer | Code review, quality assurance, standards | Medium |
| DevOps | CI/CD, infrastructure, deployment | Medium-High |$3
| Strategy | Application | Cognitive Focus |
|----------|-------------|-----------------|
| Metacognitive | Bias analysis, thinking about thinking | Self-reflection |
| Adversarial | Stress testing, vulnerability analysis | Attack/Defense |
| Fractal | Scale-invariant problems, hierarchies | Recursive patterns |
| Quantum | Uncertainty navigation, parallel possibilities | Superposition |
| Temporal | Time-aware analysis, causality chains | Multi-timeline |
| Synthesis | Cross-domain innovation, concept fusion | Creative combination |$3
Critical thinking enhancement frameworks:
- Assumption Detector ā Challenge hidden assumptions
- Devil's Advocate ā Generate systematic counterarguments
- Ripple Effect Analyzer ā Trace cascading consequences
- Perspective Multiplier ā Multi-stakeholder analysis
- Evidence Seeker ā Demand concrete validation
- Pattern Recognizer ā Identify recurring patterns
- Root Cause Analyzer ā Find fundamental causes
- Constraint Identifier ā Map limiting factors
- Paradox Navigator ā Resolve contradictions
- Tradeoff Tracker ā Explicit cost-benefit analysis
- Context Expander ā Prevent local optimization
- Precision Questioner ā Transform vague to precise
- Time Capsule Test ā Long-term durability assessment$3
AI-assisted development patterns:
- Start from Template ā Leverage proven foundations
- Use Agent Mode ā Optimize AI collaboration
- Write Tests First ā TDD for clarity and quality
- Keep Files Small ā Modular, readable structure
- Run Locally, Test Frequently ā Rapid feedback loops
- Follow Existing Patterns ā Consistency and conventions
- Delete Aggressively ā Remove complexity and dead code
- Ship Small Changes ā Incremental, safe deployment
- Collaborate Early and Often ā Stakeholder engagement
- Refactor Continuously ā Ongoing improvement
- Document Intent ā Focus on why, not howš” Common Patterns & LLM Selection Behavior
$3
- Claude often selects from Software Development category
- Frequently chooses: boomerang, architect, reviewer$3
- Claude gravitates toward AI Core Principles
- Common picks: devils_advocate, tradeoff_tracker, ripple_effect$3
- Claude selects from Core Strategies or Advanced Thinking
- Popular choices: star, synthesis, quantum$3
- Claude identifies simplicity need
- Often selects: morphosis, donešļø Architecture & Performance
$3
The MCP server provides rich metadata that Claude uses for selection:
- Keywords: 50+ trigger patterns across domains
- Complexity: Task complexity indicators
- Domain: Technical, creative, analytical, mathematical
- Best For: Specific use case recommendations
- Examples: Sample prompts for pattern matching$3
- Sub-millisecond Selection: Optimized matching algorithms
- Intelligent Caching: 10-minute TTL with automatic cleanup
- Hot Reloading: File watcher for development
- Memory Efficient: Resource cleanup and monitoring
- Graceful Degradation: Fallback strategies on failures$3
- Structured Logging: Environment-aware with context
- Health Monitoring: Built-in diagnostics and metrics
- Error Boundaries: Comprehensive exception handling
- Type Safety: Strong TypeScript throughout
- Resource Management: Proper cleanup and shutdownš§ Advanced Usage
$3
`
Use get_performance_metrics tool
`$3
`
Use health_check tool
`$3
`
Use discover_strategies tool
`$3
`
Use compare_refinements prompt with user_prompt: "your prompt" and strategies: "star,physics,boomerang"
`šØ Custom Prompts Support
Create your own prompt strategies to extend Prompt++ with domain-specific or team-specific enhancements.
$3
1. Create a custom prompts directory:
`bash
mkdir -p ~/.prompt-plus-plus/custom-prompts
`2. Set environment variable (optional):
`bash
export PROMPT_PLUS_CUSTOM_DIR="/path/to/your/custom-prompts"
`3. Add your custom strategies (see
custom-prompts-example/ for templates)$3
`bash
List all custom strategies
Use list_custom_strategies toolUse a specific custom strategy
Use refine_with_custom_my-team_code_review prompt with user_prompt: "Review this code"Auto-refine using only custom strategies
Use auto_refine prompt with user_prompt: "..." and source: "custom"Auto-refine using only built-in strategies
Use auto_refine prompt with user_prompt: "..." and source: "built-in"
`$3
Each strategy is a JSON file with:
-
name: Display name
- description: What it does
- template: Metaprompt template with [Insert initial prompt here] placeholder
- examples: Usage examples
- triggers: Keywords for auto-selection
- best_for: Ideal use casesSee
custom-prompts-example/ directory for complete examples.š Strategy Collections
Create personal collections of your favorite strategies (both built-in and custom) for quick access.
$3
`bash
Create a new collection
Use manage_collection tool with action: "create" and collection: "my-favorites" and name: "My Favorite Strategies" and description: "Go-to strategies for daily work"Add strategies to collection
Use manage_collection tool with action: "add_strategy" and collection: "my-favorites" and strategy: "star"
Use manage_collection tool with action: "add_strategy" and collection: "my-favorites" and strategy: "boomerang"
`$3
`bash
List all collections
Use list_collections toolUse a collection with auto-refine
Use auto_refine prompt with user_prompt: "Create a function to sort data" and collection: "quick-coding"
`$3
`bash
Remove strategy from collection
Use manage_collection tool with action: "remove_strategy" and collection: "my-favorites" and strategy: "star"Update collection details
Use manage_collection tool with action: "update" and collection: "my-favorites" and description: "Updated description"Delete collection
Use manage_collection tool with action: "delete" and collection: "my-favorites"
`$3
See
collections-example.json for pre-made collections:
- quick-coding: Rapid development strategies
- deep-analysis: Complex problem solving
- creative-work: Innovation and creative thinking
- code-review: Quality assurance strategies
- decision-making: Strategic planning frameworks
- learning: Educational and understanding strategiesCollections are stored in
~/.prompt-plus-plus/collections.jsonš Project Structure
`
prompt-plus-plus-mcp/
āāā src/ # TypeScript source code
ā āāā index.ts # Main MCP server with workflow factory
ā āāā strategy-manager.ts # Enhanced loading with caching
ā āāā strategy-selector.ts # Intelligent selection algorithm
ā āāā prompt-refiner.ts # Simplified interface
ā āāā workflow-factory.ts # Factory pattern for handlers
ā āāā cache.ts # TTL caching system
ā āāā logger.ts # Structured logging
ā āāā schema-validator.ts # JSON schema validation
ā āāā types.ts # Comprehensive type definitions
āāā metaprompts/ # Built-in strategy definitions by category
ā āāā core_strategies/ # 10 foundational approaches
ā āāā software_development/ # 4 dev-focused strategies
ā āāā advanced_thinking/ # 6 cognitive frameworks
ā āāā ai_core_principles/ # 13 critical thinking tools
ā āāā vibe_coding_rules/ # 11 AI development patterns
āāā custom-prompts-example/ # Example custom strategies (copy as template)
ā āāā my-team/ # Team-specific strategies example
ā āāā personal/ # Personal productivity example
āāā dist/ # Compiled JavaScript
āāā IMPROVEMENTS.md # Implementation history
āāā USER_GUIDE.md # Comprehensive usage guide
`š¤ Contributing
We welcome contributions! Areas where you can help:
$3
1. Create JSON file in appropriate category subdirectory
2. Follow schema: name, description, template, examples, triggers, best_for
3. Add metadata entry if creating new category
4. Test with various prompt types$3
- Enhance keyword matching in strategy-selector.ts`- Strategy Loading: 44 strategies in ~50ms
- Selection Time: <1ms average, <5ms 99th percentile
- Memory Usage: <10MB baseline, <50MB peak
- Cache Hit Rate: 90%+ in typical development workflow
- Error Recovery: <100ms fallback to safe defaults
The Prompt++ MCP server is a pure data provider. It:
- ā
Loads strategy templates and metadata
- ā
Presents all options to the LLM
- ā
Provides structured prompts for LLM to process
- ā Does NOT make selection decisions
- ā Does NOT analyze prompts
- ā Does NOT score strategies
The LLM (Claude) is the intelligent decision maker. It:
- ā
Analyzes the user's prompt
- ā
Reviews all available strategies
- ā
Selects the best match
- ā
Applies the strategy methodology
- ā
Explains its reasoning
This separation ensures the system leverages the LLM's intelligence rather than relying on rigid keyword matching.
MIT License - see LICENSE file for details.
- npm Package
- GitHub Repository
- Model Context Protocol
- User Guide - Comprehensive examples and workflows
- Architecture Guide - Technical implementation details