ag2-mcp
Installation
SKILL.md
Serving an AG2 agent as an MCP server
ag2.mcp.MCPServer turns an AG2 Agent into a Model Context
Protocol server: MCP clients (Claude Desktop, Cursor, the MCP Inspector, or
any MCP-speaking app) connect and call your agent as a tool. It can also expose
prompts and resources alongside the agent.
Server side vs. client side — read this first
There are two opposite directions, and this skill is only one of them.
| Direction | You want… | Use |
|---|---|---|
| Server (this skill) | other MCP clients to call your AG2 agent | ag2.mcp.MCPServer |
| Client | your AG2 agent to call an external MCP server's tools | MCPServerTool / MCP toolkits — see ag2-use-builtin-tools |
If the user says "let Claude Desktop talk to my agent", "publish my agent over
MCP", or "host an MCP endpoint" → this skill. If they say "give my agent the
GitHub MCP tools" or "connect to an MCP server" → ag2-use-builtin-tools.