Skip to main content

Module mcp

Module mcp 

Source
Expand description

MCP (Model Context Protocol) server for Solo.

Exposes four tools to MCP clients (Claude Desktop, Cursor, etc.):

  • memory.remember(content, source_type?, source_id?) — store an episode. Returns the new MemoryId.
  • memory.recall(query, limit?) — vector search. Returns the top-K matches with content + tier + status.
  • memory.forget(memory_id, reason?) — soft-delete an episode.
  • memory.inspect(memory_id) — return the full episode record.

§Transport

serve_stdio wires the server to stdin/stdout for use as a subprocess (“claude_desktop_config.json or ~/.cursor/mcp.json invokes solo mcp-stdio”). The function awaits a graceful shutdown when stdin closes (parent disconnects) — same lifecycle as solo daemon’s Ctrl+C path.

§What’s deferred

  • SSE/HTTP transports — rmcp ships them, but v0.1 ships stdio only.
  • prompts/ and resources/ capabilities — not needed for the four-tool surface; ServerHandler defaults return empty lists.
  • Tool argument validation beyond JSON Schema typing — we trust rmcp to deserialize per the schema, then serde-deserialize into our typed param structs. Bad inputs surface as clear errors.

Structs§

ForgetArgs
InspectArgs
RecallArgs
RememberArgs
SoloMcpServer
The MCP server. Cheap to clone — every field is Arc-cloneable.

Functions§

serve_stdio
Convenience: run the server over stdio and await its termination. Returns when stdin closes (parent disconnect) or the runtime exits.