Update to rmcp 1.1.0 (#7619)

Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
Jack Amadeo
2026-03-05 21:40:52 -05:00
committed by GitHub
parent abadb87892
commit 325bf396af
61 changed files with 729 additions and 1757 deletions
+6 -12
View File
@@ -1,7 +1,7 @@
use crate::session::{ExpectedSessionId, SESSION_ID_HEADER};
use rmcp::model::{
CallToolResult, ClientNotification, ClientRequest, Content, ErrorCode, Implementation, Meta,
ProtocolVersion, ServerCapabilities, ServerInfo,
CallToolResult, ClientNotification, ClientRequest, Content, ErrorCode, Implementation,
InitializeResult, Meta, ProtocolVersion, ServerCapabilities, ServerInfo,
};
use rmcp::service::{DynService, NotificationContext, RequestContext, ServiceExt, ServiceRole};
use rmcp::transport::streamable_http_server::{
@@ -122,16 +122,10 @@ impl McpFixtureServer {
#[tool_handler]
impl ServerHandler for McpFixtureServer {
fn get_info(&self) -> ServerInfo {
ServerInfo {
protocol_version: ProtocolVersion::V_2025_03_26,
capabilities: ServerCapabilities::builder().enable_tools().build(),
server_info: Implementation {
name: "mcp-fixture".into(),
version: "1.0.0".into(),
..Default::default()
},
instructions: Some("Test server with get_code and get_image tools.".into()),
}
InitializeResult::new(ServerCapabilities::builder().enable_tools().build())
.with_protocol_version(ProtocolVersion::V_2025_03_26)
.with_server_info(Implementation::new("mcp-fixture", "1.0.0"))
.with_instructions("Test server with get_code and get_image tools.")
}
}