MDDB Configuration Reference

Complete reference for all MDDB configuration parameters.

Precedence order: CLI flags > environment variables > YAML config file > defaults

Table of Contents


General / Core

Env VarDefaultTypeDescription
MDDB_CONFIG""stringPath to YAML config file (also -config / -c CLI flag)
MDDB_PATH"mddb.db"stringPath to the BoltDB database file (also --db CLI flag, database.path in YAML)
MDDB_MODE"wr"stringAccess mode: "read", "write", or "wr" (read+write) (also --mode CLI flag, database.mode in YAML)
MDDB_PANEL_MODE"internal"stringPanel mode: "internal" (CORS enabled) or "external" (reverse proxy)
MDDB_CORS_ORIGIN"*"stringCORS Access-Control-Allow-Origin header value
MDDB_METRICS"true"boolEnable Prometheus-compatible /metrics endpoint
MDDB_SEARCH_STATS"true"boolInclude searchStats in search responses

HTTP Server

Env VarDefaultTypeCLI FlagDescription
MDDB_HTTP_ENABLEDtruebool--http-enabledEnable/disable the HTTP API server
MDDB_HTTP_ADDR":11023"string--http-addrHTTP API listen address
MDDB_HTTP_PORTโ€”stringโ€”Plain port number (converted to ":PORT")
MDDB_ADDR":11023"stringโ€”Legacy alias for MDDB_HTTP_ADDR

gRPC Server

Env VarDefaultTypeCLI FlagDescription
MDDB_GRPC_ENABLEDtruebool--grpc-enabledEnable/disable the gRPC server
MDDB_GRPC_ADDR":11024"string--grpc-addrgRPC listen address
MDDB_GRPC_PORTโ€”stringโ€”Plain port number (converted to ":PORT")

MCP (Model Context Protocol)

Env VarDefaultTypeCLI FlagDescription
MDDB_MCP_ENABLEDtruebool--mcp-enabledEnable/disable the MCP server
MDDB_MCP_ADDR":9000"string--mcp-addrMCP HTTP listen address
MDDB_MCP_PORTโ€”stringโ€”Plain port number (converted to ":PORT")
MDDB_MCP_STDIOfalsebool--mcp-stdioRun MCP in stdio mode (for Claude Desktop)
MDDB_MCP_DOMAIN""stringโ€”MCP server domain
MDDB_MCP_CONFIG""stringโ€”Path to YAML with custom MCP tool definitions
MDDB_MCP_BUILTIN_TOOLStrueboolโ€”Set to false to expose only custom YAML tools
MDDB_MCP_MODE"wr"stringโ€”MCP access mode: "read", "write", or "wr"

MCP API Key Authentication

Env VarDefaultTypeDescription
MDDB_MCP_API_KEY_ENABLEDfalseboolEnable API key authentication for MCP endpoints
MDDB_MCP_API_KEYS""stringStatic API keys: key1:name1,key2:name2
MDDB_MCP_API_KEY_CACHE_TTL"5m"durationCache TTL for dynamic API key lookups

MCP Rate Limiting

Env VarDefaultTypeDescription
MDDB_MCP_RATE_LIMIT_ENABLEDfalseboolEnable per-client rate limiting for MCP
MDDB_MCP_RATE_LIMIT_REQUESTS100intMaximum requests per window
MDDB_MCP_RATE_LIMIT_WINDOW"60s"durationRate limit time window
MDDB_MCP_RATE_LIMIT_BURST20intMaximum burst size
MDDB_MCP_RATE_LIMIT_BY"ip"stringRate limit key: "ip", "api_key", or "session"

MCP Logging

Env VarDefaultTypeDescription
MDDB_MCP_LOGGING_ENABLEDfalseboolEnable structured JSON audit logs for MCP requests
MDDB_MCP_LOGGING_LEVEL"info"stringMinimum log level: "debug", "info", "warn", "error"

HTTP/3 (QUIC)

