DEV Community

A2A v1.0.1 vs MCP in 2026: The Definitive Wire-Format, .mcpb v0.3 & x402/AP2 Architecture Wiki

Most multi-agent architecture bugs in late 2026 come from forcing Model Context Protocol (MCP) to behave like an opaque cross-boundary task broker - or forcing Agent2Agent (A2A v1.0.1) onto simple local database and API connectors - while frontier LLMs silently mix deprecated v0.3 JSON-RPC wire tokens into v1.0.1 ProtoJSON payloads.

After shipping open-source security guards, .mcpb desktop extensions, and upstream patches across the A2A and MCP ecosystems, I compiled our field notes into a single bookmarkable reference wiki at khoaphan.dev/a2a-wiki.

Below is the condensed engineering field guide covering the 10-layer A2A v1.0.1 vs MCP 2026 boundary, the v0.3 -> v1.0.1 wire-format cheat sheet, and bidirectional MCP <-> A2A bridging with monotonic scope and x402 / AP2 payment attenuation.

1. The 10-Layer Architecture Matrix (A2A v1.0.1 vs MCP 2026)

Treat A2A v1.0.1 (specification/a2a.proto, package lf.a2a.v1) as your horizontal peer-to-peer delegation boundary and MCP (2025-11-25 + Stateless 2026-07-28) as your vertical host-to-tool execution boundary:

  • 1. Topology & Trust: Peer Client Agent <-> Remote Agent across teams, vendors, or VPCs vs Single reasoning Host/Agent -> Local or Gateway Tool/Resource/Prompt
  • 2. Discovery: HTTPS GET /.well-known/agent-card.json + gated GetExtendedAgentCard vs Session initialize -> tools/list, resources/list, prompts/list
  • 3. Wire Bindings: supportedInterfaces[]: JSONRPC, HTTP+JSON (REST), GRPC (host:port) vs stdio subprocess pipes or Streamable HTTP (POST + SSE / Stateless)
  • 4. State & Lifecycle: Explicit 8-state Task FSM (SUBMITTED -> WORKING -> COMPLETED) + contextId & Artifact[] vs Stateless request/response tools/call (plus optional MRTR input_required & io.modelcontextprotocol/tasks)
  • 5. Opacity Contract: Black-box: Peer exposes AgentSkill[], examples, and MIME modes; hides internal prompts, memory, and DB credentials vs White-box: Server exposes deterministic JSON Schema 2020-12 inputSchema / outputSchema + ToolAnnotations
  • 6. Auth & Signing: Proto3 oneof SecurityScheme + securityRequirements + RFC 8785 JCS / Ed25519 JWS verified via out-of-band /.well-known/jwks.json vs OS user boundary (stdio) or OAuth 2.1 Bearer tokens + Mcp-Session-Id / Mcp-Method header integrity
  • 7. Desktop Packaging: Remote AgentCard endpoint bridged locally via .mcpb gateway vs .mcpb v0.3 single-click ZIP archive (manifest.json, ${__dirname}, OS-keychain user_config)
  • 8. Payments (x402 / AP2): Google AP2 JWS mandates (IntentMandate -> CartMandate -> PaymentMandate) + x402 v2 (HTTP 402) settlement vs Per-tool x402 PAYMENT-REQUIRED / PAYMENT-SIGNATURE headers or metered API keys
  • 9. Delegation Scope: Multi-hop monotonic attenuation (child_scopes <= parent_scopes, integer spend ceilings, allowed_payees) vs Single-hop host tool allowlist + human-in-the-loop confirmation gates
  • 10. Primary Failure Modes: S4-REJECT-005 ProtoJSON/JCS key smuggling, TOCTOU task resurrection, push-webhook SSRF (169.254.169.254) vs 5-layer tool-description poisoning, readOnlyHint rug-pulls, unexpanded ${user_config.*} cold-boot crashes

Architectural Rule of Thumb: Stay on plain MCP + HTTP/queues when a single agent or internal workflow calls deterministic APIs, SQL queries, or local developer tools inside one trust domain.

