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:

Layer A2A v1.0.1 (Horizontal Peer-to-Peer Delegation) MCP 2026 (Vertical Host-to-Tool Invocation)
1. Topology & Trust Peer Client Agent <-> Remote Agent across teams, vendors, or VPCs Single reasoning Host/Agent -> Local or Gateway Tool/Resource/Prompt
2. Discovery HTTPS GET /.well-known/agent-card.json + gated GetExtendedAgentCard Session initialize -> tools/list, resources/list, prompts/list
3. Wire Bindings supportedInterfaces[]: JSONRPC, HTTP+JSON (REST), GRPC (host:port) stdio subprocess pipes or Streamable HTTP (POST + SSE / Stateless)
4. State & Lifecycle Explicit 8-state Task FSM (SUBMITTED -> WORKING -> COMPLETED) + contextId & Artifact[] 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 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 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 .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 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) 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) 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:

Wire Surface Legacy A2A v0.3 (Deprecated / Hallucinated) Canonical A2A v1.0.1 (lf.a2a.v1 Normative)
Discovery Path /.well-known/agent.json /.well-known/agent-card.json
Endpoint Declaration Top-level url, protocolVersion, preferredTransport, additionalInterfaces Non-empty supportedInterfaces[]: [{ "url": "...", "protocolBinding": "JSONRPC", "protocolVersion": "1.0" }]
Message RPC Methods "message/send", "message/stream" "SendMessage", "SendStreamingMessage"
Task RPC Methods "tasks/get", "tasks/cancel", "tasks/resubscribe" "GetTask", "ListTasks", "CancelTask", "SubscribeToTask"
Extended Card Gate supportsAuthenticatedExtendedCard + agent/getAuthenticatedExtendedCard capabilities.extendedAgentCard + "GetExtendedAgentCard"
Message role Enum "user", "agent" "ROLE_USER", "ROLE_AGENT"
8-State TaskState Enum "submitted", "working", "input-required", "auth-required", "completed", "canceled", "failed", "rejected" "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", ...} Flat Proto3 oneof (no kind key): {"text": "..."}, {"raw": "..."}, {"url": "...", "mediaType": "..."}, or {"data": {...}}
SecurityScheme Shape OpenAPI-flat {"type": "http", "scheme": "bearer"} + security 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 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:

  1. 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[].
  2. 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:

  1. 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.
  2. 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, and .mcpb v0.3 bundle links
Ch. 1 — A2A vs MCP & .mcpb v0.3 Bridge khoaphan.dev/a2a-wiki/a2a-vs-mcp-bridge Full 10-layer matrix, .mcpb Manifest v0.3 spec, and AttenuatedGrant bridge
Ch. 2 — v0.3 -> v1.0.1 Wire Migration khoaphan.dev/a2a-wiki/v0-3-to-v1-0-migration Dual-card (agent-card.json + agent.json) & dual-method TypeScript ingress adapter
Ch. 3 — AgentCard Ed25519 JWKS & RFC 8785 JCS khoaphan.dev/a2a-wiki/agent-card-jws-rfc8785 UTF-16BE RFC 8785 JCS canonicalizer, RFC 8032 EdDSA signer, and S4-REJECT-005 parser
Ch. 4 — x402 HTTP 402 & Google AP2 Payments khoaphan.dev/a2a-wiki/x402-ap2-agent-payments Base USDC (eip155:8453 EIP-3009) + Stacks sBTC integer minor-unit & 4-tuple WAL guards
Ch. 5 — 11 SDK CVEs & 5-Layer Poisoning Defense khoaphan.dev/a2a-wiki/security-cves-and-iq-benchmark Multi-language lockfile CVE matrix, DNS-pinned webhook SSRF guard, and IQ rubric
Single-File LLM Corpus (@Docs) khoaphan.dev/llms-full.txt Drop into Cursor @Docs, Claude Projects, or Windsurf to stop v0.3 hallucinations
Interactive Browser Lab (IQ 60–160) khoaphan.dev/a2a-iq Client-side WebCrypto Ed25519 JCS validator, .mcpb hub, and 1-prompt LLM benchmark

Companion MIT Open-Source .mcpb v0.3 Servers (Official Anthropic MCP Registry)

.mcpb Package Latest Release Primary Protocol Guardrail
a2a-registry-bridge-mcp v1.0.0 Bidirectional MCP <-> A2A v1.0.1 schema/JSON-RPC bridge, DNS-pinned card inspector & pure-Python RFC 8032 Ed25519 JCS signer
a2a-x402-guard-mcp v1.0.0 Multi-chain CAIP-2 x402 header forensics (Base USDC, Solana, Stacks sBTC), AP2 CartMandate verifier & integer spend caps
a2a-task-orchestrator-mcp v1.0.0 SQLite-WAL optimistic-CAS 8-state A2A Task FSM (0 TOCTOU resurrection), Kahn multi-agent DAG validator & webhook SSRF guard
a2a-iq-mcp v1.1.0 Deterministic 8-dimension A2A v1.0.1 & MCP security benchmark (IQ 60–160) with HMAC-SHA256 challenge sessions
mcp-tool-guard v0.7.0 Full-envelope RFC 8785 JCS tools/list & AgentCard lockfile pinning, 5-layer tool-poisoning scanner & 11-CVE lockfile SCA

Author note: I'm an independent Principal AI-Infrastructure & Protocol Security Engineer (32+ merged upstream OSS PRs across Python, Rust, Go, and TypeScript). We execute fixed-scope, 100% written asynchronous A2A v1.0.1 & MCP architecture and security hardening sprints (Email & GitHub Specs/PRs, zero live meetings) with upfront Code-First PoCs at khoaphan.dev/services.