Skip to content

Desktop app v1.15.13 doesn't load MCP/LSP/plugin config from opencode.json #30390

Closed

Description

@RaySunseite

Describe the Bug

The opencode desktop app (Electron, v1.15.13) fails to load MCP servers, LSP, and plugin configurations from opencode.json files. The same config works perfectly in CLI mode.

Config

~/.config/opencode/opencode.json contains mcp with two servers (serena, repomix), lsp: true, etc. Same config at project root opencode.json.

What Works

  • opencode mcp list (CLI) shows both servers connected
  • opencode debug config shows the full resolved config with mcp, lsp, plugin sections
  • Serena and Repomix tools work correctly in CLI mode

What Doesn't Work

  • Desktop app UI shows "No hay MCPs configurados" (no MCPs configured)
  • Desktop app also shows no LSP and no plugins as configured
  • Tried both .jsonc and .json extensions
  • Tried both ~/.config/opencode/ and %APPDATA%\opencode\ config paths
  • Desktop app's internal state (opencode.global.dat) has "server": {"list": []} (empty MCP list)
  • No MCP-related errors in desktop app logs

Environment

  • OS: Windows 11
  • CLI version: 1.15.13 (npm)
  • Desktop app version: 1.15.13 (Electron, @opencode-aidesktop)
  • Desktop is an Electron wrapper that spawns a sidecar backend; the sidecar doesn't load mcp/lsp/plugin config

Expected Behavior

Desktop app should read MCP/LSP/plugin configuration from opencode.json the same way the CLI does.

Activity

  1. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    All of the above describe the same symptom: Desktop app v1.15.13 does not display MCP servers configured in opencode.json, while the CLI works correctly. Please check these issues before proceeding, and consider adding your information there instead.

  2. Astro-Han commented on Jun 3, 2026

    @Astro-Han

    Your evidence already narrows this down nicely: CLI resolves the config, but the Desktop sidecar's opencode.global.dat has server.list: []. So the sidecar is running with a different config resolution than the CLI, not failing to parse a found file.

    Worth checking which of these the sidecar diverges on:

    • cwd / project root. The CLI resolves project opencode.json relative to where you launched it. A sidecar spawned by Electron often starts with cwd set to the app's resources dir or the user's home, so a project-root config is simply out of scope. Does the global ~/.config/opencode/opencode.json alone get loaded, independent of any project file?
    • Env the sidecar inherits. XDG_CONFIG_HOME, OPENCODE_CONFIG, HOME/USERPROFILE differences between an Electron-spawned process and your shell will send config resolution to a different path. On Windows specifically, %APPDATA%\opencode vs ~/.config/opencode resolve differently depending on which the process thinks is home.
    • Whether the sidecar even runs the same config loader. If Desktop keeps its own store and only merges a subset of fields, mcp/lsp/plugin could be dropped on the way in, which matches "no errors in logs" since nothing failed, the keys were just never read.

    A useful datapoint: launch the sidecar binary the same way Desktop does (same cwd + env) and run the equivalent of debug config from there. If that output is missing mcp while your shell's opencode debug config has it, it's purely a cwd/env resolution gap, which is fixable without touching the loader.
    We had the exact same sidecar-vs-shell config resolution bug in PawWork — the fix was making the sidecar explicitly inherit cwd and config home from the Electron main process's resolved project root, rather than letting the OS default them.

  3. Hona commented on Jun 4, 2026

    @Hona
    Member

    Fixed in next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions