Security and privacy
Memex protects your notes with per-folder access rights enforced in one place, OAuth 2.1 with PKCE for AI assistants, and search that is computed on the server without sending content to third parties. It does not provide end-to-end encryption: the operator of a Memex server can technically read the notes stored on it. This page describes both sides.
What the operator of a server can read
Notes are stored on the server as plain Markdown files, and Memex does not encrypt them at rest or end to end. This is a consequence of what Memex does: the server must read the notes to index them, to search them and to serve them to your assistants.
- The administrator of the server, and anyone with access to its disk or its backups, can read every note.
- Inside the application, an account with the instance-wide
adminrole can read every brain. - On the hosted service, the operator is the party named in the legal notice. On a self-hosted instance, the operator is you.
If your notes must not be readable by anyone else, host Memex yourself on a machine you control, and protect that machine and its backups accordingly.
What is not sent to third parties
- Indexing and search. The keyword index and the embeddings of semantic search are computed by code and a model that run inside the Memex process. No note, query or vector is sent to another service. There is no remote inference and no telemetry.
- The embedding model. The only network access semantic search makes is the one-time download of the model from the project’s release. Each file is checked against a SHA-256 hash compiled into the binary, and checked again every time the model is loaded.
- Updates. A server checks the project’s GitHub releases for new versions. Nothing about the instance is sent other than what any HTTP request reveals (its IP address and a
memex/<version>user agent).
Notes do reach a third party in one case, which you control: when you connect an AI assistant, it reads the notes you allowed, and what it reads is processed by that assistant’s provider under that provider’s terms. Memex limits what the assistant can reach; it cannot govern what the provider does with what was read. Notifications, when an administrator configures them, are also delivered through the e-mail or messaging provider that administrator chose.
Accounts and sessions
- Passwords are hashed with Argon2id and must have at least 10 characters.
- Every token (session, invitation, password reset, OAuth code, access and refresh tokens) is 256 random bits, opaque, and stored only as a SHA-256 hash. A stolen database does not contain usable credentials.
- Web sessions use an
HttpOnly,SameSite=Laxcookie, markedSecureover HTTPS, valid 30 days. Changing or resetting a password closes every session of the account. - Login, sign-up and client registration are rate limited per IP address and per account. Login and password-reset requests answer the same way whether or not the account exists.
- You can delete your own account with your current password. Sessions, AI connections, tokens and access grants go with it. Notes you wrote in brains shared with other people stay there, and the history keeps your name.
AI clients: OAuth 2.1 and MCP
Memex is its own OAuth 2.1 authorisation server. An AI client never receives your password and never holds a credential that you typed.
- Authorisation code flow with PKCE (
S256only), public clients only. - Clients identify themselves with a Client ID Metadata Document or register dynamically (RFC 7591). Redirect URIs must match exactly what was registered.
- Access tokens last 1 hour; refresh tokens last 30 days and rotate at each use. Reusing a refresh token or an authorisation code revokes the whole connection.
- The consent screen is per folder: you tick the folders the client may see and choose read or read-write for each. The effective right is always the minimum of your current right and that limit, evaluated at each request.
- An AI client is capped at
editor: it cannot change rights, manage members, delete brains or touch account settings. - Every change records the user, the interface (
mcp) and the client name, in the change log and in the version history. - Connections are listed under Settings → Connected AIs and can be revoked there; revocation is immediate.
The practical side is described in For your AI.
Web application and files
- State-changing requests from another origin are refused, and cookies are
SameSite=Lax. Cross-origin access is open only on the OAuth protocol endpoints and/mcp, which never read cookies. - Pages are served with a strict Content-Security-Policy (own scripts and WebAssembly only, no framing) and
Referrer-Policy: no-referrer. - Notes are treated as untrusted input: the reading view escapes raw HTML, and an uploaded HTML or SVG file cannot run script on the origin.
- Paths are validated in one place: no
.., no absolute paths, no reserved names. The server refuses to follow symbolic links and writes files atomically. - The history of each brain is a separate git repository kept beside it, with one commit per change.
- Self-updates of a server are verified with a minisign signature against a public key compiled into the binary before anything is replaced.
Known limitations
These are stated in the product’s own security documentation and repeated here so that nothing is implied that is not true.
- No encryption at rest and no end-to-end encryption. See the first section of this page.
- Instance administrators can read every brain.
- No two-factor authentication yet.
- A user who could read a note keeps whatever they copied. Revoking access removes the note from their synced copy at the next sync but cannot erase the past.
- Rate limits are kept in memory per process: a restart resets them.
- The owner of a sub-folder can deny it to the owner of the brain, because the deepest grant wins for everyone except an instance administrator.
- Change feeds are filtered by rights, but gaps in their sequence numbers reveal that something changed elsewhere in the brain.
Reporting a vulnerability
Please report security problems privately, through a GitHub security advisory, rather than in a public issue. The complete model is in the product documentation: security model. How personal data is handled on the hosted service is described in the privacy policy.