rust-sdk/crates/rmcp/tests/test_message_schema
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Bolin 4ef1a163f4
feat: add support for custom client notifications (#556)
MCP servers, particularly ones that offer "experimental" capabilities,
may wish to handle custom client notifications that are not part of the
standard MCP specification. This change introduces a new
`CustomClientNotification` type that allows a server to process
such custom notifications.

- introduces `CustomClientNotification` to carry arbitrary methods/params while
  still preserving meta/extensions; wires it into the `ClientNotification` union
  and `serde` so `params` can be decoded with `params_as`
- allows server handlers to receive custom notifications via a new
  `on_custom_notification` hook
- adds integration coverage that sends a custom client notification end-to-end
  and asserts the server sees the method and payload

Test:

```shell
cargo test -p rmcp --features client test_custom_client_notification_reaches_server
```
2025-12-01 15:58:18 -05:00
..
client_json_rpc_message_schema.json feat: add support for custom client notifications (#556) 2025-12-01 15:58:18 -05:00
client_json_rpc_message_schema_current.json feat: add support for custom client notifications (#556) 2025-12-01 15:58:18 -05:00
server_json_rpc_message_schema.json feat(tool): add _meta to tool definitions (#534) 2025-11-11 09:27:52 +08:00
server_json_rpc_message_schema_current.json feat(tool): add _meta to tool definitions (#534) 2025-11-11 09:27:52 +08:00