Compose Outer A2A v1.0.1 + Inner MCP when delegating goals to an external vendor agent, isolating blast radius across multi-tenant sub-agents with separate credentials, or settling per-task machine payments over Base Mainnet USDC (eip155:8453 EIP-3009) or Stacks sBTC under signed AP2 CartMandate caps.

2. The v0.3 -> v1.0.1 Wire-Format Cheat Sheet (What LLMs Hallucinate Most)

Because pre-March-2026 tutorials dominate model training weights, code-generation LLMs routinely output A2A v0.3 fields that fail immediately against strict A2A v1.0.1 ProtoJSON servers and conformance suites (a2a-tck).

Bookmark this diff table before debugging wire rejections:

  • Discovery Path: Legacy /.well-known/agent.json vs Canonical /.well-known/agent-card.json
  • Endpoint Declaration: Top-level url, protocolVersion, preferredTransport, additionalInterfaces vs Non-empty supportedInterfaces[]: [{ "url": "...", "protocolBinding": "JSONRPC", "protocolVersion": "1.0" }]
  • Message RPC Methods: "message/send", "message/stream" vs "SendMessage", "SendStreamingMessage"
  • Task RPC Methods: "tasks/get", "tasks/cancel", "tasks/resubscribe" vs "GetTask", "ListTasks", "CancelTask", "SubscribeToTask"
  • Extended Card Gate: supportsAuthenticatedExtendedCard + agent/getAuthenticatedExtendedCard vs capabilities.extendedAgentCard + "GetExtendedAgentCard"
  • Message role Enum: "user", "agent" vs "ROLE_USER", "ROLE_AGENT"
  • 8-State TaskState Enum: "submitted", "working", "input-required", "auth-required", "completed", "canceled", "failed", "rejected" vs "TASK_STATE_SUBMITTED", "TASK_STATE_WORKING", "TASK_STATE_INPUT_REQUIRED", "TASK_STATE_AUTH_REQUIRED", "TASK_STATE_COMPLETED", "TASK_STATE_CANCELED", "TASK_STATE_FAILED", "TASK_STATE_REJECTED"
  • Part Union Shape: Discriminated {"kind": "text", "text": "..."} / {"kind": "file", ...} vs Flat Proto3 oneof (no kind key): {"text": "..."}, {"raw": "..."}, {"url": "...", "mediaType": "..."}, or {"data": {...}}
  • SecurityScheme Shape: OpenAPI-flat {"type": "http", "scheme": "bearer"} + security vs Proto3 oneof {"httpAuthSecurityScheme": {"scheme": "Bearer"}} + securityRequirements[*].schemes.<id>.list
  • JWS / ProtoJSON Keys (S4-REJECT-005): Custom root keys ("homepage", "license", "x402") or mixed snake_case + camelCase vs Strict lf.a2a.v1.AgentCard root keys only; custom metadata must live inside capabilities.extensions[]

Why S4-REJECT-005 Breaks Cross-SDK AgentCard Signatures: Under ADR-001, a2a-python and @a2a-js/sdk parse incoming AgentCard JSON through Protobuf (ignore_unknown_fields=True) and strip empty [] / {} containers (cleanEmpty()) before computing RFC 8785 JCS bytes for Ed25519 signature verification - whereas a2a-go and raw WebCrypto verifiers canonicalize the served JSON tree directly.

That parser differential creates two production failure modes: Unmodeled top-level key stripping: Placing "homepage", "license", or "x402" at the root of agent-card.json causes signatures generated by raw JCS signers to fail in a2a-python / @a2a-js/sdk (and lets middleboxes inject unauthenticated top-level keys past ProtoJSON verifiers). Move protocol extensions into capabilities.extensions[].

Dual-case & duplicate-key smuggling (S4-REJECT-005): ProtoJSON accepts both defaultInputModes and default_input_modes for the same Proto3 field, while RFC 8785 JCS hashes them as distinct keys.

Always parse untrusted AgentCard payloads with a strict object_pairs_hook before verifying signatures[]:

