Skip to content

[Desktop][macOS][MCP] bunx cannot be resolved for local MCP server (Executable not found in $PATH) #15565

Closed as not planned

Description

@App1ePine

Description

On macOS, OpenCode Desktop fails to start a local MCP server when the command uses bunx, even though bunx is installed and works normally in both zsh and bash in Terminal.

The Desktop app reports: Executable not found in $PATH: "bunx"

This appears to be a Desktop environment / PATH inheritance bug rather than a missing executable on the system.

On the same machine, in Terminal, all of the following work normally: opencode bun bunx

But when the same executable is used in a local MCP configuration inside OpenCode Desktop, it fails immediately with Executable not found in $PATH.

This makes Bun-based local MCP setups unreliable in Desktop on macOS, even when the toolchain is installed correctly and working in the user’s normal shell environment.

This issue seems related to other OpenCode problems around executable resolution / Desktop runtime environment / command spawning, but this report is specifically about macOS Desktop local MCP failing to resolve bunx.

Plugins

None

OpenCode version

1.2.15

Steps to reproduce

  1. Install Bun on macOS so that bun and bunx work normally in Terminal.
  2. Verify that bunx works in both zsh and bash.
  3. Configure a local MCP server in OpenCode Desktop with a command that uses bunx, for example:
{
  "mcp": {
    "context7": {
      "type": "local",
      "enabled": true,
      "command": ["bunx", "@upstash/context7-mcp"]
    }
  }
}
  1. Open OpenCode Desktop and enable/start that MCP server.
  2. Observe the error (/mcp):
    Executable not found in $PATH: "bunx"
  3. In Terminal on the same machine, run:
    command -v bunx
    bunx --version

Both succeed, confirming that bunx exists and is executable in the normal user shell.

Screenshot and/or share link

Image Image Image

Operating System

macOS 15.7.3

Terminal

Tabby(zsh)

Activity

  1. Brendonovich commented on Mar 3, 2026

    @Brendonovich
    Member

    This should be fixed in the latest beta and the next stable release

  2. added a commit that references this issue on Mar 31, 2026
    9986640
  3. github-actions commented on May 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions