openinference-instrumentation-mcp
OpenInference MCP Instrumentation
What it is and what it does
This package adds OpenTelemetry instrumentation to the MCP Python SDK, enabling distributed tracing by propagating trace context from the caller into MCP tool executions. It integrates with the OpenInference framework and observability platforms like Arize Phoenix and Arize AX. Currently, it focuses on context propagation rather than generating new telemetry data itself—the primary use case is connecting existing spans across MCP boundaries so that tool calls and their execution can be viewed as part of a single trace.
The package depends on openinference-instrumentation, opentelemetry-api, opentelemetry-instrumentation, and wrapt. It is marked as Production/Stable and actively maintained, with support for modern Python versions.
Use it for:
- Connect traces from an LLM application into MCP tool executions for end-to-end observability.
- Debug MCP tool call latency and failures by viewing them in the context of the parent request trace.
- Correlate MCP tool behavior with upstream application logic in a distributed tracing platform.
- Monitor MCP tool call patterns and performance metrics through OpenTelemetry-compatible backends.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Auto-instruments MCP tool calls to propagate OpenTelemetry context between the caller and the tool execution, enabling distributed tracing across MCP interactions.
Yes, if you are already using MCP with Python and need distributed tracing or observability. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe addition. Install it only if you have an OpenTelemetry collector or observability platform in place to consume the context propagation it enables.
Install
openinference-instrumentation-mcp on PyPI
pip
pip install openinference-instrumentation-mcpuv
uv add openinference-instrumentation-mcppoetry
poetry add openinference-instrumentation-mcpInstalling openinference-instrumentation-mcp
Before you install
Low friction installation with a pure-Python wheel. Actively maintained as of 2026-08-14 with recent release history; no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install openinference-instrumentation-mcp
from openinference.instrumentation.mcp import MCP_INSTRUMENTATION
from opentelemetry import trace
# Instrumentation enables context propagation for MCP tool calls
MCP_INSTRUMENTATION.instrument()
Requires Python 3.10 or later (supports up to 3.14); OpenTelemetry API and instrumentation packages must be installed.
Verify before relying
- Whether context propagation works with all MCP SDK versions or has version constraints beyond the package metadata.
- Performance overhead of instrumentation in high-throughput MCP tool call scenarios.
- Compatibility with non-OpenTelemetry tracing backends or observability platforms.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — openinference-instrumentation, opentelemetry-api, opentelemetry-instrumentation, wrapt |
| Maintenance | actively maintained — 13 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 192,976/month — #9,854 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openinference_instrumentation_mcp-2.0.5-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
openinference-instrumentation-claude-agent-sdkAuto-instruments Claude Agent SDK calls to emit…
permissive · top 15,000 on PyPI
openinference-instrumentationProvides utility functions to convert typed…
permissive · top 5,000 on PyPI
openinference-instrumentation-google-adkAuto-instruments Google ADK applications to…
permissive · top 15,000 on PyPI
openinference-instrumentation-dspyAuto-instruments DSPy applications to generate…
permissive · top 15,000 on PyPI
openinference-instrumentation-openai-agentsAuto-instruments OpenAI Agents SDK to emit…
permissive · top 5,000 on PyPI
openinference-instrumentation-agnoAuto-instruments Agno Agent applications to…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-mcpAdds distributed tracing to MCP (Model Context…
permissive · top 5,000 on PyPI
openinference-instrumentation-bedrockAutomatically instruments AWS Bedrock API calls…
permissive · top 15,000 on PyPI
opentracingProvides the OpenTracing API for Python,…
permissive · top 5,000 on PyPI