Codebase Memory MCP ships with sensible defaults out of the box, but several settings are worth tuning for your workflow — especially auto-indexing behaviour and the file extensions the indexer recognises. Settings live in two places: a persistent key-value store managed by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DeusData/codebase-memory-mcp/llms.txt
Use this file to discover all available pages before exploring further.
config subcommand, and optional JSON files in your project or home directory for extension mapping.
The config Subcommand
Available Settings
| Key | Type | Default | Description |
|---|---|---|---|
auto_index | bool | false | Enable automatic indexing on MCP session start. New projects are indexed immediately; previously-indexed projects are registered with the background watcher. |
auto_index_limit | int | 50000 | Maximum number of files to consider when auto-indexing a new project. Projects larger than this limit are skipped until indexed explicitly. |
ui-lang | string | auto | Pin the graph UI display language. Accepted values: en, zh, or auto (follows browser locale). |
Custom File Extensions
By default, the indexer recognises files by their standard extension. You can map additional extensions to supported languages using JSON config files — useful for framework-specific conventions like.blade.php (Laravel), .mjs (ES modules), or .phtml (legacy PHP templates).
Per-Project Config
Create.codebase-memory.json in your repository root:
Global Config
Create (or edit)~/.config/codebase-memory-mcp/config.json (or $XDG_CONFIG_HOME/codebase-memory-mcp/config.json if XDG_CONFIG_HOME is set):
Precedence: per-project config overrides global config for any conflicting extension key. Unknown language values (values that don’t match any bundled grammar) are silently skipped. Missing config files are ignored without error.
File Ignore Patterns
The indexer uses a layered ignore system, evaluated in order:Hardcoded patterns
Always ignored regardless of any config:
.git, node_modules, and similar build artifact / dependency directories compiled into the binary..gitignore hierarchy
The full
.gitignore hierarchy is respected, including nested .gitignore files in subdirectories. Symlinks are always skipped.Persistence Directory
All SQLite databases are stored at~/.cache/codebase-memory-mcp/ by default. Override this with the CBM_CACHE_DIR environment variable:
Environment Variables
For full details on all environment variables — includingCBM_CACHE_DIR, CBM_LOG_LEVEL, CBM_WORKERS, CBM_DIAGNOSTICS, CBM_DUMP_VERIFY_MIN_RATIO, and CBM_DOWNLOAD_URL — see the Environment Variables reference page.
A quick example for the two most commonly needed variables:
stderr; stdout is reserved for MCP JSON-RPC. Set CBM_LOG_LEVEL=none to suppress all output.