Env VarDefaultTypeCLI FlagDescription
MDDB_HTTP3_ENABLEDfalsebool--http3-enabledEnable HTTP/3 (QUIC) server
MDDB_HTTP3_ADDR":11443"string--http3-addrHTTP/3 listen address
MDDB_HTTP3_PORTโ€”stringโ€”Plain port number (converted to ":PORT")
MDDB_EXTREMEโ€”boolโ€”Legacy alias for MDDB_HTTP3_ENABLED

Authentication

Env VarDefaultTypeDescription
MDDB_AUTH_ENABLEDfalseboolEnable JWT-based authentication
MDDB_AUTH_JWT_SECRET""stringJWT signing secret (required when auth is enabled)
MDDB_AUTH_JWT_EXPIRY"24h"durationJWT token expiry duration
MDDB_AUTH_ADMIN_USERNAME"admin"stringDefault admin username
MDDB_AUTH_ADMIN_PASSWORD""stringDefault admin password

Incident Events (ISO 27001 / SOC 2)

Security and operational incidents are delivered through the existing /v1/webhooks subscription system. A webhook that registers for one of the incident event names receives the same JSON envelope as document-lifecycle events, with the event-specific payload in detail.

EventFired whendetail payload
security.auth_failure_burstN auth failures from the same actor@ip inside the window{actor, ip, count, windowSec}
security.rate_limit_exceededA request is rejected by the HTTP/gRPC rate limiter{clientId, transport}
ops.replication_lag_highFollower lag exceeds threshold on poll{lagMs, thresholdMs}
ops.panic_recoveredAn HTTP handler panicked and was recovered by the middleware{method, path, panic, ip}
ops.disk_usage_highDB filesystem used-% โ‰ฅ threshold{path, usedBytes, totalBytes, usedPct, thresholdPct}
Env VarDefaultTypeDescription
MDDB_INCIDENT_AUTH_THRESHOLD10intFailures per window before firing.
MDDB_INCIDENT_AUTH_WINDOW_SEC60intSliding-window length.
MDDB_INCIDENT_AUTH_COOLDOWN_SEC300intQuiet period after a burst before the same actor@ip can refire.
MDDB_INCIDENT_LAG_THRESHOLD_MS5000intReplication-lag threshold.
MDDB_INCIDENT_LAG_INTERVAL_SEC30intPoll interval.
MDDB_INCIDENT_LAG_COOLDOWN_SEC300intCool-down after a lag event.
MDDB_INCIDENT_DISK_THRESHOLD_PCT85int (1โ€“100)Disk-usage threshold.
MDDB_INCIDENT_DISK_INTERVAL_SEC300intPoll interval.
MDDB_INCIDENT_DISK_COOLDOWN_SEC3600intCool-down after a disk event.

Registering a webhook for incident events:

curl -X POST localhost:11023/v1/webhooks \ -H "Content-Type: application/json" \ -d '{ "url": "https://ops.example.com/mddb-incidents", "events": ["security.auth_failure_burst","ops.panic_recovered","ops.disk_usage_high"] }'

Retries, backoff (0s / 1s / 5s / 15s) and X-MDDB-Event / X-MDDB-Webhook-ID headers are shared with the existing document-lifecycle delivery path.


At-Rest Encryption (ISO 27001 / SOC 2)

Opt-in per-collection AES-256-GCM encryption for documents and revisions. Activation requires both a process-wide key and a per-collection flag โ€” an operator who does neither pays zero runtime cost and stores plaintext like today.

Env VarDefaultTypeDescription
MDDB_ENCRYPTION_KEY(unset)base64 string32 bytes of random key material, base64-encoded. Unset = encryption disabled globally. Invalid base64 or wrong length aborts startup.
MDDB_ENCRYPTION_KEY_ID1integer 1..255Identifier stamped on every new ciphertext (V2 wire format). Pick a fresh value when you rotate so the new entries are distinguishable from legacy ones.
MDDB_ENCRYPTION_KEYS_PREVIOUS(unset)JSON arrayRead-only previous keys for rotation: [{"id":1,"key":"<base64>"}, ...]. KeyID 0 is reserved (legacy V1 marker); collisions with the primary keyID abort startup.

Enabling encryption for a collection:

curl -X PUT localhost:11023/v1/collection-config \ -H "Authorization: Bearer $ADMIN_JWT" \ -d '{"collection":"secrets","encrypted":true}'

Details:

  • Wire format per stored value: MDDB_ENC_V1\x00 (12 B magic) + 12 B nonce + AES-256-GCM ciphertext & auth tag.
  • Backward compat: legacy plaintext documents remain readable even after a collection is flipped to encrypted=true. New writes use ciphertext, old reads transparently passthrough because the magic prefix is absent.
  • Scope: only the docs and rev buckets carry ciphertext. FTS inverted indexes and vector embeddings remain plaintext because they are queryable structures โ€” encrypting them would break search. Document this in your threat model.
  • Key loss is terminal: losing MDDB_ENCRYPTION_KEY makes the corresponding collections unrecoverable. Store the key in an HSM / secret manager and keep an offline escrow.
  • Startup safety: if a collection has encrypted=true but MDDB_ENCRYPTION_KEY is missing, the server refuses to start โ€” writing plaintext into a collection that claims to be encrypted is treated as a compliance failure, not a warning.
  • Bootstrap key: openssl rand -base64 32.

Generate a fresh key:

export MDDB_ENCRYPTION_KEY="$(openssl rand -base64 32)"

Key Rotation (2.9.16+)

The 2.9.16 wire format V2 prefixes every ciphertext with a 1-byte keyID so the encryptor can hold a primary plus any number of read-only previous keys. V1 (2.9.15) ciphertexts continue to decrypt โ€” non-breaking upgrade.

Rotation procedure:

old_key="$MDDB_ENCRYPTION_KEY"
old_id="${MDDB_ENCRYPTION_KEY_ID:-1}" export MDDB_ENCRYPTION_KEY="$(openssl rand -base64 32)"
export MDDB_ENCRYPTION_KEY_ID=2 export MDDB_ENCRYPTION_KEYS_PREVIOUS="[{\"id\":$old_id,\"key\":\"$old_key\"}]" curl -X POST localhost:11023/v1/encryption/rotate \ -H "Authorization: Bearer $ADMIN_JWT" \ -d '{"collection":""}' # empty = all collections curl localhost:11023/v1/encryption/status -H "Authorization: Bearer $ADMIN_JWT" unset MDDB_ENCRYPTION_KEYS_PREVIOUS

The admin panel exposes the same workflow under Sidebar โ†’ Encryption: keyID, per-collection coverage, "Start rotation" button, and a job table.


Audit Log Export (ISO 27001 / SOC 2)

The audit log persists locally to BoltDB by default. For tamper-evident, off-host retention (the auditor expectation), mirror events to an external SIEM webhook or a syslog collector. Local BoltDB remains the source of truth โ€” exporters are best-effort.

Env VarDefaultTypeDescription
MDDB_AUDIT_EXPORT_WEBHOOK_URL(unset)URLEach audit event is POSTed as JSON to this URL with _mddb_event_type:audit decoration. Empty = exporter disabled.
MDDB_AUDIT_EXPORT_WEBHOOK_HEADER(unset)comma-separated listHeaders added to every request: Authorization: Splunk xxx,X-Source: prod.
MDDB_AUDIT_EXPORT_WEBHOOK_INSECURE_TLSfalseboolSkip TLS cert verification โ€” only for self-signed development collectors.
MDDB_AUDIT_EXPORT_SYSLOG_ADDR(unset)host:port or proto://host:portSyslog target. UDP by default; prefix tcp:// for TCP.
MDDB_AUDIT_EXPORT_SYSLOG_FACILITYlocal0facility nameRFC 5424 facility (local0โ€“local7, daemon, auth, authpriv, ...).
MDDB_AUDIT_EXPORT_BUFFER1024integerBounded channel size per exporter. When full, oldest events are dropped (counted as dropped).

