Skip to content

chore: bump rmcp 0.12 -> 1.5 + schemars 0.8 -> 1.2#30

Merged
radiosilence merged 1 commit intomainfrom
chore/rmcp-1-schemars-1
Apr 18, 2026
Merged

chore: bump rmcp 0.12 -> 1.5 + schemars 0.8 -> 1.2#30
radiosilence merged 1 commit intomainfrom
chore/rmcp-1-schemars-1

Conversation

@radiosilence
Copy link
Copy Markdown
Owner

Summary

Two bumps that have to travel together — `rmcp` re-exports `schemars`, so a mismatched pair breaks the derive.

`rmcp` 0.12 → 1.5

The 1.0 release added `#[non_exhaustive]` to model structs, so `ServerInfo { ... }` and `Implementation { ... }` struct-literal construction no longer compiles. Rewrote `get_info()` using the builder API that\x27s been there all along:

```rust
let server_info = Implementation::new("fastmail-cli", env!("CARGO_PKG_VERSION"))
.with_title("Fastmail MCP Server")
.with_website_url("https://github.com/radiosilence/fastmail-cli\");

ServerInfo::new(ServerCapabilities::builder().enable_tools().build())
.with_protocol_version(rmcp::model::ProtocolVersion::V_2024_11_05)
.with_server_info(server_info)
.with_instructions(...)
```

Reads cleaner than the old literal form. The proc-macros (`#[tool]`, `#[tool_router]`, `#[tool_handler]`) are unchanged in surface.

`schemars` 0.8 → 1.2

One derive site (`GraphqlRequest`). No API change hits our usage; the `visit` module / `RootSchema` removals don\x27t touch us.

Dead-code warning

Added `#[allow(dead_code)]` on `tool_router: ToolRouter`. The `#[tool_handler]` proc-macro references it in its expansion, but dead-code analysis can\x27t see through the macro — same pattern in rmcp\x27s own tests.

Test plan

  • `cargo test` — 89 passing
  • `cargo clippy --all-targets -- -D warnings` — clean (including Rust 1.95 lints)
  • `cargo fmt -- --check` — clean
  • CI green
  • Smoke test: `fastmail-cli mcp` starts, Claude Desktop can hit `schema_sdl` and `graphql` tools (MCP integration only verified once deployed — local `cargo test` doesn\x27t cover the stdio transport path)

🤖 Generated with Claude Code

rmcp went 1.0 which added #[non_exhaustive] to ServerInfo and
Implementation. Can't use struct-literal construction anymore —
switched to the builder API (ServerInfo::new / Implementation::new
with with_* chained setters). Reads cleaner anyway.

schemars is bumped alongside because rmcp re-exports it. The only
derive site is GraphqlRequest; 1.x is a drop-in there.

Added #[allow(dead_code)] on tool_router field — proc-macro generated
code references it but dead-code analysis can't see through the macro.

All 89 tests pass, clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@radiosilence radiosilence merged commit ff741dc into main Apr 18, 2026
3 checks passed
@radiosilence radiosilence deleted the chore/rmcp-1-schemars-1 branch April 18, 2026 10:58
@radiosilence radiosilence mentioned this pull request Apr 18, 2026
3 tasks
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