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

CLI flags

The llm-mem-mcp binary accepts these flags. They override both the config file and environment variables.

llm-mem-mcp [OPTIONS]

General

FlagShortTypeDefaultWhat it does
--config <PATH>-cpathauto-discoverPath to the config file. If not given, searches ./config.toml, ~/.config/llm-mem/config.toml, /etc/llm-mem/config.toml.
--agent <ID>stringnoneDefault agent_id for all tool calls. Overrides the per-tool agent_id parameter when not set.
--proxy <URL>stringnoneProxy URL for model downloads. Format: http://host:port or http://user:pass@host:port. Overrides HTTPS_PROXY.
--banks-dir <PATH>pathfrom configOverride vector_store.banks_dir.
--generate-configboolfalsePrint a commented config template to stdout and exit.

LLM behavior

FlagTypeDefaultWhat it does
--no-grammarboolfalseDisable grammar-constrained sampling for local LLM structured output. Grammar is enabled by default.
--no-structured-outputboolfalseDisable structured output mode for API LLM. Structured output is enabled by default.
--request-format <FMT>stringautoauto, rig, or raw. See [llm] request_format. Invalid values cause the server to exit.

Model caching

FlagTypeDefaultWhat it does
--no-cache-modelboolfalseDon’t cache models in ~/.cache/llm-mem/models. Caching is enabled by default.
--cache-dir <PATH>path~/.cache/llm-mem/modelsCustom cache directory.

Examples

# Use a specific config file
llm-mem-mcp --config /etc/llm-mem/prod.toml

# Run with raw HTTP (skip rig-core) against a self-hosted llama.cpp
llm-mem-mcp --request-format raw

# Force re-download the model (skip cache)
llm-mem-mcp --no-cache-model

# Pre-populate the cache, then run normally
llm-mem-mcp --cache-dir /mnt/fast/models

# Use a different banks directory
llm-mem-mcp --banks-dir /mnt/data/banks

# Print the config template
llm-mem-mcp --generate-config > config.toml

Standalone CLI

The llm-mem (no -mcp suffix) binary has a different flag set. It has subcommands like search, list, stats, db, etc. See CLI overview.

Next