Phoenix provides tracing for MCP clients and servers through OpenInference. This includes the unique capability to trace client to server interactions under a single trace in the correct hierarchy.
The openinference-instrumentation-mcp instrumentor is unique compared to other OpenInference instrumentors. It does not generate any of its own telemetry. Instead, it enables context propagation between MCP clients and servers to unify traces. You still need generate OpenTelemetry traces in both the client and server to see a unified trace.
Click Create Space, then follow the prompts to create and launch your space.
Install packages:
Copy
Ask AI
pip install arize-phoenix-otel
Set your Phoenix endpoint and API Key:From your new Phoenix Space
Create your API key from the Settings page
Copy your Hostname from the Settings page
In your code, set your endpoint and API key:
Copy
Ask AI
import osos.environ["PHOENIX_API_KEY"] = "ADD YOUR PHOENIX API KEY"os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "ADD YOUR PHOENIX HOSTNAME"# If you created your Phoenix Cloud instance before June 24th, 2025,# you also need to set the API key as a header:# os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key={os.getenv('PHOENIX_API_KEY')}"
Now that you have tracing setup, all invocations of your client and server will be streamed to Phoenix for observability and evaluation, and connected in the platform.