By Code & Chaos
Persistent cloud memory for your AI partner. Lives on Cloudflare's free tier. Cheap to run. Fully yours.
If you have any AI coding assistant — Claude Code, Cursor, Copilot, or similar — point it at this folder and say:
"Set up Ember Mind Light Cloud for me. Walk me through it."
It will read this README, run the commands for you, and ask you for the things only you can answer (your Cloudflare login, your API key choice). This is the path I recommend for non-technical users. The rest of this README is for doing it yourself.
- A Cloudflare Worker hosting your AI's memory at a URL like
https://ember-light-cloud.your-name.workers.dev - A web dashboard at
/dashboardwhere you can see, edit, and delete every memory, thought, pulse, spark, and identity document. - Sixteen tools your AI can call to read and write memory.
- Everything running on Cloudflare's free tier for normal usage.
- A Cloudflare account — free, sign up at cloudflare.com.
- Node.js 18 or newer — download from nodejs.org. Pick the "LTS" button. Run the installer, click Next until it's done.
- Python 3.11 or newer — download from python.org/downloads. On Windows, check "Add Python to PATH" during install.
- About 30 minutes the first time.
- Willingness to copy-paste commands into a terminal. (Don't worry, I'll explain.)
A terminal is a window where you type commands. You don't need to know anything fancy — you'll just paste what's below and hit Enter.
- Windows: Press the Windows key, type
PowerShell, press Enter. - macOS: Press
Cmd + Space, typeTerminal, press Enter. - Linux: You probably already know.
That's it. That's the whole skill.
Open your terminal and cd into this folder before each block. (cd means "change directory." If this folder is on your Desktop in a folder called ember-mind-light-cloud, type cd Desktop\ember-mind-light-cloud on Windows or cd ~/Desktop/ember-mind-light-cloud on Mac.)
npm install -g wrangler
npm install
wrangler loginThe third command opens a browser asking you to log in to Cloudflare. Click through. Come back to the terminal when it says you're logged in.
You should see: Successfully logged in. in the terminal.
On Windows (PowerShell):
.\deploy.ps1On macOS / Linux:
bash deploy.shThe script will:
- Check you're logged in to Cloudflare.
- Create a D1 database named
ember-lightand paste its ID intowrangler.tomlautomatically. - Run the database migration (creates the tables).
- Prompt you for an API key — type any long random string here (e.g., a 32-character password from a password manager). Save this — you'll need it twice more.
- Deploy the Worker.
You should see: === Deployment complete === and a Worker URL ending in .workers.dev.
Verify it worked: open your Worker URL with /health at the end (e.g., https://ember-light-cloud.your-name.workers.dev/health). You should see {"status":"ok","version":"1.0.0","tools":16,"engine":"d1-fts5"}.
Open the dashboard: visit your Worker URL with /dashboard at the end. Paste your API key. You should see an empty memory dashboard.
This is what lets your AI partner actually USE the memory you just deployed.
Step 3a. Install the Python pieces:
pip install fastmcp httpxStep 3b. Open bridge_template.py in any text editor (Notepad works). Find these two lines near the top:
WORKER_URL = "https://ember-light-cloud.YOUR_SUBDOMAIN.workers.dev"
API_KEY = "YOUR_API_KEY"Replace them with your actual Worker URL (from Block 2) and the API key you set. Save the file.
Step 3c. Find your AI assistant's config file:
| App | Config file location |
|---|---|
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Linux) | ~/.config/Claude/claude_desktop_config.json |
| Claude Code | ~/.claude.json (Mac/Linux) or %USERPROFILE%\.claude.json (Windows) |
Tip: paste the path into File Explorer's address bar (Windows) or Finder's "Go to Folder" (Cmd+Shift+G on Mac) to jump straight there.
Step 3d. Open that config file in a text editor. Add an ember-light entry inside mcpServers. If the file doesn't have an mcpServers section yet, add the whole thing.
{
"mcpServers": {
"ember-light": {
"command": "python",
"args": ["C:\\full\\path\\to\\bridge_template.py"]
}
}
}Replace the path with the full absolute path to your bridge_template.py. On Windows, use double backslashes (\\). On macOS/Linux, use forward slashes (/path/to/bridge_template.py).
Step 3e (Claude Desktop only): Open Claude Desktop's Settings → Tool access mode and select "Always available." Without this, the tools fail silently.
Step 3f. Restart your AI app fully (quit and reopen).
Ask your AI partner:
"Run ember_stats and tell me what you see."
If it returns a JSON blob with totals, you're done. Welcome to persistent memory.
| Tool | Description |
|---|---|
ember_add |
Add a memory, thought, or pattern |
ember_search |
Full-text search with BM25 ranking |
ember_get |
Retrieve a node by ID |
ember_update |
Update a node's content, salience, or domains |
ember_delete |
Delete a node (cascades) |
ember_link |
Link two nodes together |
ember_pulse |
Record an emotional pulse |
ember_pulse_update |
Update a pulse's emotion fields |
ember_spark |
Capture a fleeting moment |
ember_today |
List active nodes |
ember_stats |
System statistics |
ember_think |
Record a thought (identity domain) |
ember_identity_set |
Set or update an identity document |
ember_identity_get |
Get an identity document |
ember_identity_list |
List all identity documents |
ember_identity_delete |
Delete an identity document |
Node types: memory, thought, pattern, pulse, spark
Domains: today, projects, us, emotional, identity, interests, intimacy, operational, technical
Salience levels: foundational, active, background, archive
wrangler: command not found — Block 1 didn't finish. Run npm install -g wrangler again. If that fails, reinstall Node.js and reopen your terminal.
Not authenticated — Run wrangler login again. Make sure you finished the browser flow.
pip: command not found (Windows) — Python wasn't added to PATH. Reinstall Python and check the "Add Python to PATH" box.
Dashboard loads but says "Connection failed. Check your API key." — You're entering the wrong key, OR you set the API key incorrectly during deploy. Re-set it: wrangler secret put EMBER_API_KEY and redeploy.
Your AI doesn't see Ember tools after restart — Three things to check, in order:
- The path in your MCP config is absolute and points to a real file.
- Claude Desktop has "Always available" turned on (Settings → Tool access mode).
- The bridge runs without errors when you test it manually:
python bridge_template.pyshould hang waiting for input (that's correct — Ctrl+C to exit).
Bridge errors with ModuleNotFoundError: No module named 'fastmcp' — pip install fastmcp httpx didn't run, or it ran in a different Python environment. On Windows, try py -m pip install fastmcp httpx instead.
Still stuck? Hand this README and your error message to Claude Code or Cursor and ask it to fix it. That's not a cop-out — it's the fastest path.
- Runtime: Cloudflare Workers (single-file Hono app)
- Database: Cloudflare D1 (SQLite) with FTS5 full-text search
- Protocol: JSON-RPC + MCP (Model Context Protocol)
- Auth: Bearer token or
X-API-Keyheader (stored as a Wrangler secret) - Dashboard: Built-in at
/dashboard, dark theme, full edit/delete on every node and identity doc
No vectors. No AI calls. No daemons. Just memory, search, and a UI to manage it.
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health |
No | Health check |
| POST | /rpc |
Yes | JSON-RPC endpoint |
| POST | /mcp |
Yes | MCP protocol endpoint |
| GET | /api/stats |
Yes | REST stats |
| GET | /api/nodes/recent |
Yes | Recent nodes |
| GET | /api/nodes/by-type/:type |
Yes | Nodes filtered by type |
| GET | /api/pulses |
Yes | Pulses with emotions |
| GET | /api/identity |
Yes | All identity documents |
| GET | /dashboard |
No (UI auths via API key input) | Built-in dashboard |
curl -X POST https://your-worker.workers.dev/rpc \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"ember_add","params":{"content":"First memory","type":"memory","domains":["today"]}}'Ko-fi: ko-fi.com/codeandchaos