1. Orthogonal Layers: Horizontal Delegation (A2A) vs Vertical Execution (MCP)
In production agentic systems, A2A v1.0.1 and MCP solve two orthogonal boundaries. MCP wires an LLM host vertically to deterministic tools, resources, and prompts (Agent → Tool) where the caller sees the full JSON Schema. A2A v1.0.1 connects opaque autonomous peer agents horizontally across services or organizations (Agent ↔ Agent) over stateful Task lifecycles without exposing internal prompts, memory, or downstream credentials.
| Layer / Invariant | Model Context Protocol (MCP) |
Agent2Agent Protocol (A2A v1.0.1) |
|---|---|---|
| Topology | Vertical (Host/Agent → Tool/DB/Prompt) | Horizontal (Client Agent ↔ Remote Peer Agent) |
| Primary Unit | Deterministic RPC call (tools/call) | Stateful multi-turn Task & Artifact |
| Discovery | Session initialize → tools/list | HTTPS /.well-known/agent-card.json + jwks.json |
| Wire Bindings | stdio, Streamable HTTP (POST + SSE) | JSONRPC, HTTP+JSON, GRPC, custom URI |
| Internal State | White-box schema; stateless per tool invocation | Opaque black-box planning; 8-state TaskState FSM |
| Cryptographic Pin | RFC 8785 JCS SHA-256 lockfile over tools/list | Detached RFC 7515 EdDSA JWS over JCS AgentCard |
| Desktop Bundle | .mcpb v0.3 ZIP archive (manifest.json) | Signed AgentCard + local .mcpb bridge server |
| Payment Rail | API keys / OAuth 2.1 / tool metadata | x402 v2 (HTTP 402) + Google AP2 CartMandate |
| Key Threat Surface | 5-layer prompt injection & ToolAnnotations rug-pull | Unsigned cards, S4-REJECT-005 smuggling, webhook SSRF |
2. Inside .mcpb Manifest v0.3 Desktop Bundles
An .mcpb archive packages a zero-config local stdio MCP server, icon, and manifest.json (manifest_version: "0.3") for 1-click installation in Claude Desktop, Cursor, and Windsurf. Always anchor script paths with ${__dirname} so spawning from an external working directory never breaks module resolution:
{
"manifest_version": "0.3",
"name": "a2a-registry-bridge-mcp",
"version": "1.0.0",
"display_name": "A2A v1.0.1 <-> MCP Registry Bridge & Ed25519 Signer",
"description": "Bidirectional A2A v1.0.1 AgentCard <-> MCP tools converter and pure-Python RFC 8032 Ed25519 JCS signer.",
"author": { "name": "Khoa Phan", "url": "https://khoaphan.dev" },
"icon": "icon.png",
"server": {
"type": "python",
"entry_point": "server/main.py",
"mcp_config": {
"command": "uv",
"args": ["run", "--directory", "${__dirname}", "python", "-B", "${__dirname}/server/main.py"],
"env": { "PYTHONDONTWRITEBYTECODE": "1" }
}
},
"tools": [
{
"name": "bridge_agent_card_to_mcp_tools",
"description": "Project verified A2A v1.0.1 AgentSkill entries into typed MCP tool schemas."
}
],
"license": "MIT"
}
3. Bidirectional A2A ↔ MCP Bridging with Monotonic Attenuation
Whenever an A2A coordinator delegates work to a specialist agent backed by internal MCP tools, enforce monotonic capability attenuation (A2A-06) at the bridge so no child hop can widen tool permissions, drop allowed_payees constraints, or extend TTLs:
from dataclasses import dataclass
from typing import Any
@dataclass(frozen=True)
class AttenuatedGrant:
tenant_id: str
allowed_tools: frozenset[str]
max_spend_minor_units: int
allowed_payees: frozenset[str]
expires_at: int
def project_a2a_skills_to_mcp_tools(agent_card: dict[str, Any]) -> list[dict[str, Any]]:
if not agent_card.get("supportedInterfaces"):
raise ValueError("CARD-DISC-006: A2A v1.0.1 requires non-empty supportedInterfaces[]")
endpoint = agent_card["supportedInterfaces"][0]["url"]
return [
{
"name": f"a2a_{skill['id'].replace('-', '_')}",
"description": f"[A2A Peer {endpoint}] {skill['description']}",
"inputSchema": {
"type": "object",
"required": ["prompt", "idempotency_key"],
"additionalProperties": False,
"properties": {
"prompt": {"type": "string", "minLength": 1, "maxLength": 16000},
"context_id": {"type": "string"},
"idempotency_key": {"type": "string", "minLength": 8},
},
},
"annotations": {
"title": skill["name"],
"readOnlyHint": False,
"destructiveHint": False,
"idempotentHint": True,
"openWorldHint": True,
},
}
for skill in agent_card.get("skills", [])
]
def attenuate_child_grant(
parent: AttenuatedGrant,
requested_tools: set[str],
requested_cap: int,
requested_payees: set[str],
requested_exp: int,
) -> AttenuatedGrant:
if not requested_tools.issubset(parent.allowed_tools):
raise PermissionError(f"A2A_TOOL_PRIVILEGE_ESCALATION: {sorted(requested_tools - parent.allowed_tools)}")
if not requested_payees or not requested_payees.issubset(parent.allowed_payees):
raise PermissionError("A2A_PAYEE_ALLOWLIST_DROPPED_OR_WIDENED")
if requested_cap < 0 or requested_cap > parent.max_spend_minor_units:
raise PermissionError("A2A_SPEND_CAP_ESCALATION")
if requested_exp > parent.expires_at:
raise PermissionError("A2A_EXPIRY_EXTENSION_FORBIDDEN")
return AttenuatedGrant(
tenant_id=parent.tenant_id,
allowed_tools=frozenset(requested_tools),
max_spend_minor_units=requested_cap,
allowed_payees=frozenset(requested_payees),
expires_at=requested_exp,
)