
AutoGen MCP Server

2025.03.31
5
PythonAI 代理管理多代理对话开发效率
AutoGen MCP Server 是一个与微软 AutoGen 框架集成的 MCP 服务器,通过标准化接口实现多代理对话。该服务器允许用户创建和管理 AI 代理,这些代理可以通过自然语言交互进行协作和解决问题。
View on GitHub
Overview
基本能力
产品定位
AutoGen MCP Server 是一个用于创建和管理 AI 代理的服务器,支持多代理对话和协作。
核心功能
- 创建和管理具有可配置设置的 AutoGen 代理
- 执行代理之间的一对一对话
- 协调多个代理的群聊
- 可配置的 LLM 设置和代码执行环境
- 支持助手和用户代理
- 内置错误处理和响应验证
适用场景
- 多代理协作解决问题
- 自然语言交互的 AI 代理管理
- 自动化任务执行和对话管理
工具列表
create_agent
: 创建新的 AI 代理execute_chat
: 执行两个代理之间的对话execute_group_chat
: 执行多个代理之间的群聊
常见问题解答
- Agent Creation Errors: 代理已存在
- Execution Errors: 代理未找到
- Configuration Errors: 环境变量未设置
使用教程
使用依赖
- Python 环境
- Git
安装教程
通过 Smithery 安装
npx -y @smithery/cli install @DynamicEndpoints/autogen_mcp --client claude
手动安装
- 克隆仓库:
git clone https://github.com/yourusername/autogen-mcp.git
cd autogen-mcp
- 安装依赖:
pip install -e .
配置
- 复制环境变量文件:
cp .env.example .env
- 配置环境变量:
AUTOGEN_MCP_CONFIG=config.json
OPENAI_API_KEY=your-openai-api-key
- 复制配置文件:
cp config.json.example config.json
- 配置服务器设置:
{
"llm_config": {
"config_list": [
{
"model": "gpt-4",
"api_key": "your-openai-api-key"
}
],
"temperature": 0
},
"code_execution_config": {
"work_dir": "workspace",
"use_docker": false
}
}
调试方式
- 创建代理:
{
"name": "create_agent",
"arguments": {
"name": "tech_lead",
"type": "assistant",
"system_message": "You are a technical lead with expertise in software architecture and design patterns."
}
}
- 执行一对一对话:
{
"name": "execute_chat",
"arguments": {
"initiator": "agent1",
"responder": "agent2",
"message": "Let's discuss the system architecture."
}
}
- 执行群聊:
{
"name": "execute_group_chat",
"arguments": {
"agents": ["agent1", "agent2", "agent3"],
"message": "Let's review the proposed solution."
}
}