Skip to main content
Keep what your agent already knows. Claude-Mem can fetch memories directly from Mem0 Platform or Supermemory and save them as searchable observations in a project you choose. You do not need to export a file or ask a model to rewrite your notes.

Before you begin

Use a claude-mem version that includes npx claude-mem import, and start your local worker with npx claude-mem start. Use a source API key that can read the user or namespace you select. The command reads one source scope at a time; it never discovers and imports every account automatically. No source data is changed or deleted. Choose a stable --source-account label for the source account, such as personal-mem0 or company-supermemory. Keep this label when you rotate keys or repeat an import. It separates records that happen to have matching IDs in different source accounts. The label is yours; it is not an account credential.

Mem0

Set MEM0_API_KEY in your environment or secret manager. Then run:
The command fetches every page for that Mem0 user, skips expired or superseded memories, then saves the remaining memories into imported-memory.

Supermemory

Set SUPERMEMORY_API_KEY in your environment or secret manager. Then run:
The default imports current extracted memories. Forgotten memories and older versions are skipped. To import source documents instead, add --documents:
Document mode imports published extracted text, not the original uploaded binary. A document that is still processing, has failed, or has no text stops the import before any writes. Documents and extracted memories are separate choices; importing both can create overlapping information.

Preview and verify

Add --dry-run to either command to fetch and validate the selected source without writing to Claude-Mem. It prints counts, not memory text or keys. After an import, search for a phrase from one of your memories in the viewer, or use npx claude-mem search "a phrase you imported". Imported memories are saved for the default host (claude), so Claude Code’s memory search finds them. To file them under another host, add --platform <host>, such as --platform codex or --platform cursor. Imported observations retain the original source record, ID, timestamps, metadata, account label and source scope in their metadata. The Claude-Mem observation has a new local creation time; source timestamps remain provenance.

Repeat an interrupted import

Run the same command again. Exact source records use the worker’s transactional fingerprint check, so records already saved are counted as existing. There is no background job and no automatic write retry. If a response was lost after a save, the next explicit run checks the same fingerprint. Source edits create new observations rather than modifying earlier imports. Source deletion and expiration are not synchronized after import. Future Mem0 expiration dates are preserved as metadata, not scheduled deletion rules. This is a one-way import, not ongoing synchronization or a graph migration.

Limits and troubleshooting

  • The default limit is 10,000 source records. Set --max-records up to 100,000 for a larger scope. Total source responses are limited to 100 MiB.
  • Requests have a 15-second deadline; --timeout-ms accepts up to 120,000. A request failure stops the run with a nonzero exit code.
  • Source pages are collected and validated before any writes. Duplicate IDs, changing totals, incomplete pages and repeated cursors stop the run. Keep the source quiet during an import; the APIs do not provide a snapshot lock.
  • A single text record is limited to 100,000 characters. Oversized records must be split at the source. Text is never silently truncated by this command.
  • The destination uses the existing worker URL and local authentication settings. No provider key is sent to the worker. The Postgres server’s /v1 API and hosted CMEM Pro MCP endpoint are not import destinations here.
  • Existing worker indexing, cloud sync and export settings still apply to imported observations. This command performs no model calls.
  • No configuration is installed. To disconnect, remove the source key from your environment. Already imported memories remain until you delete them through Claude-Mem’s existing controls.

Maintainer verification

Run the contract tests with bun test tests/npx-cli/import-memory.test.ts. After npm run build, run python3 tests/fixtures/import-provider-smoke.py. The smoke test uses synthetic provider responses, the actual bundled CLI and a disposable bundled worker with fresh SQLite. It never accesses a real provider account or runs a model. Successful fixture tests do not establish compatibility with every account, plan or live vendor response.