import json
import re
from typing import Any
ALLOWED_V1_AGENT_CARD_ROOT_KEYS = frozenset ( { "name" , "description" , "supportedInterfaces" , "provider" , "version" , "documentationUrl" , "capabilities" , "securitySchemes" , "securityRequirements" , "defaultInputModes" , "defaultOutputModes" , "skills" , "signatures" , "iconUrl" , } )
def _canonical_camel ( field_name : str ) -> str :
  return re . sub ( r "_([a-zA-Z0-9])" , lambda m : m . group ( 1 ) . upper ( ) , field_name )
def decode_strict_v1_agent_card ( raw_json : str ) -> dict [ str , Any ] :
  """Reject duplicate JSON keys, snake/camel twins (S4-REJECT-005), and unmodeled root keys."""
  def _pairs_guard ( pairs : list [ tuple [ str , Any ] ] ) -> dict [ str , Any ] :
    obj : dict [ str , Any ] = { }
    seen_camel : dict [ str , str ] = { }
    for key , val in pairs :
      if key in obj :
        raise ValueError ( f "S4-REJECT-005 duplicate JSON key: {key!r}" )
      camel = _canonical_camel ( key )
      if camel in seen_camel :
        raise ValueError ( f "S4-REJECT-005 dual-case collision: {key!r} vs {seen_camel[camel]!r}" )
      seen_camel [ camel ] = key
      obj [ key ] = val
    return obj
  card = json . loads ( raw_json , object_pairs_hook = _pairs_guard )
  if not isinstance ( card , dict ) :
    raise ValueError ( "AgentCard payload must be a JSON object" )
  unmodeled = sorted ( set ( card . keys ( ) ) - ALLOWED_V1_AGENT_CARD_ROOT_KEYS )
  if unmodeled :
    raise ValueError ( f "ProtoJSON JCS drift hazard: move {unmodeled} into capabilities.extensions[]" )
  if not card . get ( "supportedInterfaces" ) :
    raise ValueError ( "A2A v1.0.1 requires non-empty supportedInterfaces[]" )
  return card

3. Bridging MCP <-> A2A Bidirectionally + 1-Click .mcpb v0.3 Stack

Desktop IDE hosts (Claude Desktop, Cursor, Windsurf, VS Code) speak MCP natively, whereas remote autonomous peers publish A2A v1.0.1 AgentCard endpoints.

Bridging the two cleanly requires two deterministic invariants:

Deterministic MCP Tool[] <-> A2A AgentSkill[] Projection: Expose verified remote AgentSkill entries to local MCP hosts as typed, idempotent tools (openWorldHint: true), and project internal MCP tool catalogs outward as coarse-grained A2A skills without leaking internal database schemas.

Monotonic Multi-Hop Scope & Payment Attenuation (child_scopes <= parent_scopes): When an A2A orchestrator delegates a task to a worker agent backed by MCP tools or x402 wallets, strip ambient Authorization / Cookie headers and fail closed if the child hop attempts to widen OAuth scopes, exceed integer minor-unit spend caps, extend expires_at, or drop allowed_payees:

from dataclasses import dataclass
import re
from typing import Any
@dataclass ( frozen = True )
class DelegationEnvelope :
  tenant_id : str
  scopes : frozenset [ str ]
  max_spend_minor_units : int # Strict integer atomic units (e.g., 6-dec Base USDC)
  allowed_payees : frozenset [ str ]
  expires_at_epoch : int
def mcp_tool_to_a2a_skill ( tool : dict [ str , Any ] ) -> dict [ str , Any ] :
  """Project an MCP Tool schema into an A2A v1.0.1 AgentSkill descriptor."""
  raw_name = str ( tool [ "name" ] ) . strip ( )
  annotations = tool . get ( "annotations" ) or { }
  return { "id" : raw_name . replace ( "_" , "-" ) , "name" : str ( annotations . get ( "title" ) or raw_name ) , "description" : str ( tool . get ( "description" ) or "" ) , "tags" : [ "mcp-bridged" , "read-only" if annotations . get ( "readOnlyHint" ) else "mutating" ] , "inputModes" : [ "application/json" , "text/plain" ] , "outputModes" : [ "application/json" ] , }