Both sinks can run together; per-sink delivery counters are exposed at GET /v1/audit/exporters and rendered in the Security panel.

Quick recipe โ€” Splunk HEC + papertrail-style syslog:

export MDDB_AUDIT_ENABLED=true
export MDDB_AUDIT_EXPORT_WEBHOOK_URL="https://splunk.example/services/collector/raw"
export MDDB_AUDIT_EXPORT_WEBHOOK_HEADER="Authorization: Splunk $HEC_TOKEN"
export MDDB_AUDIT_EXPORT_SYSLOG_ADDR="tcp://logs.papertrailapp.com:12345"

Backup Path Jail (2.9.16+)

/v1/backup and /v1/restore accept a user-supplied path. Without bounds an admin (or an attacker who steals admin creds) could read or overwrite arbitrary files. The 2.9.16 jail confines every backup to a single directory.

Env VarDefaultTypeDescription
MDDB_BACKUP_DIR./backupspathDirectory backups are written to and restored from. Symlinks that escape the jail are rejected; absolute paths and ../ traversal are rejected; empty / NUL bytes are rejected.

No further configuration required โ€” the jail is always on.


Production Hardening (ISO 27001 / SOC 2)

MDDB_PRODUCTION=true is a single switch that fails the server start unless every ISO 27001 / SOC 2 guardrail is satisfied. When unset, the guard logs a one-line warning at boot and continues with the same defaults as before โ€” so existing deployments are unaffected.

Env VarRequired when MDDB_PRODUCTION=trueReason
MDDB_AUTH_ENABLEDtrueA.5.15 / CC6.1 โ€” access control
MDDB_AUTH_JWT_SECRETโ‰ฅ32 bytesA.8.24 / CC6.7 โ€” key strength
MDDB_TLS_ENABLEDtrue (or MDDB_TLS_INSECURE_OK=true as an explicit opt-out for dev)A.8.24 / CC6.7 โ€” encryption in transit
MDDB_CORS_ORIGINexplicit origin list (not *)A.8.23 / CC6.6 โ€” web-origin segmentation
MDDB_AUDIT_ENABLEDtrueA.8.15 / CC7.2 โ€” audit trail
MDDB_RATE_LIMIT_ENABLEDtrueA.5.30 / CC6.6 โ€” resource-exhaustion protection

On a successful production start the server logs:

โœ“ Production guards satisfied (ISO 27001 / SOC 2)

When a requirement is missing, startup is aborted with a line-by-line breakdown pointing at each offending env var.


Rate Limiting (HTTP + gRPC)

Shared sliding-window limiter covering both HTTP and gRPC. Separate from the pre-existing MDDB_MCP_RATE_LIMIT_* budget, which continues to apply to the MCP endpoints only.

Env VarDefaultTypeDescription
MDDB_RATE_LIMIT_ENABLEDfalseboolEnable the limiter. When off, both HTTP and gRPC are passthrough.
MDDB_RATE_LIMIT_REQUESTS100intSustained requests per window.
MDDB_RATE_LIMIT_WINDOW60int secondsWindow length.
MDDB_RATE_LIMIT_BURST50intAdditional allowance before a client is blocked. Effective ceiling = REQUESTS + BURST.
MDDB_RATE_LIMIT_BY"ip"string"ip" (default) or "user". user keys on the authenticated username and falls back to IP for anonymous traffic.

HTTP responses carry X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; rejected requests get 429 Too Many Requests with Retry-After. gRPC rejects with codes.ResourceExhausted. The paths /health, /v1/health, and /metrics are always exempt so monitoring and load-balancer probes never trip the limiter.


Audit Log (ISO 27001 / SOC 2)

Structured authentication and mutation trail persisted to a dedicated audit BoltDB bucket. Events are buffered and flushed asynchronously so hot-path handlers never block on disk I/O. Queryable via admin-only GET /v1/audit.

Env VarDefaultTypeDescription
MDDB_AUDIT_ENABLEDfalseboolEnable the audit log. When disabled, AuditManager is a no-op and /v1/audit returns 404.
MDDB_AUDIT_RETENTION_DAYS90intRetention window. A background trimmer runs every hour and deletes events older than the cutoff.

Query parameters on GET /v1/audit: from / to (RFC3339) or fromNanos / toNanos, actor, action, result (ok/fail), limit (default 100). Response shape: {events: [...], count, dropped} โ€” dropped counts events lost when the in-memory buffer was full.


Embedding / Vector Search

Env VarDefaultTypeDescription
MDDB_EMBEDDING_PROVIDER"" (disabled)stringProvider: "openai", "ollama", "voyage", "cohere", or ""
MDDB_EMBEDDING_API_KEY""stringAPI key (for openai/voyage/cohere)
MDDB_EMBEDDING_API_URL(see below)stringAPI base URL
MDDB_EMBEDDING_MODEL(see below)stringEmbedding model name
MDDB_EMBEDDING_DIMENSIONS(see below)intVector dimensionality
MDDB_EMBEDDING_CHUNK_ENABLEDtrueboolEnable text chunking before embedding
MDDB_EMBEDDING_CHUNK_SIZE1500intMaximum chunk size in characters

Provider Defaults

ProviderAPI_URLMODELDIMENSIONS
openaihttps://api.openai.com/v1text-embedding-3-small1536
ollamahttp://localhost:11434nomic-embed-text768
voyagehttps://api.voyageai.com/v1voyage-31024
coherehttps://api.cohere.ai/v1embed-english-v3.01024

Vector Index

Env VarDefaultTypeDescription
MDDB_VECTOR_DEFAULT_ALGORITHM"flat"stringDefault algorithm: "flat", "hnsw", "ivf", "pq", "opq", "sq", "bq"
MDDB_VECTOR_BQ_RERANK_FACTOR10intBinary quantization rerank factor
MDDB_VECTOR_PARALLEL_WORKERSNumCPU (max 16)intNumber of goroutines for parallel vector scoring
MDDB_VECTOR_PARALLEL_MIN_SIZE2048intMinimum collection size to enable parallel search

MCP Server Info

Customize the MCP server profile returned in the initialize response. Useful for identifying your server to LLM clients.

Env VarDefaultTypeDescription
MDDB_MCP_SERVER_NAME"mddbd"stringServer name shown to MCP clients
MDDB_MCP_SERVER_DESCRIPTION""stringHuman-readable server description
MDDB_MCP_SERVER_VENDOR""stringOrganization / vendor name
MDDB_MCP_SERVER_HOMEPAGE""stringURL to server documentation or homepage
MDDB_MCP_INSTRUCTIONS""stringSystem prompt for LLM โ€” tells the AI how to use this server

Or via YAML config:

mcp: serverInfo: name: "my-knowledge-base" description: "Company internal documentation" vendor: "Acme Corp" homepage: "https://docs.acme.com" instructions: | This is the company knowledge base. Use search_documents to find relevant articles before answering questions. Always cite document keys in your responses. Prefer the 'docs' collection for technical questions and 'blog' for product updates.

Server-Sent Events (SSE)

Env VarDefaultTypeDescription
MDDB_SSE_ENABLEDtrueboolEnable SSE event stream at /v1/events
MDDB_SSE_MAX_CLIENTS1000intMaximum total concurrent SSE connections
MDDB_SSE_MAX_PER_IP5intMaximum concurrent SSE connections per IP address

TLS / HTTPS / mTLS

See TLS.md for the full setup guide (cert generation, recipes, troubleshooting).

Env VarDefaultTypeDescription
MDDB_TLS_ENABLEDfalseboolEnable built-in TLS (HTTPS) on the HTTP listener
MDDB_TLS_CERT""stringPath to server TLS certificate (PEM)
MDDB_TLS_KEY""stringPath to server TLS private key (PEM)
MDDB_TLS_CLIENT_CA""stringPath to PEM bundle of trusted client CAs โ€” enables mTLS when set
MDDB_TLS_CLIENT_AUTH"require"stringmTLS mode when MDDB_TLS_CLIENT_CA is set: require (reject anonymous clients) or request (verify only if cert presented)

