autogen

autogen is an agent for coding agents from jrmatherly/mcp-context-forge. It costs 0 tokens per session (335 once invoked), scanned A, a copy of autogen, Apache-2.0.

An integration guide for using MCP tools with AutoGen, Microsoft's framework for building groups of AI agents.

In plain words
What is it for?
It is for connecting AutoGen agents to MCP tools and coordinating those calls in Python workflows.
Why use it?
It shows how AutoGen agents can call tools through an MCP Gateway using HTTP or a subprocess bridge.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/jrmatherly/mcp-context-forge/autogen
Clone the repo
git clone --depth 1 https://github.com/jrmatherly/mcp-context-forge

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for autogen

README.md
[![agentmods](https://agentmods.dev/badge/agents/jrmatherly/mcp-context-forge/autogen.svg)](https://agentmods.dev/agents/jrmatherly/mcp-context-forge/autogen)
Your own site
<a href="https://agentmods.dev/agents/jrmatherly/mcp-context-forge/autogen"><img src="https://agentmods.dev/badge/agents/jrmatherly/mcp-context-forge/autogen.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 335 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00335
Opus 5 $0.00000 $0.00168
Sonnet 5 $0.00000 $0.00067
Haiku 4.5 $0.00000 $0.00034

Measured yesterday against content hash f9445c02b621, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

autogen scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

r = requests.post(f"{GATEWAY}/rpc", json=payload, headers=headers, timeout=30)
Origin

This is a copy

86% identical to autogen — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

docs/docs/using/agents/autogen.md · 45 lines

What it actually says

AutoGen Integration with MCP Gateway

AutoGen is an open-source framework from Microsoft for building multi-agent systems. It supports tool calling and dynamic agent coordination.


🔧 MCP Support

Experimental support for MCP integration is available via custom ToolAgent wrappers that call MCP tools via HTTP or mcpgateway-wrapper.

Minimal example using HTTP JSON-RPC with requests:

import os
import requests

GATEWAY = os.getenv("GATEWAY", "http://localhost:4444")
TOKEN = os.getenv("MCPGATEWAY_BEARER_TOKEN")

def call_tool(name: str, arguments: dict):
    payload = {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/call",
        "params": {"name": name, "arguments": arguments},
    }
    headers = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}
    r = requests.post(f"{GATEWAY}/rpc", json=payload, headers=headers, timeout=30)
    r.raise_for_status()
    return r.json()

# Example usage inside an AutoGen tool wrapper
result = call_tool("get_system_time", {"timezone": "Europe/Dublin"})
print(result)

For stdio-based integration, launch mcpgateway-wrapper and connect AutoGen via a subprocess bridge.


🔗 Resources

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 45 lines · 0 tokens per session scan A f9445c02b621

Subscribe to this mod's changes

autogen is an agent published in the GitHub repository jrmatherly/mcp-context-forge (0 stars, last pushed 6mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 335 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 86% identical to autogen, differing in 2 lines, and is treated as a copy.