Skip to content

Quickstart (MCP)

The fastest way to use mnesio is over the Model Context Protocol. The mnesio-mcp binary speaks JSON-RPC over stdio and exposes three tools any MCP-capable agent can call.

  1. Build the MCP server.

    Terminal window
    cargo build --release -p mnesio-mcp

    The binary lands at target/release/mnesio-mcp.

  2. Register it with your agent. Add an entry to the client’s MCP config, pointing command at the built binary:

    {
    "mcpServers": {
    "mnesio": {
    "command": "/abs/path/to/mnesio/target/release/mnesio-mcp",
    "args": []
    }
    }
    }
  3. Restart the client and use the tools. The agent can now persist and recall memories across sessions.

ToolWhat it does
mnesio_write_memoryAppend a memory to the log (returns its id).
mnesio_searchHybrid retrieve the top-k relevant memories for a query.
mnesio_record_outcomeRecord a task outcome that feeds the procedural compiler.

You can probe the server by hand — it follows MCP protocol version 2024-11-05:

Terminal window
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
| ./target/release/mnesio-mcp

You should see an initialize result followed by the three tool descriptors.

Next: the full agent integration guide, or learn how the substrate works in Architecture.