Skip to main content

mcp_audit_context

Function mcp_audit_context 

Source
fn mcp_audit_context(req_ctx: &RequestContext<RoleServer>) -> AuditContext
Expand description

Build the audit correlation context for one MCP JSON-RPC request.

rmcp exposes a stable request id for both stdio and HTTP transports, but it does not expose the socket peer address at this layer. Do not synthesize a fake IP; the request id is still enough to correlate all audit events caused by one tool call.