fastmcp_otel_middleware
Verified Safeby codeactual
Overview
Integrate OpenTelemetry tracing into FastMCP servers to propagate client trace context and generate server-side spans for tool invocations.
Installation
No command providedEnvironment Variables
- FASTMCP_OTEL_MIDDLEWARE_DEBUG_LOG
Security Notes
The middleware primarily focuses on OpenTelemetry instrumentation and context propagation. It reads tracing headers from the `_meta` field and attaches attributes to spans. No direct code execution from user input or hardcoded secrets were identified. Debug logging can expose trace IDs/span IDs if enabled in a production environment, but this is a debug feature. Overall, it appears very safe as a library.
Similar Servers
fastapi_mcp
Automatically converts FastAPI endpoints into Model Context Protocol (MCP) tools for seamless integration with LLM agents.
mcpcat-python-sdk
Analytics platform for MCP server owners to capture user intentions, behavior patterns, and forward telemetry to observability platforms.
shinzo-py
Provides OpenTelemetry-compatible instrumentation and observability for Python MCP servers, offering insights into agent usage patterns, contextualized tool calls, and performance analysis.
k8s-observability-mcp
Provides an MCP server to explore and analyze Kubernetes metrics, logs, traces, and service graph data for observability and debugging.