a2a

A connection layer for Agent-to-Agent, or A2A, communication. It lets you register external AI agents and make them available as tools to other agents and MCP clients.

In plain words
What is it for?
It helps register agents, expose them through MCP tools, configure authentication, manage their lifecycle, and monitor their performance.
Why use it?
It avoids building a separate custom connection for every external agent or client.

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/ibm/mcp-context-forge/a2a
Clone the repo
git clone --depth 1 https://github.com/IBM/mcp-context-forge
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 5,100 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found 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.05100
Opus 5 $0.00000 $0.02550
Sonnet 5 $0.00000 $0.01020
Haiku 4.5 $0.00000 $0.00510

Measured 2d ago against content hash 224af632b5f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

a2a scanned grade B with 2 findings 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 2d ago.

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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

response = requests.post( "http://localhost:4444/a2a/my-agent/jsonrpc",

Makes network callslowCapability

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

curl -X POST "http://localhost:4444/a2a" \
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • a2a — 100% identical, 0 lines differ
docs/docs/using/agents/a2a.md · 614 lines

How it starts

The opening of the file, as written. The whole thing — 614 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A2A (Agent-to-Agent) Integration

ContextForge supports A2A (Agent-to-Agent) integration, allowing you to register external AI agents and expose them as MCP tools for seamless integration with other agents and MCP clients.

Overview

A2A integration enables you to:

  • Register external AI agents (OpenAI, Anthropic, custom agents)
  • Expose agents as MCP tools for universal discovery and access
  • Support multiple protocols (JSONRPC, custom formats)
  • Manage agent lifecycle through admin UI and APIs
  • Monitor performance with comprehensive metrics
  • Configure authentication with various auth methods

Quick Start

!!! tip "Base URL" - Direct installs (uvx, pip, or docker run): http://localhost:4444 - Docker Compose (nginx proxy): http://localhost:8080

1. Enable A2A Features

# In your .env file or environment variables
MCPGATEWAY_A2A_ENABLED=true
MCPGATEWAY_A2A_METRICS_ENABLED=true

2. Register an A2A Agent

Via Admin UI:

  1. Go to http://localhost:4444/admin
  2. Click the "A2A Agents" tab
  3. Fill out the "Add New A2A Agent" form
  4. Click "Add A2A Agent"

Via REST API:

curl -X POST "http://localhost:4444/a2a" \
  -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "hello_world_agent",
    "endpoint_url": "http://localhost:9999/",
    "agent_type": "jsonrpc",
    "description": "External AI agent for hello world functionality",
    "passthrough_headers": ["Authorization", "X-Tenant-Id"],
    "auth_type": "api_key",
    "auth_value": "your-api-key",
    "tags": ["ai", "hello-world"]
  }'

Optional request fields:

Field Description Example
passthrough_headers Header names allowed to pass from the incoming request to this A2A agent. Unset (null) and empty ([]) both block request-header forwarding. TOOL_PRE_INVOKE plugin payloads receive only the non-sensitive subset. ["Authorization", "X-Tenant-Id"]

Read the full file on GitHub · 614 lines

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. 2d ago First seen · 614 lines · 0 tokens per session scan B 224af632b5f8

Subscribe to this mod's changes

a2a is an agent published in the GitHub repository IBM/mcp-context-forge (4,399 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,100 tokens. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.