mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-13 18:01:43 +00:00
MCP servers may accept `initialize` unauthenticated but return `401` with a `WWW-Authenticate` challenge only on a later request such as `tools/list` or `tools/call`. Previously Zed only started the Auth flow when `initialize` itself was challenged, so these servers failed opaquely and stayed stuck in `Running` with a dead client. `ContextServerStore` now handles `TransportError::AuthRequired` returned from any request, not just startup: it runs Auth discovery and transitions the server into `AuthRequired` so the UI offers to authenticate. The discovery logic is shared with the startup path, and the tool/prompt request sites route their errors through it. Release Notes: - Fixed MCP servers that require auth only on tool calls (not on `initialize`) failing to prompt for authentication. --------- Co-authored-by: Tom Houlé <tom@tomhoule.com> |
||
|---|---|---|
| .. | ||
| transport | ||
| client.rs | ||
| context_server.rs | ||
| listener.rs | ||
| oauth.rs | ||
| protocol.rs | ||
| test.rs | ||
| transport.rs | ||
| types.rs | ||