Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#567 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@raoashish10 ya está trabajando en esto.

Desde el 2/8/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

Comienza con py/src/braintrust/integrations/adk/test_adk_mcp_tool.py y el layout circundante de py/src/braintrust/integrations/, ya que el repositorio no tiene una integración mcp independiente. Revisa las superficies estables de mcp.ClientSession enumeradas en el issue y las convenciones de tracing existentes; se considera terminado cuando las llamadas directas a herramientas, las lecturas de recursos y las operaciones de prompts estén instrumentadas con las entradas, salidas y metadatos indicados, y se haya actualizado la tabla de integraciones del README.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
21
Forks
23
Merge medio
20 h 8 min
PR fusionados (30 d)
94

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de braintrustdata/braintrust-sdk-python

Todos los issues de braintrustdata/braintrust-sdk-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.