claude-code-traceparent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-code-traceparentecho 'testing trace propagation'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-code-traceparent PoC
Claude Code が MCP Server へのリクエストに W3C Trace Context を付与するのか検証
セットアップ
bun installRelated MCP server: Echo MCP Server
起動
bun run src/server.ts # http(デフォルト)環境変数 | デフォルト | 説明 |
|
|
|
|
| HTTP モードの待受ポート |
|
| 受信内容を追記するログファイル |
echo ツール
引数: message: string
処理: message をエコーバック。_meta / HTTP ヘッダーを解析して traceparent を抽出しデバッグログに残す
確認手順
1. MCP Server の起動
bun run src/server.ts2. Grafana の起動
OpenTelemetry のトレースを可視化するために Grafana を起動する。
docker run -p 3000:3000 -p 4317:4317 -p 4318:4318 --name lgtm grafana/otel-lgtm3. Claude Code を起動
claude# Claude Code 内で確認
> /mcp
> use the echo tool with message "hello"補足:以下のファイルで OpenTelemetry の有効設定と MCP の登録を行っている
.claude/settings.json — MCP 登録の有無や traceparent の伝播設定
.mcp.json — MCP サーバの登録内容
4. 結果の見方
ツール実行後、debug.log / Claude Code のセッション履歴 / Claude Code OTel Traces の突合を確認する
debug.log から trace_id を確認
grafana の Web UI から trace_id で Log や Trace を検索する
grep で Claude Code のセッション履歴ファイルを特定する
trace_id=<YOUR_TRACE_ID>
grep -r $trace_id ~/.claude5. CLI 単体での疎通確認
サーバ単体の動作だけ確かめたい場合:
# stdio
TP="00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
printf '%s\n%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"cli","version":"0"}}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"echo","arguments":{"message":"hi"},"_meta":{"traceparent":"'"$TP"'"}}}' \
| TRANSPORT=stdio bun run src/server.ts
# HTTP(サーバ起動後)
curl -s -X POST http://localhost:3456/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"echo","arguments":{"message":"hi"},"_meta":{"traceparent":"'"$TP"'"}}}'This server cannot be deployed
Maintenance
Related MCP Connectors
Experimental MCP server for current empirical verification of explicit public HTTPS endpoint claims.
Cloud hosted Okahu MCP server that helps you manage genAI trace data
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Cloudflare Workers MCP server: agent-trace-auditor
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA stateless Model Context Protocol server that implements a simple echo functionality with resource, tool, and prompt components, enabling LLMs to echo back messages through standardized MCP interactions.1-
- FlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.1-
- FlicenseNot gradedqualityDmaintenanceMCP server scaffold that exposes stubbed tools for listing, searching, and summarizing sources, with built-in OAuth 2.1 authorization flow for Claude integration.-
- AlicenseNot gradedqualityDmaintenanceLocal MCP server for decision trace capture and deterministic explanations, providing tools to start, track, and query decision traces, and resources to retrieve trace data.13MIT