[bot] MCP (Model Context Protocol) Python SDK: no instrumentation for ClientSession tool-calling execution
メンテナーはふだん 1 日以内に返信
@raoashish10 がすでに取り組んでいます。
2026年8月2日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
リポジトリには独立した mcp 統合がないため、まず py/src/braintrust/integrations/adk/test_adk_mcp_tool.py と、その周辺にある py/src/braintrust/integrations/ のレイアウトを確認してください。Issue に記載されている安定した mcp.ClientSession のサーフェスと、既存の tracing の規約を確認してください。直接のツール呼び出し、リソースの読み取り、prompt 操作が、指定された入力、出力、メタデータとともに計装され、README の integrations テーブルが更新されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- Repo: https://github.com/modelcontextprotocol/python-sdk
- PyPI:
mcp— latest stable release1.28.1(2026-06-26): https://pypi.org/project/mcp/ - Client quickstart showing
ClientSession.list_tools()/call_tool()usage: https://modelcontextprotocol.io/quickstart/client
Local repo files inspected
- Repo-wide grep for
import mcp,from mcp,ClientSessionunderpy/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 standalonemcppatcherpy/src/braintrust/integrations/— nomcp/directoryREADME.mdintegrations 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.
- 主要言語
- Python
- スター
- 21
- フォーク
- 23
- 平均マージ
- 19時間 55分
- マージ済み PR(30日)
- 95
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
braintrustdata/braintrust-sdk-python のほかの issue
-
feature python
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
braintrustdata/braintrust-sdk-python#868 ·
メンテナーはふだん 1 日以内に返信
-
feature integration: mistral python
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
braintrustdata/braintrust-sdk-python#867 ·
メンテナーはふだん 1 日以内に返信
-
[bot] Google GenAI: streaming responses drop `url_context_metadata` that non-streaming responses preserve対応中かも @Kayvan-Zahiri が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
braintrustdata/braintrust-sdk-python#774 ·
メンテナーはふだん 1 日以内に返信
-
OpenAI: trace computer-use Agents session items and capture Responses `access_programs`対応中かも @AbhiPrasad が 2 日前に担当しました。 オープンfeature integration: openai python
braintrustdata/braintrust-sdk-python#869 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
feature python
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
braintrustdata/braintrust-sdk-python#866 ·
メンテナーはふだん 1 日以内に返信
braintrustdata/braintrust-sdk-python の issue をすべて見る
似ている issue
-
Link Checker Reportオープンautomated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
RapidAI/RapidOCRDocs#119 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
btclib-org/btclib-node#1833 ·
メンテナーはふだん 1 日以内に返信
-
IRIS reader: no-data velocity bins (DB_VEL, DB_VELC) returned as 0.0 m/s instead of NaN対応中かも @syedhamidali が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
elodin-sys/elodin#890 ·
メンテナーはふだん 1 日以内に返信