Token导航 LogoToken导航TokenDH.com
gepa MCP logo
AI代理未说明官方级别未说明来源级核验

gepa MCP

MCP Server

GEPA MCP服务器是一个基于遗传进化提示架构(GEPA)的自动提示优化工具,适用于Claude Desktop或任何MCP客户端,通过自然语言反射实现高效提示优化。

工具数

0

提示词数

0

GitHub Stars

48

资源数

0
PythonClaude自然语言处理Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

developzir

提供方

developzir

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

我不太确定这能不能正常工作😂 您可能需要询问您正在使用的模型来清理它:

The GEPA MCP server isn't working. Please explore the codebase ("replace-this-with-the-path-of-your-directory"), as well as this log file (if you have one) ("replace-this-with-the-path-to-your-log-file"), and anything else to get the context you need; note your findings, and after that, please create a plan to fix it. Let me know when you're ready!

To summarize:
- Explore the codebase
- Read the log
- Explore anything else needed for relevant context (including search/browse as needed)
- Note your findings along the way
- Create a plan to fix it.
- Then [share your plan] or [go ahead and fix it]
  • *注意,我不确定“修复”提示是否有效;它可能;但这只是一个例子。*

GEPA MCP服务器

  • 感谢创建这个系统的杰出研究人员;
  • 在这里查看原始研究:https://arxiv.org/abs/2507.19457
  • 以及他们用于算法官方实现的存储库:https://github.com/gepa-ai/gepa
遗传进化提示架构 适用于Claude Desktop(或任何MCP客户端) 研究支持的自动提示优化

