The Problem
Developers building AI assistants face a hard constraint: models have no persistent memory. Every conversation starts from zero, and context windows cap what a model can recall. Supermemory solves this by ingesting content — URLs, PDFs, notes, tweets, chat transcripts — into a searchable memory store, then exposing that store to AI tools via chat, an MCP server, and SDKs. The result is a "second brain" that any model can query.
What This Does
This is a monorepo with two top-level projects: apps/ (476 files) and packages/ (243 files). The apps/ directory contains the web app (apps/web/), a browser extension (apps/browser-extension/) with content scripts for ChatGPT, Claude, Twitter/X, and T3, an MCP server (apps/mcp/), a Raycast extension, and a memory-graph playground. The packages/ directory holds shared libraries: packages/lib/ (utility functions, auth context, queries), packages/tools/ (Claude memory tooling), packages/ui/ (memory-graph React components), and packages/validation/ (schemas).
The browser extension is the most active surface. Content scripts inject save buttons and capture prompts from ChatGPT, Claude, and Twitter. The MCP server (apps/mcp/src/index.ts) lets Claude, Cursor, and other MCP-compatible tools read and write memories. The web app provides chat over stored memories, onboarding, and connection management for Notion, Google Drive, OneDrive, GitHub, and S3.
How It Is Wired
Execution starts at three entry points. main in apps/browser-extension/entrypoints/content/index.ts reaches 33 functions and is the deepest path: main -> chatWithMemoryTool, which calls anthropic.beta.messages.create — a model inference call leaving the process. The popup entry (apps/browser-extension/entrypoints/popup/App.tsx) and the MCP server (init in apps/mcp/src/server.ts) are smaller, reaching 4 and 1 functions respectively.
The dependency hub is cn in packages/lib/utils.ts, called from 238 places — changing its signature breaks a third of the codebase. dmSansClassName in apps/web/utils/fonts.ts (36 callers) and safeCapture (21 callers) carry similar blast radius. The module graph shows two circular dependencies, which raises the cost of refactoring those files. The MCP server's handleCommand in packages/tools/src/claude-memory.ts is the command router for AI-tool integrations, called from 9 places.
Effects are concentrated: 10 functions read/write files, 1 makes an outbound network call, 5 call a model for inference. apps/browser-extension/utils/storage.ts owns persistence for the extension.
How To Use It
git clone https://github.com/moses-y/supermemory
cd supermemory
npm install
npm run dev
The browser extension requires configuration via apps/browser-extension/.env.example — copy it to .env and set your API keys. The MCP server runs from apps/mcp/; its package.json defines the start command. The memory-graph playground uses Next.js (apps/memory-graph-playground/next.config.ts). The docs site is under apps/docs/. Note: the repo has no Dockerfile, so containerized deployment is not documented here.
Real-World Use
A developer wants Claude to remember what a user said last week. They run the MCP server, connect it to Claude via the MCP integration, and Claude calls handleCommand with a search query. The command routes to the memory store, retrieves relevant memories, and returns them as context. The browser extension captures the same user's tweets and ChatGPT conversations into the store automatically, so the memory grows without manual input.
Code Health & Issues
Static analysis found 207 findings: 111 high, 96 medium, 0 low. Two kinds:
- High — deep nesting (x58) — control flow hard to follow at max indentation depth 8; worst in
apps/browser-extension/utils/ui-components.ts,apps/web/app/onboarding/nav-menu.tsx,packages/tools/src/vercel/index.ts. Fix with early returns and guard clauses. - High — oversized files (x2) —
apps/browser-extension/utils/ui-components.ts(627 lines) andpackages/validation/api.ts; changes ripple widely. Split by responsibility.
SDLC observations:
- Critical —
ANTHROPIC_API_KEYis committed in.github/workflows/claude.yml; a fork-triggered PR could exfiltrate credentials. Move secret-using steps to aworkflow_runjob. - High — third-party actions pinned to tags (
anthropics/claude-code-action@v1,oven-sh/setup-bun@v2,pnpm/action-setup@v4); pin to commit SHAs. - High — wildcard CORS origin (
origin: "*") inapps/mcp/src/index.ts; any page can call the API with the browser's cookies. - High — CI has no test command despite 37 test files; the green check asserts nothing.
- Medium — no Dependabot/Renovate config, no dependency vulnerability scan in CI,
persist-credentialsnot disabled on checkout, 6 blobs over 5MB inapps/docs/images/(up to 6.3MB). - Low — no job timeouts, missing
.editorconfig,.gitattributes, and formatter config.
The Bottom Line
This is a well-structured memory engine with real product surface area — extension, MCP, web, docs — and a healthy test suite. The main risks are operational: a committed API key in CI, unpinned actions, and a wildcard CORS origin. The deep nesting and oversized files are maintainability concerns for anyone modifying the extension's UI utilities or validation layer. Teams building AI assistants with persistent memory should evaluate this seriously; the security findings need fixing before production use.