Skip to main content

Configuration

Set parameters in a YAML file or environment variables. If a parameter appears in both, the environment variable takes precedence.

Naming rule​

For an environment variable, replace dots in the parameter name with underscores and add the MNEMOS_ prefix.

database.password → MNEMOS_DATABASE_PASSWORD
embeddings.base_url → MNEMOS_EMBEDDINGS_BASE_URL
recall.min_similarity → MNEMOS_RECALL_MIN_SIMILARITY
consolidate.decay_half_life → MNEMOS_CONSOLIDATE_DECAY_HALF_LIFE

Required​

variablewhat it is
MNEMOS_DATABASE_PASSWORDthe database user's password
MNEMOS_AUTH_ISSUER_URLyour OAuth server's address
MNEMOS_AUTH_PUBLIC_URLmnemos's public address

Both are required: there is no unauthenticated mode, and the server will not start without them.

Database​

variabledefault
MNEMOS_DATABASE_HOSTnone — required (or MNEMOS_DATABASE_DSN)
MNEMOS_DATABASE_PORT5432
MNEMOS_DATABASE_USERmnemos
MNEMOS_DATABASE_NAMEmnemos
MNEMOS_DATABASE_SSLMODEdisable
MNEMOS_DATABASE_MAX_CONNS8

Use MNEMOS_DATABASE_DSN to provide a connection string instead of the individual database parameters.

The database user needs permission to create the vector, pg_trgm and btree_gist extensions. They are installed on the first start.

Embeddings​

variabledefault
MNEMOS_EMBEDDINGS_BASE_URLnone — required
MNEMOS_EMBEDDINGS_MODELbge-m3
MNEMOS_EMBEDDINGS_DIMENSIONS1024
MNEMOS_EMBEDDINGS_API_KEYollama
MNEMOS_EMBEDDINGS_TIMEOUT30s
MNEMOS_EMBEDDINGS_MAX_CHARS8000

Use a service with a /v1/embeddings API and 1024 dimensions. Examples for Ollama and OpenAI.

Server​

variabledefault
MNEMOS_SERVER_ADDR:8090
MNEMOS_LOG_LEVELinfo
MNEMOS_LOG_FORMATjson
MNEMOS_OBSERVABILITY_METRICS_ENABLEDtrue

Embedding queue​

variabledefault
MNEMOS_EMBED_QUEUE_WORKERS0
MNEMOS_EMBED_QUEUE_DEPTH1024
MNEMOS_EMBED_QUEUE_SWEEP_LIMIT500
MNEMOS_EMBED_QUEUE_SWEEP_INTERVAL15m

With MNEMOS_EMBED_QUEUE_WORKERS=0, processing runs during each write. A value of 2 or more enables background processing for some data. Those notes appear in search by meaning after processing completes.

Processing older notes​

variabledefault
MNEMOS_CONSOLIDATE_ENABLEDtrue
MNEMOS_CONSOLIDATE_INTERVAL15m
MNEMOS_CONSOLIDATE_DECAY_HALF_LIFE30d
MNEMOS_CONSOLIDATE_DECAY_FLOOR0.05
MNEMOS_CONSOLIDATE_DEDUP_SIMILARITY0.9

MNEMOS_CONSOLIDATE_DECAY_HALF_LIFE sets how long an unused note takes to lose half its relevance weight.

:::warning One instance per database Run one MCP server per database. For a separate HTTP API, use the api service from the installation example. :::

variabledefault
MNEMOS_RECALL_MIN_SIMILARITY0.45
MNEMOS_RECALL_MAX_QUERIES6
MNEMOS_RECALL_MAX_FACTS_PER_SOURCE2
MNEMOS_RECALL_MAX_FACTS_PER_RELATION3
MNEMOS_RECALL_HOP_DEPTH2
MNEMOS_RECALL_IMPORTANCE_WEIGHT0.15

Start with the defaults. If you change the model, check search quality with your own queries.

Configuration file​

Example YAML:

database:
host: postgres
password: change-me
embeddings:
base_url: http://ollama:11434/v1
model: bge-m3
dimensions: 1024
auth:
issuer_url: https://auth.example.com
public_url: https://mnemos.example.com
consolidate:
decay_half_life: 30d

Pass the file path with --config.