a2a

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

An MCP Gateway integration for connecting external AI agents to other agents as discoverable tools. A gateway is a service that manages access between systems.

In plain words
What is it for?
It is for registering agents, exposing them through MCP, choosing communication and authentication settings, and monitoring performance.
Why use it?
It removes the need to connect each agent directly to every client and provides configuration and monitoring for those connections.

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/a2a
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 a2a

README.md
[![agentmods](https://agentmods.dev/badge/agents/jrmatherly/mcp-context-forge/a2a.svg)](https://agentmods.dev/agents/jrmatherly/mcp-context-forge/a2a)
Your own site
<a href="https://agentmods.dev/agents/jrmatherly/mcp-context-forge/a2a"><img src="https://agentmods.dev/badge/agents/jrmatherly/mcp-context-forge/a2a.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 2,640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 97% 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.02640
Opus 5 $0.00000 $0.01320
Sonnet 5 $0.00000 $0.00528
Haiku 4.5 $0.00000 $0.00264

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

Security

Grade A, and why

a2a 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.

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

This is a copy

97% identical to a2a — 8 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 · 337 lines

How it starts

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

A2A (Agent-to-Agent) Integration

The MCP Gateway 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",
    "auth_type": "api_key",
    "auth_value": "your-api-key",
    "tags": ["ai", "hello-world"]
  }'

3. Test the Agent

Via Admin UI:

  • Click the blue "Test" button next to your agent
  • See real-time test results

Via API:

curl -X POST "http://localhost:4444/a2a/hello_world_agent/invoke" \
  -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "parameters": {
      "method": "message/send",
      "params": {
        "message": {
          "messageId": "test-123",
          "role": "user",
          "parts": [{"type": "text", "text": "Hello!"}]
        }
      }
    },
    "interaction_type": "test"
  }'

Read the full file on GitHub · 337 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 · 337 lines · 0 tokens per session scan A 7540c0134a6b

Subscribe to this mod's changes

a2a 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 2,640 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 97% identical to a2a, differing in 8 lines, and is treated as a copy.