Skip to content

fix: propagate client connection errors and check capability value truthiness#108

Open
anaslimem wants to merge 1 commit intoagentclientprotocol:mainfrom
anaslimem:connection-errors-and-capability-checks
Open

fix: propagate client connection errors and check capability value truthiness#108
anaslimem wants to merge 1 commit intoagentclientprotocol:mainfrom
anaslimem:connection-errors-and-capability-checks

Conversation

@anaslimem
Copy link
Copy Markdown
Contributor

Two bugs fixed :

  1. Connection errors swallowed (mcp_server/builder.rs)

    • McpServerConnection::connect_to was dropping the client connection result and always returning Ok(())
    • Now properly propagates connection failures so the caller knows the connection failed
  2. Capability checks incorrect (capabilities.rs)

    • has_meta_capability only checked key presence, returning true even for explicit false or null values
    • Now checks for actual boolean true value via as_bool().unwrap_or(false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant