Skip to main content
The MCP server reads credentials from environment variables first, then from the saved credentials file.

Environment variables

Credential resolution

The server resolves authentication in this order:
  1. CROSMOS_API_KEY
  2. credentials.json created by auth login
  3. Error if no key is available
Saved credentials live at ~/.crosmos/credentials.json unless CROSMOS_CREDENTIALS_DIR is set.

Space resolution

search_memories and add_memory need a target memory space. The MCP server resolves it in this order:
  1. Explicit space_id passed to the tool
  2. DEFAULT_SPACE_ID
  3. DEFAULT_SPACE_NAME, resolved by exact name lookup
  4. First space returned by list_spaces
  5. Error if no spaces exist
Use DEFAULT_SPACE_ID for predictable agent behavior in production. Use explicit space_id when the agent should switch between spaces.

Client config with environment variables

Custom API URL

Use CROSMOS_API_BASE_URL when targeting a non-default API environment:

HTTP server settings

crosmos-mcp-http reads these server variables: The HTTP server supports CORS for GET, POST, and OPTIONS, and exposes /sse, /message, and /health.