Permissions are broken when installing OpenCode with this plugin.
When you install this plugin, OpenCode no longer respects the settings in opencode.json. It begins editing and executing commands without our confirmation.
The plugin is instructing the model to use the mcptool CLI via bash to access MCP servers.
Because I have "bash": { "*": "allow" } in my opencode.json, bash commands are being executed automatically, bypassing the specific rules I had in ask or deny.
(This shouldn't happen, since OpenCode allows exception lists even when “*”: “allow” is set)
This created a loophole where the model could execute any MCP tool without confirmation, as OpenCode perceived it as a simple "allowed" bash command.
Thanks for raising this, I had a look at it today.
I think the confusing bit here is that the mcp bridge currently uses mcptool as a shell-based bridge. That means opencode applies the bash permission rule to mcptool call ..., rather than a separate mcp permission rule.
So with a config like bash: { "*": "allow" }, opencode is basically doing what it was told to do: allow shell commands. The catch is that broad bash access also allows commands that can reach mcp tools through mcptool.
I’ve added a readme note to make this clearer. If you want mcp calls to keep asking for confirmation, the safer config is to keep bash as ask, or add an explicit ask/deny rule for mcptool call *.
I’ll leave this open for now in case there’s a better way to expose mcp tools without relying on the shell bridge.
I ran into this as well while testing the plugin. It seemed like OpenCode's permission system no longer applied correctly when using bash rules. I also noticed this behavior could affect other models, not just the Cursor ones.
Is this architecture currently required because of an OpenCode limitation, or could MCP tools eventually be exposed as proper OpenCode tools so permissions continue working normally?
@BrianValente In fact, this affects the entire OpenCode session, as long as the plugin is installed... regardless of the LLM/provider.
@Nomadcxx I've fixed this issue; I can go ahead and submit the PR. That way, we'll be able to thoroughly review my proposed fix.
Thanks, yeah fair question.
From memory, this was mostly a cursor-agent limitation rather than an opencode limitation.
We did try exposing the mcp tools more directly as plugin tools, but cursor-agent did not reliably call those tools. Shell was the path it would reliably use, so mcptool became the bridge.
That does work, but the tradeoff is the one raised here: opencode sees a bash call, not a first-class mcp tool call, so broad bash rules also cover mcptool call ....
I’d prefer this to be first-class tool routing eventually, but I’m being cautious because changing it touches permissions, tool routing, and provider behaviour all at once.
Triage (2026-06-18): Keeping open as bug — partial mitigation shipped, full fix still desired.
Mitigations already in main:
- PR #77 (v2.4.x): system prompt now recommends direct
mcp__<server>__<tool>calls instead ofmcptoolvia bash - PR #79: prompt shows exact callable MCP tool names
- README note: broad
bash: { "*": "allow" }also permitsmcptool call ...
Why still open: first-class MCP tool routing (so OpenCode permission rules apply per-tool, not via bash) is the desired end state but needs careful rollout across permissions, tool routing, and cursor-agent behaviour.
Great progress! I can't wait to test it out and follow the progress more closely.