Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment variables

Set these in the MCP client’s server entry for the server, and in your shell for CLI commands. Both must agree on MEMORS_HOME and MEMORS_KB to see the same file.

Storage and selection

VariableDefaultEffect
MEMORS_HOME~/.memors-mcpBase directory. Knowledge bases live in $MEMORS_HOME/kb/; overrides in $MEMORS_HOME/profiles.json
MEMORS_KBdefaultKnowledge-base name; the file is $MEMORS_HOME/kb/<name>.db. Must match ^[A-Za-z0-9._-]{1,64}$

Retrieval

VariableDefaultEffect
MEMORS_MODELgranite-small-r2Embedding model id from memors-mcp model ls. Queries use this model’s vectors; missing vectors are embedded in the background at server start
MEMORS_PROFILEdefaultRanking profile for the server and the UI (memors-mcp profiles show lists them). The CLI search --profile flag defaults to it
MEMORS_RERANKunset1 loads the cross-encoder reranker. Only profiles with rerank on (precise) use it. Measured slower and worse than the default; experiments only
MEMORS_RERANKERms-marco-minilmReranker id to load when MEMORS_RERANK=1

Logging and observability

VariableDefaultEffect
MEMORS_LOG_FORMATtexttext or json. Logs always go to stderr
MEMORS_LOG_LEVELinfodebug, info, warn or error. Unknown values fall back to the default with one warning
MEMORS_HTTP_ADDRempty (stdio)Same as serve --http: serve MCP over HTTP at http://<addr>/mcp and the live web UI at http://<addr>/. Loopback addresses only, unless serve --allow-remote
MEMORS_HTTP_AUTHtoken when remote or behind a proxy, else noneSame as serve --auth. none is refused on an exposed address unless mTLS is on
MEMORS_HTTP_TOKEN_FILE<MEMORS_HOME>/http-tokenBearer token file for serve --http. Created with mode 0600 when missing; refused if other users can read it
MEMORS_TLS_CERT / MEMORS_TLS_KEYemptySame as serve --tls-cert / --tls-key: PEM certificate (chain) and key; the server speaks HTTPS
MEMORS_TLS_CLIENT_CAemptySame as serve --tls-client-ca: require client certificates signed by this PEM CA (mTLS)
MEMORS_PUBLIC_URLemptySame as serve --public-url: the URL clients use. Required when remote or behind a proxy
MEMORS_METRICS_ADDRempty (off)Same as serve --metrics-addr: serve Prometheus metrics at http://<addr>/metrics. Loopback addresses only
MEMORS_QUERY_LOGunset1 records every search in query_log and every tool call in call_log, in the same file. See Call and query logs

Compaction executor (CLI only)

VariableDefaultEffect
MEMORS_OLLAMA_URLhttp://127.0.0.1:11434Ollama endpoint for memors-mcp compact --executor ollama. Loopback only unless --allow-remote
MEMORS_OLLAMA_MODELnone (required)Ollama model name for the executor. Use a non-thinking instruction model

Renamed

Before the rename to memors-mcp every variable here was spelled MEMO_* (for example MEMO_KB). The old names are not read any more: rename them in client configs and service files, as described in Upgrading from memo-mcp. The JOURNAL_TOKEN and JOURNAL_PATH aliases are gone as well.

Not configurable

  • The model cache, ~/.cache/memors-mcp/models, is fixed per user.
  • SQLite pragmas are fixed: WAL, synchronous=NORMAL, busy_timeout=5000, foreign keys on.