{"library":"openinference-instrumentation-mcp","title":"OpenInference MCP Instrumentation","description":"OpenInference instrumentation for MCP (Model Context Protocol) clients, enabling OpenTelemetry-based tracing of MCP tool calls and server interactions. Current version 2.0.0, requires Python >=3.10 <3.15. Part of the Arize AI OpenInference ecosystem. Active development with frequent releases.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install openinference-instrumentation-mcp"],"cli":null},"imports":["from openinference_instrumentation_mcp import MCPClientInstrumentor"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom opentelemetry import trace\nfrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import SimpleSpanProcessor\n\nfrom openinference_instrumentation_mcp import MCPClientInstrumentor\n\n# Set up OpenTelemetry tracer provider\nprovider = TracerProvider()\nprovider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint=os.environ.get('OTEL_EXPORTER_OTLP_ENDPOINT', 'http://localhost:4318/v1/traces'))))\ntrace.set_tracer_provider(provider)\n\n# Instrument MCP client\nMCPClientInstrumentor().instrument()\n\n# Now any MCP client sessions will be traced.","lang":"python","description":"Instrument MCP client with OpenInference tracing.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}