MinVersion is pinned to TLS 1.2. mTLS is automatically skipped on UDS listeners (filesystem permissions already authenticate the local peer).


Unix Domain Socket transport

MDDB_HTTP_ADDR and MDDB_GRPC_ADDR accept either a TCP host:port (default) or a Unix Domain Socket address of the form unix:/absolute/path.sock. The server creates the socket with owner-only 0600 permissions, removes any stale socket file from a previous run, and unlinks the socket on graceful shutdown.

MDDB_HTTP_ADDR=unix:/var/run/mddb/http.sock \
MDDB_GRPC_ADDR=:11024 \
./mddbd

TLS is automatically disabled on UDS listeners (peer is authenticated by filesystem permissions; API keys / JWT still apply on top). Per-IP rate limits in SSE collapse to a single bucket on UDS โ€” apply application-level rate limiting if you need to differentiate clients.

Clients with native UDS support:

ClientAddress form
Python (services/python-extension/mddb.py)MDDB.connect('unix:/var/run/mddb/http.sock')
PHP (services/php-extension/mddb.php)mddb::connect('unix:/var/run/mddb/http.sock')
Python gRPC (clients/python/)grpc.insecure_channel('unix:/var/run/mddb/grpc.sock')
Node gRPC (clients/nodejs/)new MDDBClient('unix:/var/run/mddb/grpc.sock', creds)
curlcurl --unix-socket /var/run/mddb/http.sock http://localhost/v1/healthz

Profiling

Env VarDefaultTypeDescription
MDDB_PPROF_ENABLEDfalseboolEnable pprof profiling endpoints at /debug/pprof/

HTTP Connection Pool

Env VarDefaultTypeDescription
MDDB_HTTP_POOL_MAX_IDLE100intMax idle connections in shared HTTP pool
MDDB_HTTP_POOL_MAX_PER_HOST10intMax idle connections per target host
MDDB_HTTP_POOL_IDLE_TIMEOUT90intIdle connection timeout in seconds

Full-Text Search (FTS)

Env VarDefaultTypeDescription
MDDB_FTS_STEMMINGtrueboolEnable Porter stemming for FTS indexing and queries
MDDB_FTS_SYNONYMStrueboolEnable synonym expansion in FTS queries
MDDB_FTS_DEFAULT_LANG"en"stringDefault language for stemming and stop words

Temporal Tracking

Env VarDefaultTypeDescription
MDDB_TEMPORALfalseboolEnable document lifecycle event tracking (create/update/access)

When enabled, provides endpoints: POST /v1/temporal/query, POST /v1/temporal/hot, POST /v1/temporal/histogram. Per-collection opt-in via Collection Settings (trackAccess, trackHot).


Spell Correction

Env VarDefaultTypeDescription
MDDB_SPELLfalseboolEnable SymSpell-style spell checker for FTS queries

When enabled, provides endpoints: POST /v1/spell-suggest, POST /v1/spell-cleanup, GET/PUT/DELETE /v1/spell-dictionary. Enable spellCorrect: true on a collection for auto-correction.


Compression

Env VarDefaultTypeDescription
MDDB_COMPRESSION_ENABLEDtrueboolEnable adaptive document compression
MDDB_COMPRESSION_SMALL_THRESHOLD1024int (bytes)Below this: Snappy compression
MDDB_COMPRESSION_MEDIUM_THRESHOLD10240int (bytes)Above this: Zstd compression

Replication

Env VarDefaultTypeDescription
MDDB_REPLICATION_ROLE""stringRole: "leader", "follower", or "" (standalone)
MDDB_NODE_ID""stringUnique node ID (required for replication)
MDDB_REPLICATION_LEADER_ADDR""stringLeader address for follower nodes
MDDB_BINLOG_ENABLEDfalseboolEnable binary log (auto-enabled for leaders)
MDDB_BINLOG_PATH""stringCustom binlog file path

