Local-first memory service for developers and coding agents.
It stores documents, extracts memories, indexes embeddings, and exposes both a REST API and supermemory_* MCP tools.
Default user path:
npx -y @twelvehart/supermemory@latest full --mcp project
cd ~/.supermemory
claudeThis installs the runtime into ~/.supermemory, runs the canonical installer from that final directory, registers Claude MCP against the final path, and prints the minimal next steps.
Other supported npx examples:
npx -y @twelvehart/supermemory@latest agent --mcp project
npx -y @twelvehart/supermemory@latest api --dir ~/supermemory-api
npx -y @twelvehart/supermemory@latest full --skip-api-keys --mcp project
npx -y @twelvehart/supermemory@latest full --source-path "$(pwd)"
npx -y @twelvehart/supermemory@latest full --source-path "$(pwd)" --updateModes:
agent: installs the MCP-oriented runtime and leaves the API stopped.api: installs and starts the REST API stack.full: installs both surfaces and starts the API stack.
Repo installation is for maintainers, local development, and testing unpublished changes.
git clone https://github.com/ASRagab/supermemory-clone.git
cd supermemory-clone
npm install
./scripts/install.sh full --scope projectCanonical shell installer commands:
./scripts/install.sh
./scripts/install.sh agent
./scripts/install.sh api
./scripts/install.sh full
./scripts/install.sh update --mode api
./scripts/install.sh uninstall --purge- PostgreSQL is required outside tests.
- pgvector is required for semantic search.
- Redis is optional; when unavailable, ingestion falls back inline.
- Embedding and vector dimensions are pinned to
1536. EMBEDDING_DIMENSIONSandVECTOR_DIMENSIONSoverrides are not supported.
The installed app keeps its env file at:
~/.supermemory/.envRepo installs use the standard env resolution order:
- CLI
--env-file SUPERMEMORY_ENV_FILE.env.local.env
Core variables:
DATABASE_URLOPENAI_API_KEYANTHROPIC_API_KEYLLM_PROVIDERREDIS_URLAUTH_ENABLEDAUTH_TOKENCSRF_SECRETALLOWED_ORIGINS
After changing env values for a Docker-based install, recreate the API container:
cd ~/.supermemory
docker compose -f docker-compose.yml -f docker-compose.prod.yml --profile production up -d --force-recreate apiThen restart Claude if you are using the MCP surface.
For the npx-installed path:
cd ~/.supermemory
claudeIf you need to repair or register MCP manually:
cd ~/.supermemory
npm run mcp:setup -- --scope project --non-interactive --register-mcpDirect Claude CLI registration:
cd ~/.supermemory
claude mcp add supermemory --scope project -- node "$(pwd)/dist/mcp/index.js"Available MCP tools include:
supermemory_addsupermemory_searchsupermemory_deletesupermemory_remembersupermemory_recall
Health check:
curl http://localhost:13000/healthBase path:
/api/v1
Common endpoints:
POST /documentsGET /documentsGET /documents/:idDELETE /documents/:idPOST /searchGET /profilesPUT /profiles/:tagDELETE /profiles/:tag
Key commands:
npm run devnpm run buildnpm run mcp:devnpm run mcpnpm run db:migratenpm run test:runnpm run test:installnpm run lintnpm run typechecknpm run typecheck:installnpm run pack:check:runtime
Focused example:
npx vitest run tests/services/search.service.test.tsPublish order:
- Publish
@twelvehart/supermemory-runtimefrom the repo root. - Publish
@twelvehart/supermemoryfrompackages/install.
Recommended checks before publishing:
npm run build
npm run pack:check:runtime
npm run build:install
npm run typecheck:install
npm run test:installSmoke test after publishing:
npx -y @twelvehart/supermemory@next full --mcp project --runtime-version next
cd ~/.supermemory
curl http://localhost:13000/health
claudeMIT