Skip to content

Fix health calculator suggesting 'login' for offline non-OAuth servers - #309

Merged
Dumbris merged 1 commit into
mainfrom
fix/health-calculator-login-suggestion-242
Mar 10, 2026
Merged

Dumbris merged 1 commit into
mainfrom
fix/health-calculator-login-suggestion-242

Conversation

@Dumbris

@Dumbris Dumbris commented Feb 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix isOAuthRelatedError() in both health/calculator.go and upstream/cli/client.go to check for connection errors (connection refused, no such host, dial tcp, etc.) before OAuth patterns
  • When mcp-go wraps a connection error inside "authentication strategies failed", the health calculator now correctly suggests restart instead of login

Test plan

  • Unit tests added for exact error string from issue report
  • Verified genuine OAuth errors still correctly suggest login
  • All existing health calculator tests pass
  • Race detection passes

Closes #242

🤖 Generated with Claude Code

#242)

When an HTTP server goes offline, mcp-go wraps the connection error inside
"authentication strategies failed", which caused isOAuthRelatedError() to
incorrectly classify it as an OAuth issue. The health calculator then
suggested "login" instead of "restart".

Fix: check for connection error patterns (connection refused, no such host,
dial tcp, i/o timeout, etc.) before checking OAuth patterns in both
health/calculator.go and upstream/cli/client.go.

Closes #242

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 29ff3da
Status: ✅  Deploy successful!
Preview URL: https://72586cef.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-health-calculator-login.mcpproxy-docs.pages.dev

View logs

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/health-calculator-login-suggestion-242

Available Artifacts

  • archive-darwin-amd64 (23 MB)
  • archive-darwin-arm64 (21 MB)
  • archive-linux-amd64 (12 MB)
  • archive-linux-arm64 (11 MB)
  • archive-windows-amd64 (23 MB)
  • archive-windows-arm64 (21 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (26 MB)
  • installer-dmg-darwin-arm64 (23 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 22257136038 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris
Dumbris merged commit 26b2e6c into main Mar 10, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Health calculator incorrectly suggests 'login' for offline non-OAuth servers

2 participants