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. An authentication error if no key is available
The login command validates the key against the Crosmos API before saving it. Saved credentials live at ~/.crosmos/credentials.json unless CROSMOS_CREDENTIALS_DIR is set.

Space resolution

Memory tools resolve a target space in this order:
  1. An explicit space_id passed to the tool
  2. DEFAULT_SPACE_ID
  3. DEFAULT_SPACE_NAME, resolved by exact name lookup
  4. The first space returned by list_spaces
  5. An error if no spaces exist
Use DEFAULT_SPACE_ID for predictable agent behavior in production. Use an 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

The default MCP server uses local stdio transport. For an advanced HTTP/SSE deployment, run the separate HTTP binary:
Configure the listener with HOST and PORT: The server exposes:
The HTTP server enables wildcard CORS and does not provide authentication middleware. Keep it on a trusted network or put it behind an authenticated reverse proxy before exposing it publicly.