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

MCP: get_stdio_tools() fails in documented setup

Abierto
#310 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@dajiaohuang ya está trabajando en esto.

Desde el 25/9/2026.

  • #311 de @dajiaohuang — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api

Línea de trabajo

Start with get_stdio_tools() and its connection helper, then compare the lifecycle used by get_http_tools(). Re-run the documented uv command on the frozen revision and verify that discovery starts the MCP transport and returns tools without requiring agent.run().

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

Descripción

Bug description

The MCP reference shows calling get_stdio_tools() as setup code that returns AgentTool values to pass to ai.Agent. On the frozen main revision, the documented call raises before returning tools when run outside agent.run().

Reproduction

From the repository root with Python 3.12:

uv run --frozen --python 3.12 python -c 'import asyncio, ai; asyncio.run(ai.mcp.get_stdio_tools("python", "--version"))'

Observed error:

RuntimeError: MCP tools must be used inside agent.run(). The connection pool is not initialized.

The pool check happens before an MCP transport is started, so this call does not launch the subprocess.

Expected behavior

The documented setup call should return tools that can be passed to ai.Agent, or the reference should show a supported lifecycle for discovery.

Source context

get_stdio_tools() calls the connection helper without establishing the pool. get_http_tools() establishes the pool around discovery. This is reproducible against main at c788059dd1db2d93ae1c3da6daffb660eca07dbb.

Lenguaje dominante
Python
Estrellas
189
Forks
26
Merge medio
1 d 23 h
PR fusionados (30 d)
14

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 vercel-labs/ai-python

Todos los issues de vercel-labs/ai-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.