pub struct McpServer {
pub id: i64,
pub name: String,
pub server_type: McpServerType,
pub config: McpServerConfig,
pub enabled: bool,
pub auto_start: bool,
pub env: Vec<McpEnvEntry>,
pub created_at: DateTime<Utc>,
pub last_connected_at: Option<DateTime<Utc>>,
pub is_valid: bool,
pub last_error: Option<String>,
}Expand description
An MCP server that exists in the system with a database ID.
This represents a persisted MCP server with all its metadata.
Use NewMcpServer for servers that haven’t been persisted yet.
Fields§
§id: i64Database ID of the server (always present for persisted servers).
name: StringUser-friendly name for the server.
server_type: McpServerTypeConnection type (stdio or SSE).
config: McpServerConfigExecution configuration (command, args, URL, etc.).
enabled: boolWhether tools from this server are included in chat.
auto_start: boolWhether to start this server when gglib launches.
env: Vec<McpEnvEntry>Environment variables for the server process.
created_at: DateTime<Utc>When the server was added.
last_connected_at: Option<DateTime<Utc>>Last successful connection time.
is_valid: boolWhether the server configuration is valid (exe_path exists and is executable).
Updated during startup validation.
last_error: Option<String>Last validation or runtime error message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for McpServer
impl<'de> Deserialize<'de> for McpServer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for McpServer
impl RefUnwindSafe for McpServer
impl Send for McpServer
impl Sync for McpServer
impl Unpin for McpServer
impl UnwindSafe for McpServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more