Environment variables are little labels that tell the program important secrets and addresses. They answer questions like:Documentation Index
Fetch the complete documentation index at: https://docs.memorycrystal.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Where is the backend?
- Which API key should I use?
- Where is my local vault?
What this means in practice
Important variables across the repo include:Client / MCP-facing
MEMORY_CRYSTAL_API_KEYMEMORY_CRYSTAL_API_URL
Backend / embedding/runtime
GEMINI_API_KEYOPENROUTER_API_KEYGEMINI_EMBEDDING_MODELEMBEDDING_PROVIDERCONVEX_URLOPENAI_API_KEYOBSIDIAN_VAULT_PATH
Local MCP/process wiring
CRYSTAL_MCP_MODECRYSTAL_MCP_HOSTCRYSTAL_MCP_PORT
How it actually works
Different layers use different names:- the docs and modern MCP setup prefer
MEMORY_CRYSTAL_* - backend paths use provider-specific variables such as
GEMINI_API_KEYandOPENROUTER_API_KEY
Commands / examples
Example from.env.example:
CRYSTAL_MCP_MODE=stdio for command-launched local MCP.
Reserve CRYSTAL_MCP_MODE=http for the deprecated local network MCP listener.
Helpful verification command:
Common mistakes
- setting
MEMORY_CRYSTAL_API_KEYand expecting it to work as a backend Gemini/OpenRouter provider key - using a Memory Crystal bearer token as
GEMINI_API_KEY - forgetting
MEMORY_CRYSTAL_API_URLfor MCP server setups - assuming smoke-test failures are always code failures instead of environment misconfiguration
Source of truth
Primary files behind this page:.env.examplescripts/crystal-doctor.shpackages/mcp-server/README.mdmcp-server/README.mdapps/web/public/install.sh