Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 7 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ reqwest = { version = "0.13.1", default-features = false, features = [
"json",
"rustls"
] }
rmcp = { version = "0.12", features = ["server", "transport-io"] }
schemars = "0.8"
rmcp = { version = "1", features = ["server", "transport-io"] }
schemars = "1"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
thiserror = "2.0.17"
Expand Down
26 changes: 11 additions & 15 deletions src/mcp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub struct GraphqlRequest {
#[derive(Clone)]
pub struct FastmailMcp {
schema: Arc<FastmailSchema>,
#[allow(dead_code)] // referenced by #[tool_handler] macro expansion
tool_router: ToolRouter<Self>,
}

Expand Down Expand Up @@ -109,17 +110,14 @@ impl FastmailMcp {
#[tool_handler]
impl ServerHandler for FastmailMcp {
fn get_info(&self) -> ServerInfo {
ServerInfo {
protocol_version: rmcp::model::ProtocolVersion::V_2024_11_05,
capabilities: ServerCapabilities::builder().enable_tools().build(),
server_info: Implementation {
name: "fastmail-cli".to_string(),
title: Some("Fastmail MCP Server".to_string()),
version: env!("CARGO_PKG_VERSION").to_string(),
icons: None,
website_url: Some("https://github.com/radiosilence/fastmail-cli".to_string()),
},
instructions: Some(
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(
"Fastmail MCP Server — GraphQL interface for email operations.\n\n\
## Getting Started\n\
1. Call `schema_sdl` to get the full GraphQL schema\n\
Expand All @@ -145,10 +143,8 @@ impl ServerHandler for FastmailMcp {
## Safety Rules\n\
- NEVER send without showing preview first\n\
- NEVER confirm send without explicit user approval\n\
- mark_as_spam affects future filtering — always preview first"
.to_string(),
),
}
- mark_as_spam affects future filtering — always preview first",
)
}
}

Expand Down
Loading