Installation
Prerequisites
- Node.js 20+
- pnpm 9+
- PostgreSQL 15+ (local container or external DB)
- Docker / Docker Compose (recommended for local bootstrap)
Environment Variables
Application DB rule:
memory-coreusesDATABASE_URLonly.POSTGRES_*are local compose postgres bootstrap vars only.
Full reference:
Minimal variables for first boot:
DATABASE_URLMEMORY_CORE_API_KEYMEMORY_CORE_URLNEXT_PUBLIC_MEMORY_CORE_URL- (
POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD) for localdb profile only
Optional but recommended:
MEMORY_CORE_SECRET(single shared secret used as fallback for session/hash/one-time/GitHub-state secrets)
API Key Variables (Important)
MEMORY_CORE_API_KEY- Runtime bearer token used by clients (mcp-adapter/admin scripts) to call memory-core.
- If this key is present in env, memory-core treats it as an env-admin key.
MEMORY_CORE_SEED_ADMIN_KEY- Used only during
pnpm db:seedto create/update (upsert) one admin key row in DB tableapi_keys. - If omitted, seed falls back to
MEMORY_CORE_API_KEY.
- Used only during
Upsert means:
- insert when key does not exist
- update when key already exists
- so repeated
db:seedruns are safe to run multiple times
Recommended setup:
- Local/dev: set both to the same strong value.
- Production: use
MEMORY_CORE_API_KEYfor runtime, and rundb:seedwith a controlledMEMORY_CORE_SEED_ADMIN_KEYonly when needed.
Compose Files
docker-compose.yml: image-based deployment (Dockge/server)docker-compose.dev.yml: source-build local development- Optional image overrides:
MEMORY_CORE_IMAGE,MCP_ADAPTER_IMAGE,ADMIN_UI_IMAGE - Default images:
ghcr.io/stephen-kim/claustrum-memory-core:latestghcr.io/stephen-kim/claustrum-mcp-adapter:latestghcr.io/stephen-kim/claustrum-admin-ui:latest
Local Development (source-build containers)
pnpm install
cp .env.example .env
docker compose -f docker-compose.dev.yml --profile localdb up -d --build
Local endpoints:
- memory-core:
http://localhost:8080 - admin-ui:
http://localhost:3000
Local Development (local processes + DB container)
pnpm install
cp .env.example .env
docker compose --profile localdb up -d postgres
pnpm db:migrate
pnpm db:seed
pnpm dev
External DB (RDS, Cloud Postgres, etc.)
- Copy env file:
cp .env.example .env
- Set external DB URL:
DATABASE_URL=postgres://<user>:<pass>@<rds-endpoint>:5432/<db>?sslmode=require
- Start services (no localdb profile):
docker compose up -d
Docker Notes
- In containers, do not use
localhostfor inter-service calls. - Use compose service names (
memory-core,postgres). - Browser-facing URL (
NEXT_PUBLIC_MEMORY_CORE_URL) should belocalhostor your domain.
Codex MCP Adapter Setup
~/.codex/config.toml
[mcp_servers.memory-core]
command = "pnpm"
args = ["--filter", "@claustrum/mcp-adapter", "start"]
[mcp_servers.memory-core.env]
MEMORY_CORE_URL = "http://127.0.0.1:8080"
MEMORY_CORE_API_KEY = "<runtime-api-key>"
MEMORY_CORE_WORKSPACE_KEY = "personal"
MCP_ADAPTER_LOG_LEVEL = "error"
Manual MCP Setup (No Setup CLI)
Claustrum no longer ships an automatic setup CLI. Configure MCP clients directly with the adapter command.
Example (absolute path):
[mcp_servers.claustrum]
command = "node"
args = ["/absolute/path/to/claustrum/apps/mcp-adapter/dist/index.js"]
[mcp_servers.claustrum.env]
MEMORY_CORE_URL = "http://127.0.0.1:8080"
MEMORY_CORE_API_KEY = "<runtime-api-key>"
MEMORY_CORE_WORKSPACE_KEY = "personal"
MCP_ADAPTER_LOG_LEVEL = "error"
Notes:
- Build adapter once before using
distentry:pnpm --filter @claustrum/mcp-adapter build
stdoutmust stay JSON-RPC only (adapter logs go tostderr).
MCP Config Helper (Optional)
Run the interactive wizard:
pnpm mcp:helper
Wizard features:
- multi-client selection (
Spaceto toggle, arrow keys to navigate) - supported clients: Codex, Claude Code, Cursor, Antigravity
- prompts for adapter command/args
- automatic backup of existing config files before write
- restart reminder after applying settings
One-line download + run (from anywhere):
curl -fsSL https://raw.githubusercontent.com/stephen-kim/claustrum/main/scripts/mcp-config-helper.js -o ./claustrum-mcp-config-helper.js && node ./claustrum-mcp-config-helper.js
Windows PowerShell:
iwr https://raw.githubusercontent.com/stephen-kim/claustrum/main/scripts/mcp-config-helper.js -OutFile .\claustrum-mcp-config-helper.js; node .\claustrum-mcp-config-helper.js
Default adapter execution values:
command = "pnpm"args = ["--filter", "@claustrum/mcp-adapter", "start"]
The helper writes command/args only.
Set MEMORY_CORE_* in the adapter runtime environment.
Useful options:
--profile <name>: MCP profile key (default:claustrum)--clients <csv>: non-interactive target clients (e.g.codex,cursor)--config <path>: custom config path--adapter-command <value>--adapter-args "<value>"--non-interactive --write --yes: apply without wizard