fix: config precedence now correctly allows local config to override remote (#7141)

This commit is contained in:
Matt Silverlock
2026-01-07 11:07:21 -06:00
committed by GitHub
parent 662d2b205a
commit 4ba0b22b04
4 changed files with 344 additions and 17 deletions

View File

@@ -44,6 +44,29 @@ You can also disable a server by setting `enabled` to `false`. This is useful if
---
### Overriding remote defaults
Organizations can provide default MCP servers via their `.well-known/opencode` endpoint. These servers may be disabled by default, allowing users to opt-in to the ones they need.
To enable a specific server from your organization's remote config, add it to your local config with `enabled: true`:
```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"jira": {
"type": "remote",
"url": "https://jira.example.com/mcp",
"enabled": true
}
}
}
```
Your local config values override the remote defaults. See [config precedence](/docs/config#precedence-order) for more details.
---
## Local
Add local MCP servers using `type` to `"local"` within the MCP object.