claude-code - 💡(How to fix) Fix [BUG] Multiple custom MCP connectors stopped working simultaneously with "Couldn't reach the MCP server" error [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52358Fetched 2026-04-24 06:09:17
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Participants
Timeline (top)
labeled ×5commented ×3

Error Message

"Couldn't reach the MCP server" error. "Couldn't reach the MCP server" error.

Error Messages/Logs

"Couldn't reach the MCP server" error.

Code Example

Multiple custom MCP connectors stopped working simultaneously with 
"Couldn't reach the MCP server" error.

Reference IDs:
- ofid_74a318c6cc709003
- ofid_f99211da79df5a2e

Affected servers (both independently reachable and functional when tested directly):
- https://kb-mcp.koknife.com/mcp — OAuth2 PKCE, supports refresh_token grant
- https://portfolio.koknife.com/mcp — OAuth2 PKCE, authorization_code only

Server-side diagnostics:
- kb-mcp DB shows 6 successful hourly token refreshes yesterday, then stopped cold. 
  Refresh tokens still valid for 30 days.
- Both endpoints return proper 401 when tested via curl; servers are healthy.

Pattern suggests client-side OAuth refresh/re-auth is not firing.

Claude Code version: [run `claude --version`]
Platform: macOS [version]
RAW_BUFFERClick to expand / collapse

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?

Multiple custom MCP connectors stopped working simultaneously with "Couldn't reach the MCP server" error.

Reference IDs:

  • ofid_74a318c6cc709003
  • ofid_f99211da79df5a2e

Affected servers (both independently reachable and functional when tested directly):

Server-side diagnostics:

  • kb-mcp DB shows 6 successful hourly token refreshes yesterday, then stopped cold. Refresh tokens still valid for 30 days.
  • Both endpoints return proper 401 when tested via curl; servers are healthy.

Pattern suggests client-side OAuth refresh/re-auth is not firing.

Claude Code version: [run claude --version] Platform: macOS [version]

What Should Happen?

Multiple custom MCP connectors stopped working simultaneously with "Couldn't reach the MCP server" error.

Reference IDs:

  • ofid_74a318c6cc709003
  • ofid_f99211da79df5a2e

Affected servers (both independently reachable and functional when tested directly):

Server-side diagnostics:

  • kb-mcp DB shows 6 successful hourly token refreshes yesterday, then stopped cold. Refresh tokens still valid for 30 days.
  • Both endpoints return proper 401 when tested via curl; servers are healthy.

Pattern suggests client-side OAuth refresh/re-auth is not firing.

Claude Code version: [run claude --version] Platform: macOS [version]

Error Messages/Logs

Multiple custom MCP connectors stopped working simultaneously with 
"Couldn't reach the MCP server" error.

Reference IDs:
- ofid_74a318c6cc709003
- ofid_f99211da79df5a2e

Affected servers (both independently reachable and functional when tested directly):
- https://kb-mcp.koknife.com/mcp — OAuth2 PKCE, supports refresh_token grant
- https://portfolio.koknife.com/mcp — OAuth2 PKCE, authorization_code only

Server-side diagnostics:
- kb-mcp DB shows 6 successful hourly token refreshes yesterday, then stopped cold. 
  Refresh tokens still valid for 30 days.
- Both endpoints return proper 401 when tested via curl; servers are healthy.

Pattern suggests client-side OAuth refresh/re-auth is not firing.

Claude Code version: [run `claude --version`]
Platform: macOS [version]

Steps to Reproduce

  1. Set up a self-hosted MCP server with OAuth2 PKCE authorization (e.g., FastMCP or @modelcontextprotocol/sdk with OAuth middleware) behind HTTPS.

  2. Add it as a custom connector in Claude Code via Settings → Integrations, complete the OAuth authorize flow, and confirm tools appear and work.

  3. Leave the connector idle for longer than the server's access-token TTL (e.g., >1 hour if TTL is 3600s). Do not interact with Claude Code during this window.

  4. Return to Claude Code and attempt to use a tool from that connector.

Expected: Claude Code either silently refreshes the access token using the stored refresh token, or (if the server doesn't support refresh_token) prompts the user to re-authorize.

Actual: Request fails with toast "Couldn't reach the MCP server. You can check the server URL and verify the server is running. If this persists, share this reference with support: 'ofid_...'". No retry, no refresh attempt observed server-side, no re-auth prompt. Connector appears permanently stuck until manually removed and re-added.

Reproduces across two independently-implemented servers (different languages, different transports, different DBs) — one supporting refresh_token grant, one not — which rules out a single server-side bug.

Server-side verification: curl against the /mcp endpoint with a valid bearer token succeeds. The servers themselves are reachable and healthy.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Code 2.1.118

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue is likely due to a client-side OAuth refresh/re-auth not firing, causing multiple custom MCP connectors to stop working simultaneously with a "Couldn't reach the MCP server" error.

Guidance

  • Investigate the Claude Code OAuth implementation to ensure it is correctly handling token refreshes and re-authentication.
  • Verify that the refresh_token grant is properly supported and configured for the affected servers.
  • Check the Claude Code version history to identify any changes that may have introduced this regression.
  • Test the connectors with a shorter access-token TTL to see if the issue reproduces more quickly.

Example

No code snippet is provided as the issue is more related to the overall OAuth flow and token management.

Notes

The fact that this issue reproduces across two independently-implemented servers suggests a client-side issue. The lack of retry or refresh attempts observed server-side also points to a client-side problem.

Recommendation

Apply a workaround by manually removing and re-adding the affected connectors to trigger a re-authentication flow, until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING