a2a

An Agent-to-Agent (A2A) integration in ContextForge, allowing external AI agents to be registered and exposed as MCP tools. MCP, or Model Context Protocol, is a standard way for AI clients to discover and use tools.

In plain words
What is it for?
Use it to register OpenAI, Anthropic, or custom agents, expose them to MCP clients, manage their lifecycle, configure authentication, and monitor performance.
Why use it?
It provides a shared way for different AI agents and MCP clients to find and call registered agents, even when they use different communication formats.

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/jetwind/mcp-context-forge/a2a
Clone the repo
git clone --depth 1 https://github.com/jetwind/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 100% 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.05100
Opus 5 $0.00000 $0.02550
Sonnet 5 $0.00000 $0.01020
Haiku 4.5 $0.00000 $0.00510

Measured yesterday 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 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.

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

This is a copy

100% identical to a2a — 0 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/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. yesterday 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 jetwind/mcp-context-forge (0 stars, last pushed 19d ago), 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). It is 100% identical to a2a, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens