SEP-414: Document OpenTelemetry Trace Context Propagation Conventions

no
Summary: Document OpenTelemetry Trace Context Propagation Conventions

Original Documentation

Documentation Index#

Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt Use this file to discover all available pages before exploring further.

Document OpenTelemetry Trace Context Propagation Conventions

Final Standards Track
FieldValue
SEP414
TitleDocument OpenTelemetry Trace Context Propagation Conventions
StatusFinal
TypeStandards Track
Created2025-04-25
Author(s)Adrian Cole (@codefromthecrypt)
SponsorMarcelo Trylesinski (@Kludex)
PR#414

Abstract#

This SEP documents conventions for OpenTelemetry (OTel) trace context propagation in MCP.

OTel semantic conventions for MCP specify using _meta as the carrier for W3C Trace Context keys. This is already in practice in the C# SDK and other implementations.

This specification documents an exception to the DNS prefixing convention for keys in _meta. This enables interoperability across existing and new implementations and serves as a foundation for related SEPs (such as SEP-2028).

Specification#

This SEP adds documentation to the MCP specification, noting:

  1. When OTel trace context is propagated via _meta, the keys traceparent, tracestate, and baggage follow W3C Trace Context and W3C Baggage value formats.

  2. A non-normative example showing trace context in _meta.

  3. A note clarifying why this an exception to DNS prefixing keys in _meta: to remain compatible with existing implementations and the OpenTelemetry semantic conventions.

See agentclientprotocol/agent-client-protocol#297 for equivalent documentation changes in ACP.

Non-normative example#

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": {
      "location": "New York"
    },
    "_meta": {
      "traceparent": "00-0af7651916cd43dd8448eb211c80319c-00f067aa0ba902b7-01"
    }
  }
}

Rationale#

Why document this?#

This is currently documented elsewhere, but not as an MCP specification. Doing so ensures that SEPs depending on this pattern can complete, as well as other SDKs in and outside the MCP org can as well, such as Logfire and ToolHive.

If we don’t document this shared concern, differing interpretations could materialize, such as namespacing traceparent like io.modelcontextprotocol.traceparent, which will break traces and log correlation.

  • SEP-1788 - reserved keys in _meta; should be updated with traceparent, tracestate, and baggage when this SEP is implemented
  • SEP-2028 - builds on this SEP for forwarding _meta values to HTTP headers

Backward Compatibility#

This SEP documents existing conventions and is backward compatible.

Security Implications#

Trace context in _meta may include correlation IDs. Implementations should follow existing data-handling guidance appropriate to their environment.

Reference Implementation#

Existing implementations using this pattern:

Link last verified June 7, 2026. View original ↗
Source: MCP Docs
Link last verified: 2026-02-26