Docs/Resonant Mind/Configuration

Configuration

Resonant Mind is configured through Cloudflare Wrangler secrets and environment variables. No configuration files to manage — everything lives in Cloudflare’s secure infrastructure.

Required Secrets

Set these with npx wrangler secret put <NAME>:

VariableDescription
MIND_API_KEYAPI key for Bearer/Basic authentication. Pick any strong random string. This authenticates all MCP and REST requests.
GEMINI_API_KEYGoogle Gemini API key for generating embeddings. Get one free.

Optional Secrets

VariableDescription
SIGNING_SECRETSeparate HMAC key for signed image URLs. Defaults to MIND_API_KEY if not set. Recommended for production.
MCP_CONNECTOR_SECRETSecret path for Claude.ai web/mobile connector authentication. Required if using Claude.ai’s MCP integration.
WEATHER_API_KEYWeatherAPI.com key for inner weather context. Free tier available.

Environment Variables

Set in wrangler.toml under [vars]:

VariableDefaultDescription
WORKER_URLPublic URL of this worker. Used for generating signed image URLs.
DASHBOARD_ALLOWED_ORIGINCORS origin for API access from a dashboard or external app.
R2_PATH_PREFIXresonant-mind-imagesKey prefix for R2 image storage.
LOCATION_NAMELocation name for weather/time context (e.g., London, UK).
LOCATION_LATLatitude for weather API lookups.
LOCATION_LONLongitude for weather API lookups.
LOCATION_TZIANA timezone (e.g., Europe/London, America/New_York). Used for time-aware context in orient/ground.

Wrangler Bindings

These are configured in wrangler.toml and depend on your chosen storage backend.

D1 Backend

[[d1_databases]]
binding = "DB"
database_name = "resonant-mind"
database_id = "your-database-id"

[[vectorize]]
binding = "VECTORS"
index_name = "resonant-mind-vectors"

Postgres Backend

[[hyperdrive]]
binding = "HYPERDRIVE"
id = "your-hyperdrive-id"

No D1 or Vectorize bindings needed — Resonant Mind detects Hyperdrive automatically and uses Postgres adapters.

R2 (Both Backends)

[[r2_buckets]]
binding = "IMAGES"
bucket_name = "resonant-mind-images"

Cron Triggers

The subconscious daemon runs on a Cloudflare cron trigger. Configure in wrangler.toml:

[triggers]
crons = ["*/15 * * * *"]   # Every 15 minutes

Adjust the frequency based on your needs. More frequent = more responsive daemon but more compute usage.

Authentication

Resonant Mind supports two authentication methods:

Bearer Token (MCP Clients)

Authorization: Bearer YOUR_MIND_API_KEY

Used by Claude Code, Claude Desktop, and most MCP clients.

Secret Path (Claude.ai Connector)

https://your-worker.workers.dev/mcp/YOUR_CONNECTOR_SECRET

Used by Claude.ai’s web and mobile MCP integration, which doesn’t support custom headers.

Embedding Providers

The default is Gemini Embedding 2 (768 dimensions, multimodal). Alternative providers are documented in the repo’s alternative embeddings guide:

  • Cloudflare Workers AI — free, runs on Cloudflare’s edge, text-only
  • OpenAItext-embedding-3-small or text-embedding-3-large
  • Ollama — self-hosted, fully local, no API costs