Repository navigation
Description
Describe the bug
rmcp 3.9.0 silently drops unknown top-level fields when it deserializes ServerCapabilities. An MCP gateway that reads and forwards capabilities can therefore lose fields advertised by the upstream server. For example, ChatGPT looks for capabilities.events in initialize or server/discover responses to discover MCP Events. MCP Events documentation
To reproduce
Create a Cargo binary and add these dependencies to Cargo.toml:
[dependencies]
rmcp = { version = "=3.9.0", default-features = false, features = ["server"] }
serde_json = "1"Put this in src/main.rs and run cargo run:
use rmcp::model::ServerCapabilities;
use serde_json::json;
fn main() {
let input = json!({"tools": {}, "events": {}});
let capabilities: ServerCapabilities = serde_json::from_value(input.clone()).unwrap();
let output = serde_json::to_value(capabilities).unwrap();
println!("input: {input}");
println!("output: {output}");
}Expected behavior
Both tools and events should survive the JSON round trip. The MCP schema permits additional server capability fields. MCP ServerCapabilities schema
Logs
Actual output with the published rmcp 3.9.0 crate:
input: {"events":{},"tools":{}}
output: {"tools":{}}
Additional context
We carry a local #[serde(flatten)] patch to preserve additional fields. An earlier Rust SDK PR proposed the same capability behavior, and the Python SDK has a parallel report. Rust SDK PR #1170 · Python SDK issue #3640
AI assistance: I used Codex to search for prior reports, inspect the SDK source, write and run the minimal reproduction, and draft this issue.
Activity
github-actions commentedon Nov 12, 2026
@jokemanfire is on triage rotation this week and is the reviewer for this one.
Codex labeled this bug / P1 (T-model). Please confirm or correct those labels.
Automated triage. Labels are a first pass and the assigned maintainer has the final say.