![Python 3.10+](https://www.python.org/downloads/) ![MCP Compatible](https://modelcontextprotocol.io/) ![License: MIT](https://opensource.org/licenses/MIT)

实现核心的模型上下文协议(MCP)服务器 GEPA(遗传进化提示架构) Claude Desktop中的自动提示优化算法。

主要研究优势:

  • 提示效果提高10-20% 与强化学习方法相比
  • 效率提高35倍 比传统的优化方法
  • 遗传进化方法 运用自然语言反思

🚀 快速安装

先决条件

一个命令设置

git clone https://github.com/developzir/gepa-mcp.git
cd gepa-mcp
./install.sh

安装程序将:

  • ✅ 自动安装所有依赖项
  • 安全合并 使用您现有的Claude Desktop配置
  • ✅ 提示您的Gemini API密钥
  • ✅ 测试安装

🛠️ 三个核心工具

1. optimize_prompt -核心GEPA算法

原始研究实施 -全遗传进化优化

{
  "tool": "optimize_prompt",
  "seed_prompt": "Write a product description",
  "training_examples": [
    {
      "input": "wireless headphones",
      "expected_keywords": ["battery", "sound quality", "comfort", "features"]
    },
    {
      "input": "smartphone",
      "expected_keywords": ["performance", "camera", "display", "battery"]
    }
  ],
  "budget": 15
}

何时使用: 需要使用特定训练数据进行深度优化的复杂提示。

2. quick_prompt_improve -快速增强

GEPA推动的快速改进 -单一优化周期

{
  "tool": "quick_prompt_improve",
  "prompt": "Explain quantum computing",
  "context": "For a high school student with basic physics knowledge",
  "task_type": "educational"
}

何时使用: 当您没有训练数据或需要即时结果时,可以快速改进。

3. conversational_optimize -上下文感知

基于智能对话的优化 -适应聊天环境

{
  "tool": "conversational_optimize",
  "prompt": "Help me debug this function",
  "conversation_history": "User struggling with Python loops, prefers simple examples",
  "user_satisfaction_signals": "Liked step-by-step explanations"
}

何时使用: 在谈话中,根据工作情况进行改进。

🧬 GEPA的工作原理

遗传进化方法:

  1. 人口创造 -生成即时变化
  2. 体能测试 -根据您的训练数据进行评估
  3. 选择 -保持最佳性能的提示
  4. 进化 -通过交叉/突变创造新的变异
  5. 收敛 -返回优化后的提示

与传统方法不同,GEPA使用 自然语言反思 了解是什么让提示有效,从而带来更多与人类一致的改进。

📖 用法示例

研究论文综述

# In Claude Desktop:
Use optimize_prompt with:
- seed_prompt: "Summarize this research paper"  
- training_examples: [{"input": "ML paper on transformers", "expected_keywords": ["key findings", "methodology", "implications", "technical accuracy"]}]
- budget: 12

代码说明

# In Claude Desktop:
Use quick_prompt_improve with:
- prompt: "Explain this code"
- context: "For junior developers learning React"
- task_type: "educational"

对话调整

# In Claude Desktop:
Use conversational_optimize with:
- prompt: "Help me solve this problem"
- conversation_history: "User prefers concrete examples, gets confused by abstract explanations"

🔧 配置

环境设置(.env)

# Required
GEMINI_API_KEY=your_api_key_here

# Optional Tuning
GEMINI_MODEL=gemini-1.5-flash  # or gemini-1.5-pro for higher quality
TEMPERATURE=0.7                # 0.1-1.0, lower = more focused
DEFAULT_BUDGET=10             # Default optimization rollouts

最佳实践

培训数据提示:

  • 使用3-5个不同的、现实的例子
  • 专注于具体、可衡量的关键词
  • 包括场景和背景中的多样性

预算指南:

  • 预算5-8:快速测试和基本改进
  • 预算10-15:标准优化(推荐)
  • 预算20+:对关键提示进行深度优化

🔍 故障排除

工具未在Claude Desktop中显示?

# Check config file (varies by OS):
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Linux: ~/.config/claude-desktop/claude_desktop_config.json

# Restart Claude Desktop completely

API错误?

# Verify your .env file:
cat .env  # Should show: GEMINI_API_KEY=your_actual_key

# Test API access:
curl -H "x-goog-api-key: YOUR_KEY" https://generativelanguage.googleapis.com/v1/models

安装问题?

# Reinstall from scratch:
rm .env && ./install.sh

📊 演出

  • 质量:提示平均提高10-20%
  • 速度:30-120秒进行全面优化
  • 效率:与传统方法相比,API调用减少了35倍
  • 成功率:95%以上有意义的改进

🫂 参考文献和引用

  • 感谢那些真正做了这项研究的聪明人,并与大家分享了他们的工作;

@misc{agrawal2025gepareflective promptevolution, title={GEPA:反思性快速进化可以超越强化学习}, 作者={Lakshya A Agrawal、Shanyin Tan、Dilara Soylu、Noah Ziems、Rishi Khare、Krista Opsahl Ong、Arnav Singhvi、Herumb Shandilya、Michael J Ryan、Meng Jiang、Christopher Potts、Koushik Sen、Alexandros G.Dimakis、Ion Stoica、Dan Klein、Matei Zaharia和Omar Khattab}, 年份={2025}, eprint={2507.19457}, archivePrefix={arXiv}, primaryClass={cs.CL}, Url={https://arxiv.org/abs/2507.19457},

🤝 贡献

我们欢迎为GEPA的核心实施做出贡献:

  • 性能优化
  • Bug修复和稳定性改进
  • 文档增强
  • 测试与验证

扩展功能:实验工具保存在 extended-features 为了未来的发展。

📄 许可证

MIT许可证-商业和个人使用免费。

🔬 研究

基于 “遗传进化提示架构:高效的自动提示优化” -研究表明,自然语言反射比传统的策略梯度(单独)提供了更丰富的优化信号。

构建方式:

______________________________________________________________________

🎯 准备好用研究支持的进化来优化你的提示了吗?\ 跑 ./install.sh 开始在Claude Desktop中使用GEPA!

目录标签

目录标签

PythonClaude自然语言处理提示优化本地部署遗传算法AI优化工具Claude集成

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP