config: V2 silently ignores MCP servers defined directly under `mcp` instead of `mcp.servers`
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
- Área
- cli, developer-experience
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
- 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"]
}
}
}
- Restart OpenCode (or restart the service).
- 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
mcpand is notservers/timeout, log a warning naming the key and the expectedmcp.servers.<name>path. A one-line warning at config load would have saved hours here. - Related:
opencode mcp listreturning "No MCP servers configured" while a config file visibly contains anmcpblock 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
pending close triaging
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
anomalyco/opencode#57028 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Plan mode leave reminder becomes the final user turn after a tool-driven agent switch, models refusePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#57013 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
anomalyco/opencode#56891 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anomalyco/opencode#56843 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
triaging
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
anomalyco/opencode#56765 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
[测试] 等待仓库加载后再记录多仓库排序基线Posiblemente ocupada @myot233 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
area:arcade p3-medium ready-for-agent testing type:docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fderuiter/deruiter.dev#2369 ·
Los mantenedores suelen responder en 1 día
-
area:devenv origin:agent type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
overengineeringstudio/effect-utils#1949 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ccch1mneyyy/dsh-TUI#1631 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MiniMax-AI/minimax-code#507 ·
Los mantenedores suelen responder en 1 día