MCP Prompt Optimizer

by bubobot-team

Not rated
GitHub

About

Optimize prompts with research-backed strategies for 15-74% performance improvements.

Details

Author
bubobot-team
Categories
Developer Tools, AI

Setup

Install MCP Prompt Optimizer in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/bubobot-team/mcp-prompt-optimizer

Follow the installation instructions in the repository README, then restart your MCP client.

A professional-grade MCP (Model Context Protocol) server that provides cutting-edge prompt optimization tools with research-backed strategies delivering 15-74% performance improvements.

- Clarity: Simplifies prompts for directness and precision
- Specificity: Adds detailed constraints and requirements
- Chain of Thought: Incorporates step-by-step reasoning
- Few-Shot: Includes example formats for guidance
- Structured Output: Defines clear output organization
- Role-Based: Adds expert role context

- Tree of Thoughts (ToT): Multi-path reasoning with 74% success rate on complex tasks
- Constitutional AI: Self-critique and alignment with safety principles
- Automatic Prompt Engineer (APE): AI-discovered optimal instruction patterns
- Meta-Prompting: AI generates its own optimized prompts
- Self-Refine: Iterative improvement with 20% performance gains
- TEXTGRAD: Natural language feedback as optimization gradients
- Medprompt: Multi-technique ensemble achieving 90%+ accuracy
- PromptWizard: Feedback-driven self-evolving prompts

Production-ready templates across 11 domains:

- Business Analysis: Competitive analysis frameworks
- Product Management: User research synthesis
- Content Creation: Technical blog posts with SEO optimization
- Development: Comprehensive code review checklists
- Communication: Stakeholder updates and project reports
- Strategy: OKR planning frameworks
- Operations: Standard Operating Procedures (SOPs)
- Legal: Contract termination and compliance
- Customer Experience: Feedback surveys and insights
- Data Analysis: Data insights and reporting
- Meeting Management: Effective meeting agendas

# Clone the repository git clone <repository-url> cd mcp-prompt-optimizer # Create virtual environment (recommended) python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies ./install.sh # Or install manually pip install -r requirements.txt # Configure Claude Desktop python3 setup_interactive.py

Add to your Claude Desktop configuration file:

macOS:~/Library/Application Support/Claude/claude_desktop_config.json

Windows:%APPDATA%\Claude\claude_desktop_config.json

Linux:~/.config/Claude/claude_desktop_config.json

{ "mcpServers": { "prompt-optimizer": { "command": "python3", "args": ["/path/to/mcp-prompt-optimizer/prompt_optimizer.py"], "env": {} } } }
# Analyze prompt quality "Analyze this prompt: write a blog post about AI" # Apply specific optimization "Optimize this prompt using chain_of_thought: explain machine learning" # Auto-select best strategy "Auto-optimize: help me debug this code" # Get domain template "Get domain template for code_review_checklist"
# Use Tree of Thoughts for complex problems "Apply advanced optimization with tree_of_thoughts: design a microservices architecture" # Use Constitutional AI for safety-critical tasks "Apply advanced optimization with constitutional_ai: create content moderation guidelines" # Use Medprompt for high-accuracy classification "Apply advanced optimization with medprompt: categorize customer support tickets" # List available templates "List all domain templates"
mcp-prompt-optimizer/ ├── prompt_optimizer.py # Main MCP server ├── advanced_strategies.py # Research-backed optimization strategies ├── domain_templates.py # Professional domain templates ├── examples.py # Usage examples and demonstrations ├── setup_interactive.py # Automated setup script └── README.md # This file
# Run basic tests ./test.sh # Run usage examples python3 examples.py

- analyze_prompt: Analyzes prompt quality and identifies issues
- optimize_prompt: Applies specific optimization strategies
- auto_optimize: Automatically selects optimal strategy
- get_prompt_template: Returns basic templates
- advanced_optimize: Applies research-backed strategies
- get_domain_template: Returns professional domain templates
- list_domain_templates: Lists available templates by domain
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Update documentation
- Submit a pull request

- New Strategy: Add toadvanced_strategies.py
- New Template: Add todomain_templates.py
- Examples: Add toexamples.py

- Check Python version:python3 --version(requires 3.8+)
- Install dependencies: Run./install.shorpip install -r requirements.txt
- Verify MCP installation:pip show mcp
- Check Claude Desktop logs
- Restart Claude Desktop

- Verify configuration file location
- Check file paths in configuration
- Run setup script again

# Test server directly python3 prompt_optimizer.py # Verbose logging export MCP_LOG_LEVEL=debug python3 prompt_optimizer.py

This project is licensed under the MIT License - see theLICENSEfile for details.

- Research from Princeton, Google DeepMind, Microsoft Research
- Anthropic's Constitutional AI framework
- Stanford's DSPy framework
- OpenAI's prompt engineering guidelines

If you use this tool in your research or projects, please cite:

@software{mcp_prompt_optimizer, title={MCP Prompt Optimizer: Research-Backed Prompt Optimization for AI Systems}, author={Bubobot}, year={2024}, url={https://github.com/Bubobot-Team/mcp-prompt-optimizer} }

For questions, issues, or contributions, please visit ourGitHub repository.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) — purpose-built tools, model routing with fallback, session continuity, and output truncation to save Claude's context and tokens.

Local agent workbench bundling OpenHands, Goose, Aider, and ashlrcode against one local LLM, with ashlr-plugin MCP servers pre-wired.

A collection of MCP servers that provide cognitive enhancement tools for large language models.

Transforms linear AI reasoning into structured, auditable thought graphs, enabling language models to externalize their reasoning process as a directed acyclic graph (DAG).

An open-source desktop application for hosting MCP servers that integrates with function-calling LLMs.

A terminal AI chat interface for any LLM model, with file context, MCP, and deployment support.

Unified MCP server providing access to Claude Code, Codex, and Gemini CLIs through a single gateway. Features multi-LLM orchestration, persistent session management, async job execution with polling, approval gates, retry with circuit breakers, and token optimization. Install: npx -y llm-cli-gateway

a complete and intuitive SDK for building MCP Servers, MCP Agents, and LLM integrations (OpenAI, Claude, Gemini) with minimal effort. It abstracts all the complexity of the MCP protocol, provides an intelligent agent with automatic model routing, and includes a universal client for external APIs all through a single, simple, and powerful interface. Perfect for chatbots, enterprise automation, internal system integrations, and rapid development of MCP-based ecosystems.

A CLI host application that enables Large Language Models (LLMs) to interact with external tools through the Model Context Protocol (MCP).

A TypeScript agent that integrates MCP servers with Ollama, allowing AI models to use various tools through a unified interface.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.