Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[bot] MCP (Model Context Protocol) Python SDK: no instrumentation for ClientSession tool-calling execution

Offen
#567 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@raoashish10 arbeitet bereits daran.

Seit 02.8.2026.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
python

Rechercherichtung

Beginnen Sie mit py/src/braintrust/integrations/adk/test_adk_mcp_tool.py und dem umliegenden Layout unter py/src/braintrust/integrations/, da das Repository keine eigenständige mcp-Integration enthält. Überprüfen Sie die im Issue aufgeführten stabilen mcp.ClientSession-Oberflächen und die bestehenden Tracing-Konventionen; als abgeschlossen gilt die Arbeit, wenn direkte Tool-Aufrufe, Ressourcenlesevorgänge und Prompt-Operationen mit den angegebenen Eingaben, Ausgaben und Metadaten instrumentiert sind und die Integrationstabelle im README aktualisiert wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bot-automation

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.

Vorherrschende Sprache
Python
Sterne
21
Forks
23
Ø Merge
19 Std. 55 Min.
Gemergte PRs (30 T.)
95

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus braintrustdata/braintrust-sdk-python

Alle Issues in braintrustdata/braintrust-sdk-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.