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://playground.ag2.ai">💡 Playground</a> | <a href="https://github.com/ag2ai/build-with-ag2">💡 Examples</a> | <a href="https://docs.ag2.ai/docs/contributor-guide/contributing/">🤝 Contributing</a> | <a href="#related-papers">📝 Cite paper</a> | <a href="https://discord.gg/pAbnFJrkgZ">💬 Join Discord</a> | <a href="#ag2-classic-the-autogen-namespace">🏛️ AG2 Classic</a> </p>
[!IMPORTANT] Looking forConversableAgent,GroupChat, orimport autogen? That's now AG2 Classic. As of AG2 v1.0, the protocol-driven framework is the top-level package, imported asag2. The classic framework has moved to its own repository — ag2ai/ag2-classic, documented at classic.docs.ag2.ai. It is still maintained and installable; nothing you have built stops working. This repository (pip install ag2) no longer ships theautogenimport name or the classic agent classes.
We have several agent concepts in AG2 to help you build your AI agents. We introduce the most common ones here.
Agent is the core building block — it talks to a model provider, calls tools, and returns a reply.@tool, that the agent can invoke.For a step-by-step walk through of AG2 concepts and code, see the Quick Start 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. Install the extra that matches your model provider — ag2[openai], ag2[anthropic], ag2[gemini], ag2[ollama], and so on.
Each provider config reads its standard environment variable, so keys never need to be hardcoded or checked in:
export OPENAI_API_KEY="<your-api-key>" # or ANTHROPIC_API_KEY, GEMINI_API_KEY, ...
You can also pass a key explicitly with OpenAIConfig(model="gpt-4o-mini", api_key=...) — useful when each request brings its own key.
We maintain both a live playground and a dedicated repository with a wide range of applications to help you get started with various use cases, and a set of runnable code examples in the documentation.
高质量的开源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 类型,复制安装指令后粘贴到对应客户端