[enhancement] feat(#606): support auth mode + bearer token when adding HTTP MCP servers (#607)

* feat(#606): support auth mode + bearer token when adding HTTP MCP servers

- Extend AddMcpServerRequest with auth (none|header|oauth) and bearerToken
- Add auth mode FilterChip selector in HTTP add-server dialog
- Conditionally show masked bearer token field when auth == header
- Wire new fields through McpServersViewModel request builder

Backend contract: exactly one of url/command required; bearer_token
requires auth == "header"; args/env only for stdio. SnakeCase naming
strategy auto-serializes bearerToken -> bearer_token.

Fixes #606

* fix(#606): address agy review — remember PasswordVisualTransformation + FlowRow for auth chips

- Wrap PasswordVisualTransformation in remember {} to avoid per-recomposition allocation
- Use FlowRow for the 3 auth-mode FilterChips so they wrap on narrow screens instead of overflowing
This commit is contained in:
M57 authored and GitHub committed 2026-07-16 13:58:20 +03:00
1 parent 45490c82c2
commit 228431d57a
4 files changed
+73

No files matched your search

@@ -31,6 +31,8 @@ data class AddMcpServerRequest(
val command: String? = null,
val args: List<String>? = null,
val env: Map<String, String>? = null,
val auth: String? = null, // "none" | "header" | "oauth"
val bearerToken: String? = null, // sent only when auth == "header"
)
@Serializable