Repository navigation
Description
Description
Describe the bug
After upgrading to v1.15.13, all MCP servers defined in the global ~/.config/opencode/config.json stopped being recognized. The v1.15.13 release introduced upward config loading ("Config now loads from the opened location upward"), but the merge strategy for the mcp key appears to be a shallow replace rather than a deep merge — so any local opencode.json/opencode.jsonc found in the directory hierarchy that contains even a partial mcp section silently discards all servers defined in the global config.
Steps to reproduce
Define multiple MCP servers in ~/.config/opencode/config.json under the mcp key.
Create a project-level opencode.jsonc (e.g. at ~/Repositories/myproject/opencode.jsonc) with only a single, different MCP server:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"control-chrome": {
"type": "local",
"command": ["chrome-devtools-mcp"],
"enabled": true
}
}
}
Open opencode from ~/Repositories/myproject/.
All MCP servers from the global config are gone — only control-chrome is available.
Expected behavior
The mcp maps from all config files found during upward loading should be merged additively (per-key, like a Object.assign / deep merge), so that a local config can add project-specific MCP servers without removing globally defined ones.
Actual behavior
The local mcp object completely replaces the global one. Any MCP servers not redeclared in the local config are silently dropped.
Environment
OpenCode version: 1.15.13
Install method: auto-updater
OS: macOS (darwin arm64)
Additional context
This is a breaking change for any user who has global MCP servers in ~/.config/opencode/config.json and project-level configs with a partial mcp section. Before v1.15.13 the upward traversal didn't happen, so this conflict never surfaced. The fix is likely to change the config merge strategy for the mcp key from a shallow object replace to a per-server-key merge.
Plugins
No response
OpenCode version
1.15.13
Steps to reproduce
Define multiple MCP servers in ~/.config/opencode/config.json under the mcp key.
Create a project-level opencode.jsonc (e.g. at ~/Repositories/myproject/opencode.jsonc) with only a single, different MCP server:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"control-chrome": {
"type": "local",
"command": ["chrome-devtools-mcp"],
"enabled": true
}
}
}
Open opencode from ~/Repositories/myproject/.
All MCP servers from the global config are gone — only control-chrome is available.
Expected behavior
The mcp maps from all config files found during upward loading should be merged additively (per-key, like a Object.assign / deep merge), so that a local config can add project-specific MCP servers without removing globally defined ones.
Screenshot and/or share link
No response
Operating System
macOS (darwin arm64)
Terminal
No response
Activity
github-actions commentedon Jun 2, 2026
This issue might be a duplicate of existing issues. Please check:
mcpsection existsgithub-actions commentedon Aug 2, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.