You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP command, should have relative path support #1672
Im trying to create a local mcp for our company, it would be living in our of our repos, and I want people to be able to use it from diff repos and folders.
Now they can easily define it manually, but I want to commit the config for everyone, so I want to use relative path.
I want to update the opencode codebase so that the "command" array for local MCP servers in the
config file is resolved relative to the config file's directory, not the current working
directory.
Requirements:
When loading the MCP config, if the "command" array contains a relative path (e.g., ["node", ".
/dist/main.js"]), resolve the script path relative to the directory of the config file that
defined it.
If the command is already absolute, do not modify it.
If the command is ["node", "./dist/main.js"], resolve "./dist/main.js" relative to the config
file directory, but leave "node" as-is.
This should work for any config file location, so that engineers can run opencode from any
directory and the MCP command will always work.
Add a comment in the code explaining this behavior.
Add a test or example to verify that a config in a subdirectory with a relative MCP command
works regardless of the working directory.
Context:
The config loader code is in Config.state and related files.
The code that spawns the MCP local server uses the "command" array from the config.
You may need to pass the config file path or directory to the code that spawns the MCP server.
Activity
tzookb commentedon Aug 7, 2025
/opencode
I want to update the opencode codebase so that the "command" array for local MCP servers in the
config file is resolved relative to the config file's directory, not the current working
directory.
Requirements:
/dist/main.js"]), resolve the script path relative to the directory of the config file that
defined it.
file directory, but leave "node" as-is.
directory and the MCP command will always work.
works regardless of the working directory.
Context:
Config.stateand related files.Deliverables:
tzookb commentedon Aug 7, 2025
tried my luck to let opencode do it for me
thdxr commentedon Aug 7, 2025
i'm reworking a lot of thigns related to this problem so will fix
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
fix(composer): prevent double chip creation and fix cursor position a…