(
State(_state): State<Arc<ServerState>>,
)
| 2523 | } |
| 2524 | |
| 2525 | async fn get_mcp_status( |
| 2526 | State(_state): State<Arc<ServerState>>, |
| 2527 | ) -> Json<HashMap<String, McpStatusInfo>> { |
| 2528 | let manager = get_mcp_oauth_manager(); |
| 2529 | if let Err(error) = sync_mcp_from_disk(manager).await { |
| 2530 | tracing::warn!(%error, "failed to sync MCP servers from config"); |
| 2531 | } |
| 2532 | let servers = manager.list_servers().await; |
| 2533 | let mut result = HashMap::new(); |
| 2534 | for server in servers { |
| 2535 | result.insert(server.name.clone(), McpStatusInfo::from(server)); |
| 2536 | } |
| 2537 | Json(result) |
| 2538 | } |
| 2539 | |
| 2540 | #[derive(Debug, Deserialize)] |
| 2541 | pub struct AddMcpRequest { |
nothing calls this directly
no test coverage detected