fix: hot-attach to MCP servers that require auth after running .mcp auth <name>

This commit is contained in:
Dark-Alex-17 committed 2026-07-17 13:16:25 -06:00
1 parent 09afdeaf7c
commit f5085a773a
4 files changed
+98 -11

No files matched your search

+10
View File
@@ -1061,4 +1061,14 @@ mod tests {
assert!(!is_auth_required_error(&e));
}
#[test]
fn is_auth_required_error_survives_context_wrapping() {
let e = anyhow!("Auth required, when send initialize request").context(
"MCP server 'github' requires OAuth authentication. \
Run `coyote --auth-mcp github` or `.mcp auth github` in the REPL to authenticate.",
);
assert!(is_auth_required_error(&e));
}
}