Automation & Triggers

Env VarDefaultTypeDescription
MDDB_AUTOMATIONS"enable"stringSet to "disable" to disable automation manager
MDDB_AUTOMATION_LOGS"enable"stringSet to "disable" to disable log storage
MDDB_AUTOMATION_LOGS_TTL"7d"durationTTL for automation log entries
MDDB_TRIGGERSfalseboolEnable automation triggers on document changes
MDDB_CRONSfalseboolEnable cron scheduler for automations

GraphQL

Env VarDefaultTypeDescription
MDDB_GRAPHQL_ENABLEDfalseboolEnable GraphQL endpoint at /graphql
MDDB_GRAPHQL_PLAYGROUNDtrueboolEnable GraphQL Playground at /playground

Per-Collection Configuration (v2.9.14+ additions)

Per-collection attributes are persisted via PUT /v1/collection-config (REST), SetCollectionConfig (gRPC), the set_collection_config MCP tool, or the Admin Panel โ€” not via env vars. The settings below extend what has been configurable since earlier versions.

FieldDefaultTypeDescription
maxRevisions0integer(v2.9.14+) Revision retention cap per document. 0 = unlimited. When > 0, each add/update trims older revisions in the same BoltDB transaction so history stays capped even under high write-churn.
trackAccessfalseboolRecord per-read access events (needs MDDB_TEMPORAL=true)
trackHotfalseboolMaintain a hot-docs leaderboard
spellCorrectfalseboolAuto-correct FTS queries (needs MDDB_SPELL=true)
spellLang""stringOverride spell-correction language for this collection
quantization"float32"stringVector quantization level: float32, int8, or int4
storageBackend"boltdb"stringboltdb, memory, or s3

Example โ€” set a 20-revision cap:

curl -X PUT http://localhost:11023/v1/collection-config \ -H 'Content-Type: application/json' \ -d '{"collection":"blog","type":"default","maxRevisions":20}'

Curation Rules (v2.9.14+)

Curation is data, not configuration โ€” rules live in a dedicated bolt bucket and are managed at runtime via /v1/curation (see API.md and SEARCH.md). No server-level flag controls the subsystem; it's always on and has zero overhead when no rules match an incoming query.


CLI Flags

FlagShortTypeDescription
--config-cstringPath to YAML config file
--http-enabledstringEnable HTTP API (true/false)
--http-addrstringHTTP listen address
--grpc-enabledstringEnable gRPC server (true/false)
--grpc-addrstringgRPC listen address
--mcp-enabledstringEnable MCP server (true/false)
--mcp-addrstringMCP listen address
--mcp-stdiostringMCP stdio mode (true/false)
--http3-enabledstringEnable HTTP/3 server (true/false)
--http3-addrstringHTTP/3 listen address

YAML Config File

Pass via --config config.yaml or MDDB_CONFIG=config.yaml.

path: "mddb.db"
mode: "wr" # read, write, wr http: enabled: true addr: ":11023" grpc: enabled: true addr: ":11024" mcp: enabled: true addr: ":9000" stdio: false domain: "" http3: enabled: false addr: ":11443" auth: enabled: false jwtSecret: "" jwtExpiry: "24h" adminUsername: "admin" adminPassword: "" fts: stemmingEnabled: true synonymsEnabled: true compression: enabled: true smallThreshold: 1024 mediumThreshold: 10240 vector: defaultAlgorithm: "flat" bqRerankFactor: 10 parallelWorkers: 0 # 0 = auto (NumCPU, max 16) parallelMinSize: 2048 # min collection size for parallel search temporal: false spell: false mcp: apiKeyEnabled: false apiKeys: "" rateLimitEnabled: false rateLimitRequests: 100 rateLimitWindow: "60s" rateLimitBurst: 20 rateLimitBy: "ip" loggingEnabled: false

Total: 65+ environment variables across 17 categories, 10 CLI flags, full YAML config file support.