opencode icon indicating copy to clipboard operation
opencode copied to clipboard

MCP with oauth doesn't work

Open klaudworks opened this issue 1 month ago • 4 comments

Description

Configured MCP like this inside my project:

"mcp": {
  "jira": {
    "type": "remote",
    "url": "https://mcp.atlassian.com/v1/sse"
  }
},

opencode mcp auth jira shows:

opencode mcp auth jira

┌  MCP OAuth Authentication
│
▲  No OAuth-enabled MCP servers configured
│
●  Add OAuth config to a remote MCP server in opencode.json:
│
●
│    "mcp": {
│      "my-server": {
│        "type": "remote",
│        "url": "https://example.com/mcp",
│        "oauth": {
│          "scope": "tools:read"
│        }
│      }
│    }
│
└  Done
Image

I thought it may also help to try to invoke the tools and then the Oauth process will start but the agent doesn't know the tools.

OpenCode version

1.0.150

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 26.1

Terminal

iTerm 2

klaudworks avatar Dec 12 '25 17:12 klaudworks

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

  • #5373: [FEATURE]: Allow to enable MCP on a per-agent basis (related MCP configuration challenges)
  • #5371: [FEATURE]: Support MCP servers that require POST-based or non-standard SSE handshake (related MCP server compatibility)
  • #5328: Remote MCPs with auth header broke in latest update (related to MCP authentication in recent versions)
  • #5299: {env:...} variable substitution inconsistently fails for specific MCP server URLs (related to MCP configuration and environment variables)

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Dec 12 '25 17:12 github-actions[bot]