pub struct SessionEvent {
pub session_id: String,
pub proxy: String,
pub started_at: i64,
pub client_name: Option<String>,
pub client_version: Option<String>,
pub client_platform: Option<String>,
}Expand description
Emitted once per MCP session, when the proxy intercepts the initialize handshake.
The clientInfo field in the MCP initialize request is the authoritative source
of client identity — we don’t guess from headers or user-agent strings.
Fields§
§session_id: StringMCP session ID — primary key in the sessions table.
proxy: StringWhich proxy this session connected through.
started_at: i64Unix milliseconds (UTC) of the initialize request.
client_name: Option<String>Client name from clientInfo.name (e.g., “claude-desktop”, “cursor”).
None if the client omits clientInfo (non-compliant but possible).
client_version: Option<String>Client version from clientInfo.version (e.g., “1.2.0”).
client_platform: Option<String>Normalized platform identifier derived from client_name. Values: “claude”, “chatgpt”, “vscode”, “cursor”, “unknown”. Normalization happens at write time via a static lookup table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionEvent
impl RefUnwindSafe for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnsafeUnpin for SessionEvent
impl UnwindSafe for SessionEvent
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