SEP-414: Document OpenTelemetry Trace Context Propagation Conventions - Model Context Protocol
https://modelcontextprotocol.org/seps/414-request-meta • 322 KB fetched Open original page
SEP-414: Document OpenTelemetry Trace Context Propagation Conventions - Model Context Protocol
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Skip to main content
Model Context Protocol home page
Search...
⌘ K Ask Assistant ⌘ I
* Blog
* GitHub
Search...
Navigation
Final
SEP-414: Document OpenTelemetry Trace Context Propagation Conventions
Documentation
Specification
Extensions
Registry
SEPs
Community
* SEP Index
Final
* SEP-414: Document OpenTelemetry Trace Context Pr…
* SEP-932: Model Context Protocol Governance
* SEP-973: Expose additional metadata for Implemen…
* SEP-985: Align OAuth 2.0 Protected Resource Meta…
* SEP-986: Specify Format for Tool Names
* SEP-990: Enable enterprise IdP policy controls d…
* SEP-991: Enable URL-based Client Registration us…
* SEP-994: Shared Communication Practices/Guidelin…
* SEP-1024: MCP Client Security Requirements for Lo…
* SEP-1034: Support default values for all primitiv…
* SEP-1036: URL Mode Elicitation for secure out-of-…
* SEP-1046: Support OAuth client credentials flow i…
* SEP-1302: Formalize Working Groups and Interest G…
* SEP-1303: Input Validation Errors as Tool Executi…
* SEP-1319: Decouple Request Payload from RPC Metho…
* SEP-1330: Elicitation Enum Schema Improvements an…
* SEP-1577: Sampling With Tools
* SEP-1613: Establish JSON Schema 2020-12 as Defaul…
* SEP-1686: Tasks
* SEP-1699: Support SSE polling via server-side dis…
* SEP-1730: SDKs Tiering System
* SEP-1850: PR-Based SEP Workflow
* SEP-1865: MCP Apps - Interactive User Interfaces…
* SEP-2085: Governance Succession and Amendment Pro…
* SEP-2106: Tools `inputSchema` & `outputSchema` Co…
* SEP-2133: Extensions
* SEP-2148: MCP Contributor Ladder
* SEP-2149: MCP Group Governance and Charter Templa…
* SEP-2164: Standardize Resource Not Found Error Co…
* SEP-2207: OIDC-Flavored Refresh Token Guidance
* SEP-2243: HTTP Header Standardization for Streama…
* SEP-2260: Require Server requests to be associate…
* SEP-2322: Multi Round-Trip Requests
* SEP-2468: Recommend Issuer (iss) Parameter in MCP…
* SEP-2484: Require Conformance Tests for Standards…
* SEP-2549: TTL for List Results
* SEP-2567: Sessionless MCP via Explicit State Hand…
* SEP-2575: Make MCP Stateless
* SEP-2577: Deprecate Roots, Sampling, and Logging
* SEP-2596: Specification Feature Lifecycle and Dep…
* SEP-2663: Tasks Extension
On this page
* Abstract
* Specification
* Non-normative example
* Rationale
* Why document this?
* Related SEPs
* Backward Compatibility
* Security Implications
* Reference Implementation
Final
SEP-414: Document OpenTelemetry Trace Context Propagation Conventions
Copy page Copy page
Document OpenTelemetry Trace Context Propagation Conventions
Copy page Copy page
Final Standards Track
This SEP has reached Final status and is preserved as a historical record of
the design as accepted. Changes made to the protocol after finalization are
not reflected here. Refer to the current
specification and its changelog for authoritative
requirements.
Field Value
SEP 414
Title Document OpenTelemetry Trace Context Propagation Conventions
Status Final
Type Standards Track
Created 2025-04-25
Author(s) Adrian Cole ( @codefromthecrypt )
Sponsor Marcelo 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:
*
When OTel trace context is propagated via _meta , the keys traceparent , tracestate , and
baggage follow W3C Trace Context and
W3C Baggage value formats.
*
A non-normative example showing trace context in _meta .
*
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.
Related SEPs
* 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:
* C# SDK instrumentation
* Python SDK instrumentation
* OpenInference MCP instrumentation (Python)
* OpenInference MCP instrumentation (TypeScript)
* Envoy AI Gateway
* Logfire
* ToolHive
Was this page helpful?
Yes No
SEP Index
SEP-932: Model Context Protocol Governance
github
Assistant
Responses are generated using AI and may contain mistakes.
Links found on this page
- /llms.txt [direct]
- Skip to main content [direct]
- Model Context Protocol home page [direct]
- Blog [direct]
- GitHub [direct]
- Documentation [direct]
- Specification [direct]
- Extensions [direct]
- Registry [direct]
- SEPs [direct]
- Community [direct]
- SEP-932: Model Context Protocol Governance [direct]
- SEP-973: Expose additional metadata for Implemen… [direct]
- SEP-985: Align OAuth 2.0 Protected Resource Meta… [direct]
- SEP-986: Specify Format for Tool Names [direct]
- SEP-990: Enable enterprise IdP policy controls d… [direct]
- SEP-991: Enable URL-based Client Registration us… [direct]
- SEP-994: Shared Communication Practices/Guidelin… [direct]
- SEP-1024: MCP Client Security Requirements for Lo… [direct]
- SEP-1034: Support default values for all primitiv… [direct]
- SEP-1036: URL Mode Elicitation for secure out-of-… [direct]
- SEP-1046: Support OAuth client credentials flow i… [direct]
- SEP-1302: Formalize Working Groups and Interest G… [direct]
- SEP-1303: Input Validation Errors as Tool Executi… [direct]
- SEP-1319: Decouple Request Payload from RPC Metho… [direct]
- SEP-1330: Elicitation Enum Schema Improvements an… [direct]
- SEP-1577: Sampling With Tools [direct]
- SEP-1613: Establish JSON Schema 2020-12 as Defaul… [direct]
- SEP-1686: Tasks [direct]
- SEP-1699: Support SSE polling via server-side dis… [direct]
- SEP-1730: SDKs Tiering System [direct]
- SEP-1850: PR-Based SEP Workflow [direct]
- SEP-1865: MCP Apps - Interactive User Interfaces… [direct]
- SEP-2085: Governance Succession and Amendment Pro… [direct]
- SEP-2106: Tools `inputSchema` & `outputSchema` Co… [direct]
- SEP-2133: Extensions [direct]
- SEP-2148: MCP Contributor Ladder [direct]
- SEP-2149: MCP Group Governance and Charter Templa… [direct]
- SEP-2164: Standardize Resource Not Found Error Co… [direct]
- SEP-2207: OIDC-Flavored Refresh Token Guidance [direct]
- SEP-2243: HTTP Header Standardization for Streama… [direct]
- SEP-2260: Require Server requests to be associate… [direct]
- SEP-2322: Multi Round-Trip Requests [direct]
- SEP-2468: Recommend Issuer (iss) Parameter in MCP… [direct]
- SEP-2484: Require Conformance Tests for Standards… [direct]
- SEP-2549: TTL for List Results [direct]
- SEP-2567: Sessionless MCP via Explicit State Hand… [direct]
- SEP-2575: Make MCP Stateless [direct]
- SEP-2577: Deprecate Roots, Sampling, and Logging [direct]
- SEP-2596: Specification Feature Lifecycle and Dep… [direct]
- SEP-2663: Tasks Extension [direct]
- current
specification [direct]
- @codefromthecrypt [direct]
- @Kludex [direct]
- #414 [direct]
- OTel semantic conventions for MCP [direct]
- SEP-2028 [direct]
- W3C Trace Context [direct]
- W3C Baggage [direct]
- agentclientprotocol/agent-client-protocol#297 [direct]
- Logfire [direct]
- ToolHive [direct]
- SEP-1788 [direct]
- C# SDK instrumentation [direct]
- Python SDK instrumentation [direct]
- OpenInference MCP instrumentation (Python) [direct]
- OpenInference MCP instrumentation (TypeScript) [direct]
- Envoy AI Gateway [direct]
|
|