Skip to main content

Crate trusty_memory

Crate trusty_memory 

Source
Expand description

MCP server (stdio + HTTP/SSE) for trusty-memory.

Why: Claude Code and other MCP-aware clients integrate with trusty-memory through the standardized Model Context Protocol; we expose memory + KG tools so they can be called by name. What: Provides run_stdio (JSON-RPC 2.0 over stdin/stdout) and run_http (axum HTTP/SSE stub), plus an AppState that carries the shared PalaceRegistry, on-disk data root, and a lazily-initialized embedder. Test: cargo test -p trusty-memory-mcp validates handshake + dispatch.

Re-exports§

pub use service::MemoryMcpService;
pub use tools::MemoryMcpServer;

Modules§

commands
Per-subcommand handlers for the trusty-memory binary.
openrpc
OpenRPC 1.3.2 service description for trusty-memory-mcp.
service
ServiceDescriptor impl for the trusty-memory MCP service.
tools
MCP tool surface for trusty-memory.
web
HTTP API + embedded SPA shell for the trusty-memory admin UI.

Structs§

AppState
Shared application state passed to every request handler.

Enums§

DaemonEvent
Live daemon events broadcast to connected SSE subscribers.

Functions§

handle_message
Handle a single MCP JSON-RPC message and produce its response.
resolve_palace_registry_dir
Resolve the directory that actually holds the per-palace subdirectories.
run_http
Convenience: bind addr and serve via run_http_on.
run_http_on
Run the optional HTTP/SSE + web admin server.
run_stdio
Run the MCP stdio JSON-RPC 2.0 server loop.