Skip to content

Comments

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

Open
Dumbris wants to merge 1 commit intomainfrom
fix/health-calculator-login-suggestion-242
Open

Fix health calculator suggesting 'login' for offline non-OAuth servers#309
Dumbris wants to merge 1 commit intomainfrom
fix/health-calculator-login-suggestion-242

Conversation

@Dumbris
Copy link
Contributor

@Dumbris Dumbris commented Feb 21, 2026

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 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

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

📦 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.

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