CLI, MCP, and HTTP reference

The commands, tools, and routes you will actually use, with links to the exhaustive generated reference.

This page is the working reference: the commands, tools, and routes you will actually use. The exhaustive generated lists live in the repository.

CLI

npx -y @mem-os/sdk --help
npx -y @mem-os/sdk <command> --help
CommandWhat it does
initInteractive setup; writes ~/.memos/config.json
demo30-second store, restart, recall proof
store <content>Store a memory (--pool, --scope, --type, --ttl)
search <query>Search (--pool, --namespace, --limit, --temporal)
retrieve <id>Fetch one memory by ID
forget <id>Delete with a certificate
graphPrint the graph; --mermaid for a diagram
browseInteractive terminal browser
ingest <path>Ingest Markdown, HTML, or PDF (--watch)
import-external <file>Import ChatGPT or Claude memory (--source)
import <file>Import a chat export (--from chatgpt|claude|slack)
learn "<lesson>"Capture procedural guidance
consolidateMerge, archive, decay (--dry-run, --watch)
dreamConsolidation with a report (--json)
encrypt / decryptEncryption at rest
statsToken-savings telemetry
healthHygiene and usefulness report
auditTamper chain, provenance, deletion certificates
evalRetrieval eval on your own corpus
explain "<query>"Show ranking candidates and scores
doctorStore, embedder, and endpoint diagnostics
connect <target>Write MCP config for a harness
mcpStart the MCP server (--http for Streamable HTTP)
trioShow or launch the full AI Trio

The CLI has more than 50 commands, including tags, TTL, reminders, image memory, profiles, handoff, sync, and shell completion. Run --help for the current build.

MCP tools

GroupTools
Corememos_store, memos_search, memos_retrieve, memos_forget
Contextmemos_context, memos_context_pack, memos_profile, memos_handoff
Graphmemos_graph, memos_link, memos_history, memos_revert
Timememos_search_temporal, memos_set_validity, memos_supersede, memos_reminders
Trustmemos_set_trust, memos_review, memos_quarantine_release
Ingestionmemos_ingest, memos_forget_source, memos_deletion_status
Maintenancememos_consolidate, memos_reindex, memos_diagnostics, memos_usage
Imagesmemos_image_add, memos_image_recall, memos_image_search
Explainmemos_explain

The tool profile can be trimmed per harness, so not every client sees every tool. See the MCP tools reference.

HTTP API

Start the server:

pip install mem-os-python
memos-server
# http://localhost:7400
GroupRoutes
MemoryPOST /api/mem/store, /retrieve, /search, /forget, /update
GraphGET /api/mem/graph, POST /api/mem/neighbours, /link
ContextPOST /api/mem/context-pack, /profile, /overview, /brief
TimePATCH /api/mem/mem/{id}/ttl, DELETE the same path
TagsPOST /api/mem/mem/{id}/tags, GET /api/mem/tags/{tag}
IngestionPOST /api/mem/ingest, /forget-source, GET /deletion-status/{id}
AuditPOST /api/mem/audit, GET /api/mem/export

The full route list, request bodies, and status codes are in the HTTP API reference.

TypeScript SDK

import { MemOS } from "@mem-os/sdk";

const memos = new MemOS({
  dbPath: "./memos.db",
  namespace: "project:app",
});

await memos.store("Deploys go through the staging cluster first");
const hits = await memos.search("deploy process");
const pack = await memos.contextPack("how do we deploy?", { tokenBudget: 800 });

The SDK exposes the same operations as the CLI and MCP server. See the TypeScript API.

Errors

Every failure has a stable code and a remediation hint:

memos explain-error            # list all codes
memos explain-error MEM-1001   # explain one

Common categories: store not found, embedding provider unavailable, invalid namespace, schema migration required, and MCP handshake failure.