These notes apply to the remote memory backend only. For interactive setup and keychain storage, see remote setup.
Sandboxed environments
Sandboxed environments may not be allowed to interact with the operating system keychain. In that case, provide the remote Worker credentials through a .env file at the root of each repository where you use machine-memory:
MACHINE_MEMORY_DB_URL=https://your-worker.example/query
MACHINE_MEMORY_DB_TOKEN=your-worker-tokenMACHINE_MEMORY_DB_URL may be the Worker URL or its /query endpoint; the CLI normalizes it to the /query endpoint.
Remember: keep
.envout of version control!
Broader sandbox and MCP-vs-CLI credential notes: Troubleshooting → Sandbox.