From 7cc4f0f6897020b984af54bd36ab94a9cfeaa65e Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Mon, 1 Jun 2026 13:19:34 -0500 Subject: [PATCH] fix(mcp): treat missing resources/list as non-fatal for servers that don't implement it --- src-tauri/src/mcp/discovery.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/mcp/discovery.rs b/src-tauri/src/mcp/discovery.rs index e1add604..1eb68760 100644 --- a/src-tauri/src/mcp/discovery.rs +++ b/src-tauri/src/mcp/discovery.rs @@ -103,9 +103,16 @@ async fn discover_server_inner( other => return Err(format!("Unknown transport type: {other}")), }; - // List tools and resources + // List tools and resources (resources are optional — not all servers implement them) let tools = list_tools(&conn, &server.id, &server.name).await?; - let resources = list_resources(&conn, &server.id).await?; + let resources = match list_resources(&conn, &server.id).await { + Ok(r) => r, + Err(e) if e.contains("-32601") || e.contains("Method not found") => { + info!(server_id = %server.id, "Server does not support resources/list (optional)"); + vec![] + } + Err(e) => return Err(e), + }; // Persist to DB {