[BUG] `/mcp reconnect` doesn't refresh expired OAuth access tokens for HTTP MCP servers
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I have the remote Buildkite MCP server set up and working via a simple set of developer plugins. I attempted to use it today and was met with 401s
⏺ MCPSearch(Search MCP tools: "select:mcp__plugin_developer-tools_buildkite__get_build")
⎿ Found 1 tool
⏺ plugin:developer-tools:buildkite - Get Build (MCP)(org_slug: "...", pipeline_slug: "...", build_number: "835", detail_level: "detailed")
⎿ Error: {"message":"Authentication required. Please supply a valid API Access Token: https://buildkite.com/docs/apis/rest-api#authentication"}
⏺ The Buildkite MCP server needs re-authentication. You can fix this by running:
/mcp reconnect plugin:developer-tools:buildkite
❯ /mcp reconnect plugin:developer-tools:buildkite
⎿ Successfully reconnected to plugin:developer-tools:buildkite
❯ Let's try again.
⏺ plugin:developer-tools:buildkite - Get Build (MCP)(org_slug: "...", pipeline_slug: "...", build_number: "835", detail_level: "detailed")
⎿ Error: {"message":"Authentication required. Please supply a valid API Access Token: https://buildkite.com/docs/apis/rest-api#authentication"}
I should add that running /mcp reconnect did not open a browser to reconnect me to Buildkite.
What Should Happen?
Upon /mcp reconnect Claude should verify that reconnection was successful; clearly I was unable to use Buildkite even after running that command and the solution was to re-authenticate but it never did that or suggested it.
Error Messages/Logs
I have no way to get debug info or errors for this situation
Steps to Reproduce
I don't know how this happened, or why. It did not affect anyone else in my team so far.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.12
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
I tried to have Claude Code interrogate the issue. The credentials.json had an access token due to expire in 60 minutes. I successfully used the refresh token to generate a new access token and persisted that to the credentials file. That did not work either.
Ultimately when I pulled the credentials from the JSON file and ran through an initial setup i got the browser authentication and authorised and that restored service. I have reported the issue to buildkite to see if something happened with their remote MCP that resulted in my old Oauth session being unusable but valid.
This bug report is mostly around Claude gaslighting me a bit around reconnection and not properly re-authenticating.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