Skip to content

[BUG] /mcp reconnect doesn't refresh expired OAuth access tokens for HTTP MCP servers #19481

Closed as not planned

Description

@dannyfallon

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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.

Activity

  1. added
    bug
    on Jan 20, 2026
  2. added
    platform:macos
    on Jan 20, 2026
  3. github-actions commented on Jan 20, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] OAuth Authentication Succeeds but MCP Reconnection Fails - Requires Restart #10250
    2. [BUG] Claude Code can't find refresh_token in connecting with MCP Server using OAuth #12614
    3. [BUG] MCP HTTP transport: connectivity test fails because token is not included #18175

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  4. added
    stale
    on Feb 13, 2026
  5. github-actions commented on Feb 27, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  6. github-actions commented on Mar 7, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  7. locked as resolved and limited conversation to collaborators on Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:autharea:mcpbugplatform:macosstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions