Connect Codex to Mem
Set up in minutes
Choose where it runs
On your computer through your own Codex, or hosted in the cloud. The rest of setup adapts to your choice:
Pick what it can do in Mem
A preset of real Mem operations. Each one becomes a tool the agent can call, and it can't touch anything outside the list.
Connect Mem
One sign-in. The agent acts through your account, scoped to the operations you picked.
Add your personal MCP link
The last step mints a private MCP URL for this agent and walks you through exactly this, with your real link filled in. The page flips to Connected the moment your Codex first calls in. Codex connects when a session starts — run codex, or restart a running one (in the Codex app, Restart).
Run this in your terminal. The Codex app shares its config, so it gets the server too
<your-link> is your personal server URL — setup mints it for you.
Tools Codex gets
Mem
20 toolsList notes visible to the authenticated caller with cursor pagination. When multiple `contains_*` fields are true, a note may match any of them. Results are ordered by `order_by` and return `next_page` when additional rows are available. For relevance-ranked retrieval by query, use `POST /v2/notes/search`.
Create a note with an optional note ID, timestamps, and collection links. If omitted, Mem generates the note ID. The first line of `content` becomes the note title.
Fetch the full current state of a single note by ID. If the note is in trash, the response still returns the note and includes `trashed_at`. For discovery flows, use `GET /v2/notes` or `POST /v2/notes/search`.
Submit a complete markdown body for a note and the exact `version` being updated. Send the full desired body in `content` (not a partial markdown patch). The first line of `content` becomes the updated title. Trashed notes must be restored before they can be updated.
Permanently delete a note. Hard-deleted notes cannot be restored. For recoverable removal, use `POST /v2/notes/{note_id}/trash`.
Soft-delete a note by moving it to trash. Trashed notes can be restored via `POST /v2/notes/{note_id}/restore`. For irreversible deletion, use `DELETE /v2/notes/{note_id}`.
Restore a previously trashed note to the active note set. This only reverses soft-delete lifecycle state. Notes permanently deleted via `DELETE /v2/notes/{note_id}` cannot be restored.
Set a note's visible creation timestamp without changing its content. The supplied `created_at` must include a timezone offset and cannot be in the future. It can only backdate the note: the timestamp cannot be later than when the note was originally created. This operation changes note metadata only. Trashed notes must be restored before their creation date can be changed.
Find notes semantically related to the current persisted content of a note. The source note is embedded at request time, so newly created or recently updated notes can be used before asynchronous indexing catches up. Candidate related notes still come from the note search index.
Search notes using a required free-text query and structured filters. When multiple `filter_by_contains_*` fields are true, a note may match any of them. Returns note results from a bounded search snapshot with deterministic offset pagination. Query-based searches are relevance-ranked within the bounded search snapshot window. Reuse the returned `snapshot_id` when requesting later pages. The returned `total` reflects the bounded search snapshot, capped by the 100-result search window. For deterministic chronological pagination across all accessible notes, use `GET /v2/notes`.
List collections visible to the authenticated caller with cursor pagination. Results are ordered by `order_by` and return `next_page` when additional rows are available. For relevance-ranked retrieval by query, use `POST /v2/collections/search`.
Create a collection with optional caller-provided ID and timestamps. If `id` already exists, this request returns a conflict. Use collection membership endpoints to add, remove, or move notes between collections.
Fetch metadata for a single collection by ID. This endpoint returns collection metadata only, not a note list for that collection. For discovery flows, use `GET /v2/collections` or `POST /v2/collections/search`.
Update metadata for a collection by ID. Use this endpoint to rename a collection by setting `title`. This endpoint updates only provided fields (`title`, `description`) and leaves omitted fields unchanged. For read-only retrieval, use `GET /v2/collections/{collection_id}`.
Permanently delete a collection. Hard-deleting removes the collection resource itself. For membership-only changes, use note add, remove, or move collection endpoints.
Add an existing note to an existing collection. This operation only creates the membership link and does not modify note or collection content. Use create endpoints to create notes or collections.
Remove a note from a collection while keeping both resources. This operation only removes the membership link between IDs. Use note/collection deletion endpoints to remove resources.
Move a note from one collection to another collection. This operation adds the note to the target collection, then removes it from the source collection. It does not modify note or collection content.
Search collections using free-text relevance matching. Returns a bounded relevance-ranked result set and does not return `next_page`. For deterministic chronological pagination, use `GET /v2/collections`.
Mem It
About Codex
Frequently asked questions
More ways to connect
Open your Codex agent in one click.
NoClick runs Codex for you with Mem wired in as tools. Connect your account and run.