Description
After re-authenticating an OAuth MCP server with opencode mcp auth , the new token is written to disk but the running MCP connection still uses the stale one.
opencode mcp debug confirms: shows authenticated with a valid token and future expiry, but the HTTP connection test returns 401 Unauthorized. The only workaround is restarting opencode entirely.
Expected: opencode mcp auth should refresh the active MCP connection with the new token, or there should be an opencode mcp reconnect command to re-establish the connection.
Plugins
none
OpenCode version
1.4.1
Steps to reproduce
- Connect to an OAuth-enabled MCP server (Streamable HTTP transport)
- Wait for the token to expire or be invalidated server-side
- Run
opencode mcp auth <server> — completes successfully
- MCP calls still fail with auth errors
opencode mcp debug <server> shows valid token but 401 on test
Screenshot and/or share link
No response
Operating System
macos 26.4
Terminal
iTerm2
Description
After re-authenticating an OAuth MCP server with opencode mcp auth , the new token is written to disk but the running MCP connection still uses the stale one.
opencode mcp debug confirms: shows
authenticatedwith a valid token and future expiry, but the HTTP connection test returns401 Unauthorized. The only workaround is restarting opencode entirely.Expected:
opencode mcp authshould refresh the active MCP connection with the new token, or there should be anopencode mcp reconnectcommand to re-establish the connection.Plugins
none
OpenCode version
1.4.1
Steps to reproduce
opencode mcp auth <server>— completes successfullyopencode mcp debug <server>shows valid token but 401 on testScreenshot and/or share link
No response
Operating System
macos 26.4
Terminal
iTerm2