Client and installer
The hosted bridge (
packages/mcp-server) ignores MEMORY_CRYSTAL_API_KEY for incoming requests. Send Authorization: Bearer <api-key> on /mcp.
Backend and self-hosting
For self-hosted project-scoped message recall, you can adjust the per-lane scan budgets:
Both values accept surrounding whitespace. Unset, empty, zero, negative, or non-integer values use the defaults. These budgets apply when message recall is scoped by
projectId or repoSlug; they do not change unscoped scan budgets.
CONVEX_URL is the Convex client URL for a backend process you run. It is not the client MCP variable. For the hosted service, clients use https://convex.memorycrystal.ai.
Embedding and extraction keys are account settings on the hosted service, not these process variables. Local and self-hosted installers still prompt for GEMINI_API_KEY and OPENROUTER_API_KEY. That prompt does not match current hosted embedding selection. See Providers.
Stdio package
The optional listener also needs
CONVEX_URL (or MEMORY_CRYSTAL_LOCAL_CONVEX_URL) for Bearer validation against the local backend and its API-key records. Setting a process API key alone does not authenticate incoming requests. See MCP Server.
This listener is not the hosted bridge. The bridge uses HOST (default 0.0.0.0) and PORT (default 3100).
OBSIDIAN_VAULT_PATH is optional. When set, the stdio crystal_remember handler also writes a note into that vault. The backend does not read it.
Unscoped message labels
RECALL_WORK_CHANNEL_LABELS is a comma-separated list of bare channel labels. Unset or empty means the allowlist is empty, so unscoped message reads treat bare labels as private and drop them.
Unscoped reads are bounded. The public recent-messages query reads one page of at most 200 rows. An unscoped recent scan reads at most 1,000 rows in pages of 200. Unscoped search reads at most 200 text-index rows plus 200 recent rows in separate transactions. Rows past those bounds are not returned unless the request includes channel or sessionKey.
Recall cost breaker
This is a retrieval-work budget. It is not the HTTP rate limit. See Rate Limits for request quotas. The breaker is on unlessMC_COST_BREAKER_ENABLED is 0. It counts estimated vector and text work per UTC day.
Unlimited accounts skip the per-user envelope. Their usage is still recorded and still counts toward the global row. Set MC_COST_BREAKER_UNLIMITED_EXEMPT to 0 to apply the user envelope to Unlimited accounts. Any other value keeps them exempt.
Thresholds are bytes. A user variable sets the threshold for each non-exempt account. A global variable applies to the shared row. When a threshold is unset, the kb default is 4x the recall envelope; the recall and messages surfaces use the base default.
One recall unit is 820 MiB of vector work and 180 MiB of text work. The text amount is three indexes at 60 MiB each. A standalone message search is charged 60 MiB of text work. A recall that names knowledge bases is charged one unit per knowledge base. A standalone knowledge-base query is charged one vector unit and three text-index units.
The default envelope, in those units:
A four-KB recall reaches the user warn and emergency KB thresholds at 250 and 500 calls. A 12-KB recall reaches them at about 84 and 167 calls. Broad recall without knowledge-base scope has no KB charge.
Each account can add at most its own user emergency threshold to the global row, per surface and dimension. The debit that crosses the threshold counts in full. Later debits add zero for that dimension.
Ultra and Unlimited skip vector-depth reduction and text-search skipping on recall, knowledge-base query,
/api/mcp/search-messages, and both message-search lanes.
Surfaces that charge:
/api/mcp/recall(recall, plus KB whenknowledgeBaseIdsis set)/api/mcp/search-messages(messages)/api/knowledge-bases/{id}/query(KB)- The public recall, message-search, and knowledge-base query actions
Example: command-launched MCP
Supply the API key and backend URL to the process your client launches. Add the vault path only if you want Obsidian export:Provider variables and diagnostics
From an OpenClaw source checkout, run:
bin/doctor instead.
Do not use a Memory Crystal Bearer token as a provider key. If a client fails before making a request, check that its process received MEMORY_CRYSTAL_API_URL and MEMORY_CRYSTAL_API_KEY. A successful /health response is not a provider readiness test.
Cost-breaker usage resets at UTC midnight. Explicit threshold overrides apply unchanged across surfaces; remove an override to restore the KB surface’s four-times default. Raising a threshold changes subsequent budget decisions, not the recorded work already performed.