mcp-protocol 0.2.7

Protocol definitions for the Model Context Protocol (MCP)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// mcp-protocol/src/types/server.rs
use serde::{Deserialize, Serialize};

/// Information about the server
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ServerInfo {
    pub name: String,
    pub version: String,
}

/// Enum representing server state
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ServerState {
    Created,
    Initializing,
    Ready,
    ShuttingDown,
}