Summary
The official Model Context Protocol Python SDK (PyPI package mcp, https://github.com/modelcontextprotocol/python-sdk) is not instrumented anywhere in this repo. mcp.ClientSession exposes an execution surface for agent tool-calling — call_tool(), list_tools(), read_resource(), list_resources(), list_prompts(), get_prompt() — that a developer's own agent code can call directly, independent of any of the agent frameworks this repo already instruments (claude_agent_sdk, openai_agents, google-adk, etc., which each embed their own MCP client internally).
Braintrust already instruments several agent-run frameworks that use MCP under the hood (e.g. Google ADK — see py/src/braintrust/integrations/adk/test_adk_mcp_tool.py — plus Claude Agent SDK and OpenAI Agents SDK), but a developer who talks to an MCP server directly via the standalone mcp SDK (not through one of those frameworks) gets zero tracing for their tool calls, resource reads, or prompt fetches.
Braintrust docs status: not_found. https://www.braintrust.dev/docs/guides/tracing lists supported providers ("OpenAI, Anthropic, Gemini, AWS Bedrock, Azure, Mistral, Together, Groq, and many more") and frameworks ("LangChain, LangGraph, CrewAI, Vercel AI SDK, Pydantic AI, DSPy, and many more") but does not mention the standalone MCP Python SDK or ClientSession instrumentation.
What needs to be instrumented
| SDK surface |
Already traced? |
ClientSession.call_tool(name, arguments) |
No |
ClientSession.list_tools() |
No |
ClientSession.read_resource(uri) |
No |
ClientSession.list_resources() |
No |
ClientSession.get_prompt(name, arguments) |
No |
A useful span for call_tool should record input (tool name + arguments), output (CallToolResult.content / structuredContent), and metadata (provider: "mcp", server name/transport).
Upstream sources
Local repo files inspected
- Repo-wide grep for
import mcp, from mcp, ClientSession under py/src/braintrust/ — zero matches
py/src/braintrust/integrations/adk/test_adk_mcp_tool.py — MCP only exercised as a sub-feature of the Google ADK integration; no standalone mcp patcher
py/src/braintrust/integrations/ — no mcp/ directory
README.md integrations table — no MCP entry
Note: as of this writing the mcp package's v2 line (2.0.0b1) is an explicit pre-release not intended for production per its own README, so instrumentation should target the stable v1.x ClientSession API.
Summary
The official Model Context Protocol Python SDK (PyPI package
mcp, https://github.com/modelcontextprotocol/python-sdk) is not instrumented anywhere in this repo.mcp.ClientSessionexposes an execution surface for agent tool-calling —call_tool(),list_tools(),read_resource(),list_resources(),list_prompts(),get_prompt()— that a developer's own agent code can call directly, independent of any of the agent frameworks this repo already instruments (claude_agent_sdk,openai_agents,google-adk, etc., which each embed their own MCP client internally).Braintrust already instruments several agent-run frameworks that use MCP under the hood (e.g. Google ADK — see
py/src/braintrust/integrations/adk/test_adk_mcp_tool.py— plus Claude Agent SDK and OpenAI Agents SDK), but a developer who talks to an MCP server directly via the standalonemcpSDK (not through one of those frameworks) gets zero tracing for their tool calls, resource reads, or prompt fetches.Braintrust docs status:
not_found. https://www.braintrust.dev/docs/guides/tracing lists supported providers ("OpenAI, Anthropic, Gemini, AWS Bedrock, Azure, Mistral, Together, Groq, and many more") and frameworks ("LangChain, LangGraph, CrewAI, Vercel AI SDK, Pydantic AI, DSPy, and many more") but does not mention the standalone MCP Python SDK orClientSessioninstrumentation.What needs to be instrumented
ClientSession.call_tool(name, arguments)ClientSession.list_tools()ClientSession.read_resource(uri)ClientSession.list_resources()ClientSession.get_prompt(name, arguments)A useful span for
call_toolshould record input (tool name + arguments), output (CallToolResult.content/structuredContent), and metadata (provider: "mcp", server name/transport).Upstream sources
mcp— latest stable release1.28.1(2026-06-26): https://pypi.org/project/mcp/ClientSession.list_tools()/call_tool()usage: https://modelcontextprotocol.io/quickstart/clientLocal repo files inspected
import mcp,from mcp,ClientSessionunderpy/src/braintrust/— zero matchespy/src/braintrust/integrations/adk/test_adk_mcp_tool.py— MCP only exercised as a sub-feature of the Google ADK integration; no standalonemcppatcherpy/src/braintrust/integrations/— nomcp/directoryREADME.mdintegrations table — no MCP entryNote: as of this writing the
mcppackage's v2 line (2.0.0b1) is an explicit pre-release not intended for production per its own README, so instrumentation should target the stable v1.xClientSessionAPI.