opencode icon indicating copy to clipboard operation
opencode copied to clipboard

MCP Servers are not available if config is per project

Open xTamasu opened this issue 2 months ago • 5 comments

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

  1. 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"],
    },
  },
}
  1. 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.
  2. Check if mcp usage is shown.
  3. Move ~/.config/opencode/opencode.json to your project root folder (.opencode/opencode.json)
  4. 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.
  5. Check if mcp usage is shown.

Screenshot and/or share link

No response

Operating System

macOS 15.6.1

Terminal

vs-code, zsh

xTamasu avatar Nov 07 '25 21:11 xTamasu