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

config: V2 silently ignores MCP servers defined directly under `mcp` instead of `mcp.servers`

Cerrado Apto para principiantes
#56,602 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
Medio día
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Comienza reproduciendo la configuración V1 de mcp con el esquema JSON documentado y luego rastrea la carga de la configuración y el comando opencode mcp list. Añade una comprobación de regresión que capture la compatibilidad con la estructura existente o una advertencia que nombre la clave no reconocida y la ruta esperada mcp.servers.<name>. Terminar significa que el servidor definido ya no se ignora silenciosamente y que el error es visible.

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

Descripción

Summary

V2 config silently ignores an MCP server placed directly under mcp instead of mcp.servers, with no warning. opencode mcp list reports "No MCP servers configured" while the config file clearly contains one, so a broken integration looks like a working config.

Environment

  • opencode version: 2.0.32
  • OS: Windows_NT 10.0.26300 (win32 x64)
  • Terminal: desktop app (OpenCode.exe) + opencode-cli.exe
  • Shell: n/a (desktop app)
  • Install/channel: latest (desktop, @opencodedesktop)
  • Active plugins: none configured

Reproduction

  1. Put an MCP server under mcp (the V1 shape):
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "roam": {
      "type": "local",
      "command": ["node", "/path/to/server.mjs", "serve"]
    }
  }
}
  1. Restart OpenCode (or restart the service).
  2. Run opencode mcp list.

Expected Behavior

Either the server connects, or OpenCode tells me the key is wrong — for example a warning that mcp.roam is not a recognised shape and that V2 expects mcp.servers.roam. The V1-to-V2 migration guide notes V1 config files "are intended to remain compatible", so silently dropping an entire server definition leaves the user with a config file that looks correct and a tool that has been unavailable for weeks.

Actual Behavior

No error, no warning, no migration hint:

$ opencode mcp list
No MCP servers configured

The agent simply has no tools from that server. In my case this went unnoticed for a long time because the missing tool's absence looked like the agent choosing a different approach, rather than a config mistake.

For contrast, moving the identical block one level deeper made it appear immediately:

"mcp": { "servers": { "roam": { "type": "local", "command": [...] } } }

Additional Context

  • Reproducible every time; 100% deterministic.
  • Worth considering: when an object key sits directly under mcp and is not servers/timeout, log a warning naming the key and the expected mcp.servers.<name> path. A one-line warning at config load would have saved hours here.
  • Related: opencode mcp list returning "No MCP servers configured" while a config file visibly contains an mcp block could echo which files were loaded, which would also help when config is present but ignored for other reasons.
Lenguaje dominante
TypeScript
Estrellas
215k
Forks
28.9k
Merge medio
8 h 27 min
PR fusionados (30 d)
282

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 anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.