MCP interceptor
MCP is the standard protocol for agent-tool connectivity. Everycall_tool invocation has a clean
input/output boundary — the interceptor captures each one as a
KIND_TOOL span with no changes to your agent code.
Basic usage
Attach to a Witness tracer
Combine MCP spans with@span-instrumented reasoning steps into a
single unified trace:
Multiple servers
Wrap each server separately and merge the node lists:Set a parent span
Wire MCP tool spans as children of a reasoning span in a larger DAG:What each span contains
Transparent proxy
The interceptor forwards every non-intercepted attribute to the underlying session —list_tools, read_resource, get_prompt, etc.
all pass through unchanged. You can use it as a drop-in replacement: