MCP (tracing)
MCP (tracing)
Model Context Protocol (MCP) is an open standard for connecting AI applications to tools, prompts, and external context. Respan gives you full observability over MCP client requests, server tool handlers, resource reads, prompt reads, and tool outputs.
MCP does not require the Respan gateway. This integration traces MCP client and server traffic directly, regardless of which model provider your host application uses. If the host also makes LLM calls, you can route those separate calls through the gateway using the relevant provider or framework guide.
Set up Respan
Create an account at platform.respan.ai and grab an API key.
Run npx @respan/cli setup to set up with your coding agent.
Example projects
Setup
View your trace
Open the Traces page to see your MCP workflow with client operations, server tool handlers, resource reads, prompt reads, inputs, outputs, and timing.
Configuration
MCPInstrumentor options
Attributes
In Respan()
Set defaults at initialization — these apply to exported spans.
With propagate_attributes
Override per request using a context scope.