Agent Update

Connect

AG2 → Agent Update

The community-maintained fork of the original AutoGen, published as the ag2 package.

AG2 talks to Agent Update over MCP. The server is https://api.tryagentupdate.com/v1/mcp, the transport is Streamable HTTP, and the credential is one header.

Setup

# pip install "ag2[mcp]"   AND pin mcp>=1.24,<2
import os
from ag2 import Agent
from ag2.tools.toolkits import MCPToolkit, MCPServerConfig

toolkit = MCPToolkit(MCPServerConfig(
    server_url="https://api.tryagentupdate.com/v1/mcp",
    server_label="agent_update",
    headers={"Authorization": f"Bearer {os.environ['AGENT_UPDATE_TOKEN']}"},
    connection_timeout=30.0,
))
agent = Agent(name="releasebot", tools=[toolkit])

Before you file a bug

The published docs are stale. create_toolkit appears zero times in the shipped 1.0.x package, so ignore any example built around it. If you prefer authorization_token=, it takes the bare token with no prefix: AG2 builds the header for you, so a Bearer-prefixed value doubles the prefix into a 401. An explicit headers["Authorization"] wins over it. The mcp extra declares mcp>=1.11,<2, but streamable_http_client does not exist before SDK 1.24.0, so pin mcp>=1.24,<2 or it fails at import. Do not confuse MCPToolkit with MCPServerTool. The latter hands your URL and token to the model provider to call server-side, so the token leaves your process.

Check it worked

Ask the agent to text you. A 401 means the token is wrong, or the word Bearer is in there twice. No tool at all means the transport string is wrong. Both are covered in troubleshooting.

Next

The five tools and their arguments are on the MCP page. The same tools over plain HTTP are on the REST page. Every other tool is on the docs index.