Skip to content

Latest commit

 

History

History
174 lines (130 loc) · 3.31 KB

File metadata and controls

174 lines (130 loc) · 3.31 KB

Mind Cloud Lite Installation Guide

Prerequisites

  • Node.js 18+
  • Cloudflare account (free tier works)
  • Claude Pro subscription (or Claude Code)

Step-by-Step Installation

1. Install Dependencies

cd mind-cloud-lite
npm install

2. Login to Cloudflare

npx wrangler login

3. Create Configuration

cp wrangler.toml.example wrangler.toml

4. Create D1 Database

npx wrangler d1 create mind-lite

You'll see output like:

Created database 'mind-lite' with id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Copy the database ID to your wrangler.toml:

[[d1_databases]]
binding = "DB"
database_name = "mind-lite"
database_id = "YOUR-DATABASE-ID-HERE"

5. Create Vectorize Index

npx wrangler vectorize create mind-lite-vectors --dimensions=384 --metric=cosine

Update wrangler.toml:

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

6. Run Database Migrations

npx wrangler d1 execute mind-lite --remote --file=migrations/0001_init.sql
npx wrangler d1 execute mind-lite --remote --file=migrations/0002_vault_sessions.sql
npx wrangler d1 execute mind-lite --remote --file=migrations/0003_observations_weight.sql

7. Configure Authentication

Generate a secure API key:

openssl rand -hex 32

Set it as a Wrangler secret (do NOT put this in wrangler.toml):

npx wrangler secret put MIND_API_KEY

This key serves as both your secret URL path and Bearer token.

8. Run identity migration

npx wrangler d1 execute mind-lite --remote --file=migrations/0004_identity_unique.sql

9. Deploy

npx wrangler deploy

You'll see:

Published mind-cloud-lite (x.xx sec)
  https://mind-cloud-lite.YOUR-SUBDOMAIN.workers.dev

10. Configure Claude

For Claude Desktop/Web (Projects):

Add to your MCP configuration:

{
  "mcpServers": {
    "mind": {
      "url": "https://mind-cloud-lite.YOUR-SUBDOMAIN.workers.dev/mcp/YOUR-API-KEY"
    }
  }
}

For Claude Code:

Add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "mind": {
      "type": "url",
      "url": "https://mind-cloud-lite.YOUR-SUBDOMAIN.workers.dev/mcp/YOUR-API-KEY"
    }
  }
}

11. Verify Installation

Test the health endpoint:

curl https://mind-cloud-lite.YOUR-SUBDOMAIN.workers.dev/health

Expected response:

{"status":"ok","service":"mind-cloud-lite","version":"1.0.0"}

Troubleshooting

"Unauthorized" error:

  • Verify your MIND_API_KEY secret is set: npx wrangler secret list
  • Check that your URL path matches your API key exactly (case-sensitive, no trailing slash)
  • Or use Bearer token authentication with Authorization: Bearer YOUR-API-KEY

Tools not appearing:

  • Restart Claude after MCP configuration changes
  • Check Claude's MCP settings panel

Search returns empty:

  • New data needs to be written first
  • Vectorization happens on write

Database errors:

  • Verify all migrations ran successfully
  • Check npx wrangler d1 execute mind-lite --remote --command "SELECT name FROM sqlite_master WHERE type='table'"

Optional: Set Up Cron

Add to wrangler.toml for automatic subconscious processing:

[triggers]
crons = ["0 */6 * * *"]  # Every 6 hours

Redeploy after adding cron:

npx wrangler deploy