Skip to main content

Module mcp

Module mcp 

Source

Structs§

AuditLog
Append-only JSON Lines audit log. One file handle, serialised by a Mutex so concurrent writes from future multi-threaded clients stay atomic on POSIX. Each entry records timestamp, tool name, sanitised arguments, and outcome.
JsonRpcError
A JSON-RPC 2.0 error object.
JsonRpcRequest
A JSON-RPC 2.0 request.
JsonRpcResponse
A JSON-RPC 2.0 response.
McpContext
Context passed to dispatch and tool handlers. Holds the SSH config path, runtime options, and an optional audit log handle.
McpOptions
Runtime options for the MCP server. Built from CLI flags by main.

Enums§

AuditOutcome

Functions§

default_audit_log_path
Resolve the default audit log path (~/.purple/mcp-audit.log).
run
Run the MCP server, reading JSON-RPC requests from stdin and writing responses to stdout. Blocks until stdin is closed.