Documentation / REST API

REST API

A FastAPI server for any non-MCP client. Included out of the box — fastapi, uvicorn, pydantic, and sse-starlette are core dependencies. No extra install flags.

Start the server

Binds to http://127.0.0.1:8912 by default. Ports come from server.mcp_port / server.rest_port in config.

# foreground
memorius serve-rest

# background daemon
memorius serve-rest --daemon

# stop the daemon
memorius serve-rest --stop

Flags: --port, --host (default 127.0.0.1), --daemon, --stop, --pid-file, and --tls-cert / --tls-key (PEM) for HTTPS.

Security

ControlBehavior
API key authSet MEMORIUS_API_KEY; send as Authorization: Bearer <key>.
Rate limiting500 requests/minute per IP.
Body limitMaximum request body size enforced by middleware.
CORSRestrictive by default — Obsidian app + localhost only.
Daemon mode--daemon / --stop with PID-file management.

Read endpoints

MethodPathDescription
GET/healthHealth check (/health/live, /health/ready also exposed).
GET/statusSystem status.
GET/statsFull vault + memory + graph stats.
GET/doctorRun the 6 health checks.
GET/vaultBrowse the vault hierarchy.
GET/diariesList recent diary entries.
GET/memoriesList memories with cursor pagination.
GET/memory/{id}Get one memory by UUID.
GET/contradictions/{id}Memories that contradict a given memory.
GET/obsidianList notes in an Obsidian vault.
GET/metricsServer metrics.

Write endpoints

MethodPathDescription
POST/storeStore a memory.
POST/searchSemantic search.
POST/mineExtract memories from a transcript.
POST/diaryWrite a diary entry.
POST/consolidateMerge duplicate memories (requires confirm=true).
POST/extractLLM extraction from a conversation.
POST/factcheckFact-check a statement against the vault.
POST/contextFormatted context block for injection.
POST/pruneFind and archive stale memories.
POST/obsidian/importImport Obsidian notes as memories.
POST/obsidian/exportExport memories as Obsidian notes.
PATCH/memory/{id}Update a memory's content/metadata.
DELETE/memory/{id}Delete a memory.

Graph & visualizer

MethodPathDescription
GET/graph/dataGraph topology as JSON.
GET/graph/viewServed interactive graph visualization.
GET/visualizeStandalone HTML graph export.

Repository

Memorius is MIT-licensed and fully open source. Star the repo, open an issue, or dig into the source on GitHub.