def a2a_skill_to_mcp_tool ( skill : dict [ str , Any ] , peer_url : str ) -> dict [ str , Any ] :
  """Project a verified A2A v1.0.1 AgentSkill into an MCP tools/list definition."""
  skill_id = re . sub ( r "[^a-zA-Z0-9_]" , "_" , str ( skill [ "id" ] ) )
  return { "name" : f "a2a_delegate_{skill_id}" , "description" : f "[A2A v1.0.1 -> {peer_url}] {skill.get('description', '')}" . strip ( ) , "inputSchema" : { "type" : "object" , "required" : [ "instruction" , "idempotency_key" ] , "additionalProperties" : False , "properties" : { "instruction" : { "type" : "string" , "minLength" : 1 , "maxLength" : 16000 } , "context_id" : { "type" : "string" } , "idempotency_key" : { "type" : "string" , "minLength" : 12 } , } , } , "annotations" : { "title" : str ( skill . get ( "name" ) or skill_id ) , "readOnlyHint" : False , "destructiveHint" : False , "idempotentHint" : True , "openWorldHint" : True , } , }
def attenuate_hop ( parent : DelegationEnvelope , * , child_scopes : set [ str ] , child_spend_minor : int , child_payees : set [ str ] , child_expires_at : int , ) -> DelegationEnvelope :
  """Enforce monotonic child <= parent narrowing across A2A <-> MCP hops."""
  if isinstance ( child_spend_minor , bool ) or not isinstance ( child_spend_minor , int ) :
    raise TypeError ( "Spend ceiling must use exact integer minor units (zero floats)" )
  if not child_scopes . issubset ( parent . scopes ) :
    raise PermissionError ( f "Scope escalation blocked: {sorted(child_scopes - parent.scopes)}" )
  if child_spend_minor < 0 or child_spend_minor > parent . max_spend_minor_units :
    raise PermissionError ( "Spend cap escalation blocked" )
  if not child_payees or not child_payees . issubset ( parent . allowed_payees ) :
    raise PermissionError ( "Payee allowlist widening or omission blocked" )
  if child_expires_at > parent . expires_at_epoch :
    raise PermissionError ( "TTL extension blocked" )
  return DelegationEnvelope ( tenant_id = parent . tenant_id , scopes = frozenset ( child_scopes ) , max_spend_minor_units = child_spend_minor , allowed_payees = frozenset ( child_payees ) , expires_at_epoch = child_expires_at , )

Packaging the Bridge as a CWD-Safe .mcpb v0.3 Desktop Bundle: When distributing local stdio bridges as .mcpb (manifest_version: "0.3") archives, always anchor entrypoints with ${__dirname} (desktop hosts frequently spawn processes from / or C:\Windows\System32), suppress .pyc writes, and collect credentials lazily via OS-keychain user_config (sensitive: true) so headless initialize -> tools/list discovery succeeds with zero env vars:

{ "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" : "Zero-dep A2A v1.0.1 <-> MCP schema/RPC bridge and RFC 8032 Ed25519 JCS verifier." , "author" : { "name" : "Khoa Phan" , "url" : "https://khoaphan.dev" } , "server" : { "type" : "python" , "entry_point" : "a2a_bridge_launcher.py" , "mcp_config" : { "command" : "python" , "args" : [ "-B" , "${__dirname}/a2a_bridge_launcher.py" ] , "env" : { "PYTHONDONTWRITEBYTECODE" : "1" } } } , "license" : "MIT" }

4. Open Reference Directory: All 6 A2A Wiki Chapters, llms-full.txt & Zero-Dep .mcpb Suite

Everything in this guide is backed by copy-pasteable reference implementations, test vectors, and zero-dependency (dependencies = [], MIT) Python 3.10+ .mcpb bundles:

Live A2A v1.0.1 & MCP Engineering Wiki (0 Paywalls, 0 Trackers) Chapter / Resource Canonical URL What You Can Copy-Paste Straight Into Production Wiki Hub & Architecture Map khoaphan.dev/a2a-wiki End-to-end protocol topology, FAQ index,

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.