anomalyco / anomalyco/opencode
MCP OAuth prompt hardcodes opencode binary name
@rekram1-node is already working on this.
Since Sep 2, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
When an MCP server requires OAuth, opencode surfaces two prompts telling the user to run opencode mcp auth <name>:
- a toast published from
packages/opencode/src/mcp/index.tswhen connect fails with an auth error - the "Needs authentication" line in the
/mcpstatus dialog (packages/tui/src/component/dialog-status.tsx)
The opencode prefix is a literal string. Downstream distributions or wrappers that invoke the same binary under a different name give users a command that isn't on their $PATH.
Proposal: honor an OPENCODE_CLI_NAME env var (following the existing OPENCODE_* convention) and interpolate it into both prompts. Default "opencode" — no change for normal installs.
Repro: any OAuth-requiring MCP server (e.g. Sentry). The toast says Server "sentry" requires authentication. Run: opencode mcp auth sentry regardless of how the binary was invoked.
Happy to send the PR (~4 lines).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.