opencode
opencode copied to clipboard
MCP Servers are not available if config is per project
Description
MCP Servers are not available/detected if you define a config.json at your project-level. They work fine if you move the same config file to ~/.config/opencode/opencode.json.
OpenCode version
1.0.39
Steps to reproduce
- Create config at ~/.config/opencode/opencode.json
Insert:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mcp_everything": {
"type": "local",
"command": ["npx", "-y", "@modelcontextprotocol/server-everything"],
},
},
}
- Run ``opencode run "use the mcp_everything tool to add the number 3 and 4. You're not allowed to calculate by yourself." Alternatively open opencode and run /status.
- Check if mcp usage is shown.
- Move ~/.config/opencode/opencode.json to your project root folder (.opencode/opencode.json)
- Run ``opencode run "use the mcp_everything tool to add the number 3 and 4. You're not allowed to calculate by yourself." Alternatively open opencode and run /status.
- Check if mcp usage is shown.
Screenshot and/or share link
No response
Operating System
macOS 15.6.1
Terminal
vs-code, zsh