AG2开源MCP 是 AI Skill Hub 本期精选MCP工具之一。已获得 4.6k 颗 GitHub Star,综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
AG2开源MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
AG2开源MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/ag2ai/ag2
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"ag2--mcp": {
"command": "npx",
"args": ["-y", "ag2"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 AG2开源MCP 执行以下任务... Claude: [自动调用 AG2开源MCP MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"ag2__mcp": {
"command": "npx",
"args": ["-y", "ag2"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<a name="readme-top"></a>
<p align="center"> <img src="https://raw.githubusercontent.com/ag2ai/ag2/27b37494a6f72b1f8050f6bd7be9a7ff232cf749/website/static/img/ag2.svg" width="150" title="hover text">
<br> <br>
<a href="https://www.pepy.tech/projects/ag2"> <img src="https://static.pepy.tech/personalized-badge/ag2?period=month&units=international_system&left_color=grey&right_color=green&left_text=downloads/month" alt="Downloads"/> </a>
<a href="https://pypi.org/project/ag2/"> <img src="https://img.shields.io/pypi/v/ag2?label=PyPI&color=green"> </a>
<img src="https://img.shields.io/pypi/pyversions/ag2.svg?label=">
<a href="https://github.com/ag2ai/ag2/actions/workflows/python-package.yml"> <img src="https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg"> </a> <a href="https://discord.gg/pAbnFJrkgZ"> <img src="https://img.shields.io/discord/1153072414184452236?logo=discord&style=flat"> </a>
<br>
<a href="https://x.com/ag2oss"> <img src="https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai"> </a> </p>
<p align="center"> <a href="https://docs.ag2.ai/">📚 Documentation</a> | <a href="https://github.com/ag2ai/build-with-ag2">💡 Examples</a> | <a href="https://docs.ag2.ai/latest/docs/contributor-guide/contributing">🤝 Contributing</a> | <a href="#related-papers">📝 Cite paper</a> | <a href="https://discord.gg/pAbnFJrkgZ">💬 Join Discord</a> </p>
<p align="center"> AG2 was evolved from AutoGen. Fully open-sourced. We invite collaborators from all organizations to contribute. </p>
[!IMPORTANT] AG2 is on the path to v1.0. The protocol-driven framework is now the top-level package, imported asag2. The classic framework (ConversableAgent,GroupChat, …) has been removed, and the import nameautogenis no longer available — useimport ag2. Read the full release roadmap →
We have several agent concepts in AG2 to help you build your AI agents. We introduce the most common ones here.
For a step-by-step walk through of AG2 concepts and code, see Basic Concepts in our documentation.
AG2 requires Python version >= 3.10. AG2 is available as ag2 on PyPI.
Windows/Linux:
pip install ag2[openai]
Mac:
pip install 'ag2[openai]'
Minimal dependencies are installed by default. You can install extra options based on the features you need.
To keep your LLM dependencies neat and avoid accidentally checking in code with your API key, we recommend storing your keys in a configuration file.
In our examples, we use a file named OAI_CONFIG_LIST to store API keys. You can choose any filename, but make sure to add it to .gitignore so it will not be committed to source control.
You can use the following content as a template:
[
{
"model": "gpt-5",
"api_key": "<your OpenAI API key here>"
}
]
We maintain a dedicated repository with a wide range of applications to help you get started with various use cases or check out our collection of jupyter notebooks as a starting point.
logging.basicConfig(level=logging.INFO) logger = logging.getLogger(name)
llm_config = LLMConfig.from_json(path="OAI_CONFIG_LIST")
高质量的开源MCP工具,具有广泛的应用前景
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,AG2开源MCP 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | ag2 |
| 原始描述 | 开源MCP工具:AG2 (formerly AutoGen): The Open-Source AgentOS.Join us at: https://discord.gg/s。⭐4.6k · Python |
| Topics | mcpa2aag2agent-frameworkagenticagentic-aipython |
| GitHub | https://github.com/ag2ai/ag2 |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-05-28 · 更新时间:2026-05-30 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端