Logo van MCP 提示优化器

MCP 提示优化器

Organisatie
Bubobot-Team

Advanced MCP server providing cutting-edge prompt optimization tools with research-backed strategies

UitgeverBubobot-Team
Repositorymcp-prompt-optimizer
TaalPython
Forks
5
Sterren
25
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    MCP 提示优化器 biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    25 sterren en 5 forks in de gekoppelde repository.

MCP Prompt Optimizer

Python 3.8+ License: MIT MCP Compatible

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

✨ Features

🎯 Basic Optimization Strategies

  • 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

🚀 Advanced Optimization Strategies

  • 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

📋 Professional Domain Templates

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

🛠️ Installation

Quick Setup

bash
# 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

Manual Configuration

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

json
{
  "mcpServers": {
    "prompt-optimizer": {
      "command": "python3",
      "args": ["/path/to/mcp-prompt-optimizer/prompt_optimizer.py"],
      "env": {}
    }
  }
}

🎮 Usage

Basic Commands

plaintext
# 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"

Advanced Commands

plaintext
# 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"

🏗️ Architecture

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

🧪 Testing

bash
# Run basic tests
./test.sh

# Run usage examples
python3 examples.py

📊 Performance Benchmarks

StrategyUse CasePerformance Improvement
Tree of ThoughtsComplex reasoning70-74% success rate
MedpromptClassification tasks90%+ accuracy
Self-RefineIterative improvement20% per iteration
Constitutional AISafety alignmentHigh compliance
Chain of ThoughtStep-by-step tasks15-25% improvement

🔧 Available Tools

Core Tools

  1. analyze_prompt: Analyzes prompt quality and identifies issues
  2. optimize_prompt: Applies specific optimization strategies
  3. auto_optimize: Automatically selects optimal strategy
  4. get_prompt_template: Returns basic templates

Advanced Tools

  1. advanced_optimize: Applies research-backed strategies
  2. get_domain_template: Returns professional domain templates
  3. list_domain_templates: Lists available templates by domain

🎯 Strategy Selection Guide

Prompt TypeRecommended Strategy
Complex problemstree_of_thoughts
Classification tasksmedprompt
Safety-criticalconstitutional_ai
Vague requirementsmeta_prompting
Needs refinementself_refine
General optimizationauto

🤝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Update documentation
  5. Submit a pull request

Adding New Features

  • New Strategy: Add to advanced_strategies.py
  • New Template: Add to domain_templates.py
  • Examples: Add to examples.py

🐛 Troubleshooting

Common Issues

MCP not working?

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

Commands not recognized?

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

Debug Mode

bash
# Test server directly
python3 prompt_optimizer.py

# Verbose logging
export MCP_LOG_LEVEL=debug
python3 prompt_optimizer.py

📄 License

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

🙏 Acknowledgments

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

📈 Citation

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

bibtex
@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}
}

Built with ❤️ for the AI community

For questions, issues, or contributions, please visit our GitHub repository.

Installatie

TypingMind
{
  "mcpServers": {
    "mcp-prompt-optimizer": {
      "command": "python3",
      "args": [
        "/path/to/mcp-prompt-optimizer/prompt_optimizer.py"
      ]
    }
  }
}

Gebruik MCP 提示优化器 MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra MCP 提示优化器 is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg MCP 提示优化器 toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van MCP 提示优化器.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "mcp-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van MCP 提示优化器 in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van MCP 提示优化器 in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP 提示优化器 gebruiken om me hiermee te helpen?
MCP 提示优化器
Zeker. Ik heb het gelezen.
Dit vond ik met MCP 提示优化器.

Veelgestelde vragen

Waarvoor wordt de MCP-server MCP 提示优化器 gebruikt?

MCP 提示优化器 is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik MCP 提示优化器 MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je MCP 提示优化器 gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom MCP 提示优化器 MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als MCP 提示优化器 verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik MCP 提示优化器 MCP met TypingMind?

MCP 提示优化器 werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt MCP 提示优化器 MCP in TypingMind?

MCP 提示优化器 biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om MCP 提示优化器 MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als MCP 提示优化器 authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