Skip to content

fix(server): report OAuth token state in MCP upstream list health - #1531

Closed
Dumbris wants to merge 1 commit into
mainfrom
fix/issues-w5b1-internal-server-internal-runti
Closed

Dumbris wants to merge 1 commit into
mainfrom
fix/issues-w5b1-internal-server-internal-runti

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

The MCP upstream_servers list operation reported OAuth servers without token state in their health, so a server needing sign-in or with an expired token looked healthy over MCP while REST and the CLI showed the real state. This change makes the MCP list use the same OAuth health calculation as the other surfaces.

Items

  • [Bug]: MCP upstream list reports sign-in required with a valid OAuth token #1522 (MCP upstream list health lacks OAuth token state)
    • Root cause: the MCP list path built health without the OAuth token information that the REST/runtime path applies.
    • Change: extracted the OAuth health computation into internal/runtime/oauth_health.go (shared by runtime.go), and wired it into the MCP list in internal/server/mcp.go and internal/server/server.go.
    • Test: internal/server/list_upstreams_oauth_health_test.go.

Skipped items

None.

Review Status

clean after 1 round(s), unresolved findings []

Closes #1522

#1522)

The upstream_servers list (and the legacy Server.GetAllServers tray path)
built a HealthCalculatorInput without OAuthStatus, so a server with a valid
stored token read as 'Authentication required'. Extract the token-state
derivation from Runtime.GetAllServers into Runtime.OAuthHealthState and use it
on all three surfaces.
@Dumbris
Dumbris enabled auto-merge (squash) October 6, 2026 09:51
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 94cecfd
Status: ✅  Deploy successful!
Preview URL: https://589c671c.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-issues-w5b1-internal-ser.mcpproxy-docs.pages.dev

View logs

@Dumbris

Dumbris commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Closing in favour of @neylwalecki's #1525, which fixed #1522 first with the same canonical-health approach and thorough tests (merged). Thanks @neylwalecki!

@Dumbris Dumbris closed this Oct 6, 2026
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.

[Bug]: MCP upstream list reports sign-in required with a valid OAuth token

1 participant