Proposal: Trace Context Extension for Cross-Protocol Audit Chains (A2A ↔ MCP)
- Dominant language
- Shell
- Stars
- 25.7k
- Forks
- 2.6k
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 16
Description
## Summary
Propose a standard A2A extension for W3C Trace Context propagation with explicit cross-protocol bridge semantics for MCP interoperability.
## Problem
A2A agents frequently invoke MCP tools. Both protocols support W3C Trace Context internally:
- **A2A**: `metadata[extension-uri].traceparent` + HTTP headers
- **MCP**: `params._meta.traceparent` (reserved key, draft spec)
But when an A2A agent calls an MCP tool, the trace chain breaks. The MCP call gets a new, disconnected trace ID. Multi-agent debugging becomes impossible.
## Proposed Solution
A standard A2A extension (`https://deeparchi.ai/extensions/trace-context/v1`) that:
1. Embeds W3C `traceparent`/`tracestate`/`baggage` in A2A message `metadata`
2. Defines bidirectional bridge behavior: A2A→MCP, MCP→A2A, multi-hop chaining
3. Adds privacy mode (PP flag) for cross-tenant boundaries
4. Is **zero new protocol** — occupies existing extension points only
## Deliverables
| Artifact | Status | Link |
|----------|:------:|------|
| Specification v0.1 | ✅ | [deeparchi-ai/macs](https://github.com/deeparchi-ai/macs/blob/main/trace-bridge/spec.md) |
| Go reference impl | ✅ | [kuangmi-bit/trace-bridge-go](https://github.com/kuangmi-bit/trace-bridge-go) (19 tests) |
| MCP companion | ✅ | Cross-ref with MCP Audit Record SEP (#3004) |
## Why This Fits A2A Extensions
- **Data metadata enrichment**: adds trace context without modifying core schema
- **Agent Card declaration**: `capabilities.extensions[].uri`
- **Message metadata embedding**: `metadata[extension-uri]`
- **`required: false`**: agents without tracing work unchanged
## Request
Would the A2A project be open to standardizing a trace context extension? Happy to adapt the spec to A2A conventions and contribute a formal extension definition + conformance tests (similar to existing a2a-tck contributions).
Contributor guide
Assessment
This issue has not been assessed yet.