SETUP GUIDES

Connect your agents to Dray

Bring your saved memory into your coding agent, and save what you work on next. Coding setup needs no Chrome extension.

Coding agents: one command

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

For Claude Code, Codex, Cursor, Grok Build, OpenCode and Antigravity. It approves this computer and asks which agents to set up. Then it saves their sessions and connects them to your memory, with no page to approve per agent. See setup details.

Every other agent and app

Server URL
https://mcp.withdray.com/mcp

Add this server in your agent, choose HTTP or Streamable HTTP, and sign in when it asks. Already connected? Keep that connection. How sign-in works.

Set up coding agents with the Dray CLI

One command sets up Claude Code, Codex, Cursor, Grok Build, OpenCode and Antigravity. It saves their new sessions through hooks or a plugin, and connects each one to your memory. You don’t need the browser extension. Run it once in your terminal:

Terminal
curl -fsSL https://api.withdray.com/cli/install.sh | sh
  1. You paste the install command into your terminal.
  2. Your browser opens Dray, and you connect your coding agents to your account.
  3. Setup lists the agents it found, all ticked. You press Enter to keep them.
  4. Each one saves its sessions, and its memory tools connect to Dray directly, with no page to approve per agent.
  5. Setup offers to import local history, and trusts Codex’s hooks for you.
  6. dray status shows your plan, this month's usage, and which agents used memory from which.
  7. dray activity shows a calendar of lookups, a bar per agent, and the latest lookups.
  1. Your browser opens Dray. Use the same Dray account as your web chats and choose Connect coding agents. This approves the computer; you don’t need the Chrome extension.
  2. Setup lists the agents it found, all ticked. Untick any you want to leave out with the arrow keys and space, then press Enter. --agents claude,codex picks them without asking.
  3. For each agent, setup installs capture hooks or a plugin and Dray instructions. It also connects the agent to your memory directly, approved with this computer’s sign-in, so no Dray page opens for each one. The key for that connection stays in ~/.dray and renews by itself. Cursor keeps its copy in its own settings, readable only by you. In Claude Code, Grok Build and Antigravity, setup also lets Dray’s read-only memory tools run without asking. Saving to memory and writing to chat links still ask.
  4. Setup asks once whether to turn on Token saver, a free extra that cuts your agents’ token use. It stays off unless you say yes.
  5. Setup offers to import the last 30 days of local session history from Claude Code, Codex, Grok Build, OpenCode and Antigravity. Cursor saves new sessions through hooks; it has no local history import.
  6. In Codex, setup trusts Dray’s hooks for you. /hooks lists them, and turns any of them off.
  7. Cursor picks its hooks up by itself, in the editor and in cursor-agent. Runs with cursor-agent -p aren’t saved, because Cursor fires no hooks there. cursor-agent asks once per project before it uses Dray’s tools: cursor-agent mcp enable dray.
  8. Setup also adds a dray command to ~/.local/bin. If that folder isn’t on your PATH yet, setup prints the one line to add.
  9. Restart Codex, OpenCode, Cursor and Antigravity so they load the hooks and the connection. New Claude Code sessions use it straight away, and Grok Build picks it up at once.

Already using Dray on claude.ai? Claude Code is a separate client. Setup gives it a direct connection, which replaces the claude.ai connector inside Claude Code and answers faster. A synced Dray plugin may already supply hooks, but this computer still needs its own Dray sign-in before they can upload. Web chats already saved to your Dray account are shared memory; the CLI imports local coding transcripts, not claude.ai history or Claude’s native memory.

Importing brings existing local sessions into Dray without replaying them in a browser. Uploading and learning are separate steps, so new context may take time to appear in a search. Run dray status to check sign-in, capture, each agent’s memory connection and pending uploads. Then ask the agent to look up a detail you know is saved.

Dray saves what you type, the answer each turn ends on and the images you paste into a prompt. It leaves out tool calls, command output, file contents and the agent’s reasoning, and anything in the text that looks like a key or password is removed on your computer before anything is sent. On macOS, the CLI also saves Cowork sessions, the Claude desktop app’s agent mode. It reads only their session transcripts from the app’s folder, whenever Dray runs for something else (another agent’s hook, the daily update check or an import), and saves them as Claude Code sessions titled “Claude Code · Cowork · …”. Added sessions count toward your plan’s monthly allowance like any other messages. Setup also tells Dray which agents are connected on this computer, by name only, so the side panel can show them.

See your plan and usage
dray status shows your plan, how much of this month’s learning and lookups you’ve used, and which agents used memory from which. Below that: the agents it saves from on this computer, anything waiting to upload, and the last problem.
See how your agents use it
dray activity draws the last 90 days of lookups as a calendar, with a bar for each agent and the latest lookups with what each one found. Add --days 30 for a shorter window, or --json for the numbers.
Watch Dray status and activity0:34 · YouTube
Images
An image you paste into Claude Code, Codex, Grok Build or OpenCode is saved with its turn and appears under Files, where connected assistants can find it. A new setup starts with this on. dray images off stops it; dray images on starts it again and offers to add the images from sessions saved in the last 30 days. Images go as they are, so a screenshot of a terminal keeps what it showed. No images come from Cursor, whose hooks don’t pass them, or from Antigravity.
Token saver
A free extra that cuts the tokens your agents use, so you hit your usage limits later. It’s off unless you turn it on: setup asks once, and dray tokens on or dray tokens off changes it any time. When it’s on, Claude Code, OpenCode and Grok Build get a one-page outline of a big file instead of the whole thing. Claude Code and OpenCode also get smaller copies of big images and browser screenshots. The agent can still read the full file when it needs it. It can’t overwrite a file it has only seen in outline until it has read all of it. All of this happens on your computer, and your Dray memory works the same either way. If another tool you use already changes what file reads return, setup and dray tokens on name it, since you may not need both. While it’s on, your agents’ Dray instructions also mention dray prep. It turns a video or a batch of screenshots into one page of the text on them and a contact sheet, so the agent opens single frames only where it needs to. You can run it yourself too. Videos need ffmpeg. Codex, Cursor and Antigravity don’t support it: their hooks can’t change what a file read returns.
Memory connections
dray mcp lists each agent’s connection and when its key renews. dray mcp on connects the agents Dray is installed on, or the ones you name with --agents. dray mcp off takes them out, with the rules that let their read tools run without asking, and revokes their keys. dray setup --no-mcp sets up saving and leaves each agent’s connections as they are.
dray links lists them. dray links 2 reads link 2 from the start, and --follow keeps printing new messages. search WORDS finds messages in it, and file SEQ saves the file on a message. dray link watch ID prints a line each time something on a link is for that chat, for Grok Build and Cursor, which only a command they started can wake.
Watch chat links in your terminal0:26 · YouTube
Updates and sign-in
The CLI updates itself once a day. dray update installs the latest now, and dray update off stops the daily check. dray login signs in again, and dray logout signs out and revokes this computer’s access.
Watch CLI updates and sign-in0:36 · YouTube
Scripted runs
Unattended runs aren’t saved: claude -p and Agent SDK runs, codex exec, opencode run and anything under CI. dray config scripted on saves them too, and dray config scripted off undoes it.
Stop for a while
dray pause, then dray resume. For one terminal, start the agent with DRAY_CAPTURE=0.
Keep a codebase out
Add a DRAY.md with save: no in its front matter. Committed, it holds for everyone who works on that repository with Dray; DRAY.local.md is just for you, and exclude covers a folder on this computer only. A project: line files the codebase’s sessions under one project instead.
Hide or delete a session
dray sessions lists what was saved from the folder you’re in. hide keeps the newest out of every agent’s memory and unhide undoes it; forget deletes it for good and stops saving it.
Watch what Dray saves from coding agents0:42 · YouTube
Remove it
dray uninstall takes the hooks and memory connections out and revokes their keys. --purge also removes ~/.dray and the dray command. Revoke this computer under your devices.

It needs Node.js 18 or later on macOS or Linux; Codex’s compressed older sessions need 22.15 or later to read, and OpenCode’s history needs 22.13. On Windows, run the installer inside WSL: dray setup refuses to run natively, though your web chats still save there through the Chrome extension. This computer’s sign-in lasts about 90 days. After that Claude Code asks you to sign in again, and new sessions wait on your computer until you do. The agents’ memory connections renew by themselves. Until ~/.local/bin is on your PATH, node ~/.dray/dray.mjs status runs the same commands.

Claude Code

Watch Claude Code setup0:37 · YouTube

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

To connect Claude Code by hand instead, add the server below. The user scope makes Dray available in every project.

Terminal
claude mcp add --transport http --scope user dray https://mcp.withdray.com/mcp
  1. Start Claude Code and type /mcp.
  2. Choose dray, then Authenticate. Your browser opens Dray’s sign-in page.
  3. Choose Connect. If the sign-in page asks for the extension, choose Use an access key instead and paste the output of dray key there. Back in Claude Code, claude mcp list shows dray as connected.

Sign in from an interactive session first. Non-interactive runs like claude -p can’t open the sign-in page.

Claude Code documentation ↗

More about Dray with Claude Code

Codex

Watch Codex setup0:41 · YouTube

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

The Codex CLI, the IDE extension and the ChatGPT desktop app share one config, so one connection covers all three. To connect by hand instead:

Terminal
codex mcp add dray --url https://mcp.withdray.com/mcp
codex mcp login dray

The second command opens Dray’s sign-in page. Check with codex mcp list, or /mcp inside Codex.

Codex documentation ↗

More about Dray with Codex

Grok Build

Watch Grok Build setup0:38 · YouTube

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

Setup connects Grok Build to your memory directly, at once. Without the CLI, if you connected Dray to Grok on grok.com, Grok Build already has it through grok.com: type /mcps and it’s listed as Dray (managed). Otherwise run:

Terminal
grok mcp add --transport http dray https://mcp.withdray.com/mcp

Then type /mcps inside Grok Build, select dray and press i to sign in.

More about Dray with Grok Build

Antigravity

Watch Antigravity setup0:45 · YouTube

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

Setup installs a Dray plugin in ~/.gemini/config/plugins/dray that saves your sessions, and adds Dray’s memory tools to Antigravity’s own ~/.gemini/config/mcp_config.json. The agy CLI, the Antigravity app and the IDE share that folder, so one setup covers all three. With Dray installed, you can also set up Antigravity alone:

Terminal
dray setup --agents antigravity

Antigravity can’t sign in to Dray’s server directly yet, so its memory tools connect through a small bridge that the Dray CLI runs. Restart agy afterwards, then type /mcp: Dray is listed as dray, with its tools.

Antigravity documentation ↗

More about Dray with Antigravity

Still using Gemini CLI?

Google replaced Gemini CLI with Antigravity for free, Google AI Pro and Ultra users on June 18, 2026. Gemini Code Assist Standard and Enterprise licenses, and paid API keys, still have access. Read Google’s announcement. If you still use Gemini CLI:

Terminal
gemini mcp add --transport http --scope user dray https://mcp.withdray.com/mcp

Gemini CLI opens the sign-in page the first time it connects. To run it again, type /mcp auth dray. Check with /mcp.

Editing settings.json by hand? Use httpUrl, not url. In Gemini CLI, url means the older SSE transport, which Dray doesn’t use. Sign-in also needs a browser on the same machine, so it won’t work over SSH.

GitHub Copilot CLI

Terminal
copilot mcp add --transport http dray https://mcp.withdray.com/mcp

Sign in with /mcp auth dray inside Copilot CLI, then check with copilot mcp list. It doesn’t read VS Code’s MCP settings, so add Dray to each one separately.

GitHub Copilot CLI documentation ↗

OpenCode

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

If your settings are in opencode.jsonc, setup leaves that file alone and prints the lines to add. To connect by hand instead, add this to opencode.json:

opencode.json
{
  "mcp": {
    "dray": { "type": "remote", "url": "https://mcp.withdray.com/mcp" }
  }
}

Sign in with opencode mcp auth dray and check with opencode mcp list.

OpenCode documentation ↗

More about Dray with OpenCode

Amp

Terminal
amp mcp add dray https://mcp.withdray.com/mcp

Amp opens the sign-in page when it next starts. Check with amp mcp check dray.

Amp documentation ↗

Goose

Run goose configure, choose Add Extension, then Remote Extension (Streamable HTTP). Name it dray and paste the server URL. Goose opens the sign-in page on first use.

Goose documentation ↗

Warp

Open Settings › Agents › MCP servers, choose Add, and paste:

Warp MCP server
{
  "dray": { "url": "https://mcp.withdray.com/mcp" }
}

Warp opens the sign-in page when it first connects.

Warp documentation ↗

Cursor

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

Setup saves your Cursor sessions and connects Cursor to your memory. To connect by hand instead:

Add Dray to Cursor

Or add it by hand to ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:

mcp.json
{
  "mcpServers": {
    "dray": { "url": "https://mcp.withdray.com/mcp" }
  }
}

Cursor opens the sign-in page the first time it connects. Dray then appears with its tools in Cursor’s MCP settings. In the Cursor CLI, sign in with agent mcp login dray.

Cursor documentation ↗

More about Dray with Cursor

T3 Code

The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.

Install Dray CLI
curl -fsSL https://api.withdray.com/cli/install.sh | sh

T3 Code runs Claude Code and Codex for you. Setup finds T3’s Claude and Codex profiles and sets them up with the rest: their sessions saved, their hooks trusted and their memory connections made. Restart T3’s providers afterwards. With Dray installed, you can also set up T3 alone:

Terminal
dray setup --agents t3

VS Code

For GitHub Copilot in agent mode.

Install Dray in VS Code

Or run MCP: Add Server from the Command Palette. To edit by hand, open MCP: Open User Configuration, or .vscode/mcp.json for one workspace:

mcp.json
{
  "servers": {
    "dray": { "type": "http", "url": "https://mcp.withdray.com/mcp" }
  }
}

VS Code opens the sign-in page on the first connection. Check with MCP: List Servers. On Copilot Business or Enterprise, an admin has to turn on the “MCP servers in Copilot” policy first. It’s off by default.

VS Code documentation ↗

Windsurf

Windsurf is now called Devin Desktop. In the Cascade panel, open the … menu, then MCPs › Open MCP config file, and add:

mcp_config.json
{
  "mcpServers": {
    "dray": { "serverUrl": "https://mcp.withdray.com/mcp" }
  }
}

Dray then shows in the MCPs list with its tools. On a Teams or Enterprise plan, an admin may need to allow it.

Windsurf documentation ↗

Zed

Open Settings › AI › MCP Servers › Add Server › Add Remote Server, or add this to your settings file:

settings.json
"context_servers": {
  "dray": { "url": "https://mcp.withdray.com/mcp" }
}

Zed asks you to sign in. A green dot beside dray means it’s connected.

Zed documentation ↗

Cline

Open MCP Servers, then the Remote Servers tab. Name it dray, paste the server URL and choose Streamable HTTP. By hand, it looks like this:

cline_mcp_settings.json
{
  "mcpServers": {
    "dray": { "type": "streamableHttp", "url": "https://mcp.withdray.com/mcp" }
  }
}

Keep the type. Without it Cline falls back to SSE, which Dray doesn’t use.

Cline documentation ↗

JetBrains

AI Assistant can’t run the sign-in itself yet, so it connects through a small bridge that needs Node.js. Open Settings › Tools › AI Assistant › Model Context Protocol (MCP), choose Add, and paste:

AI Assistant MCP server
{
  "mcpServers": {
    "dray": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.withdray.com/mcp"]
    }
  }
}

The bridge opens the sign-in page the first time. Junie works without the bridge: add dray with the server URL to ~/.junie/mcp/mcp.json, then type /mcp, pick dray and choose Authorize.

JetBrains documentation ↗

ChatGPT

Watch ChatGPT setup1:20 · YouTube

Dray for Chrome sets this up for you. To do it by hand on the web:

  1. Open chatgpt.com/plugins, choose Add, then Add custom MCP server.
  2. Name it Dray, paste the server URL and leave Authentication on OAuth.
  3. Tick the box, then choose Create as a plugin.
  4. Choose Continue to Dray, then Connect on Dray’s page.

Adding apps needs a paid ChatGPT plan. Ticking the box says you understand OpenAI’s warning, and our guide to ChatGPT custom apps explains what you agree to.

More about Dray with ChatGPT

Claude

Watch Claude setup1:10 · YouTube

Dray for Chrome sets this up on claude.ai. One connection covers Claude on the web, the desktop app and mobile. To do it by hand:

  1. Open claude.ai/customize/connectors, choose Add, then Add custom connector.
  2. Name it Dray, paste the server URL, choose Continue, then Add.
  3. Choose Connect, then Connect on Dray’s page.

Free plans allow one custom connector. On Team and Enterprise plans, an owner adds it for the organization and each member chooses Connect.

Claude documentation ↗

More about Dray with Claude

Grok

Watch Grok setup1:09 · YouTube

Dray for Chrome sets this up for you. To do it by hand:

  1. Open grok.com/connectors, choose New Connector, then Custom.
  2. Name it Dray, paste the server URL and choose Add Connector.
  3. Sign in to Dray in the window that opens and choose Connect.

More about Dray with Grok

Any MCP client

Dray works with any client that supports remote MCP servers over HTTP with OAuth sign-in. Give it the server URL, and choose HTTP or Streamable HTTP rather than SSE.

If a client only runs local servers, connect through the mcp-remote bridge. It needs Node.js and opens the sign-in page for you:

Local server command
npx -y mcp-remote https://mcp.withdray.com/mcp

How sign-in works

Dray declares separate read and write permissions. See the MCP permissions and tools before approving a custom client.

Agents set up by the Dray CLI (Claude Code, Codex, Cursor, Grok Build, OpenCode and Antigravity) sign in through this computer. Setup approves each one with the sign-in you gave the CLI, so no Dray page opens for them. Each still gets a connection of its own: dray mcp lists them, and dray mcp off removes one.

For any other agent, the first time it connects, a Dray page opens in your browser saying that agent wants to use your Dray memory. Choose Connect and go back to the agent.

If that page asks for Dray for Chrome and you use the CLI instead, approve this computer first with dray setup or dray login. Then choose Use an access key instead and paste what dray key prints. Paste it only there: anyone with it can read your memory. Keep it out of chats and bug reports.

With Dray for Chrome, the extension can fill your sign-in for you. Open that page in Chrome with Dray signed in. Both routes connect to the same Dray account; the extension is optional for coding agents.

A connection renews itself while the agent uses it, and ends after 90 days unused. The agent then reports that Dray needs authentication, and you sign in again the same way. Agents set up by the CLI get a new key by themselves.

Troubleshooting

A coding agent doesn’t show Dray’s tools
Run dray mcp. If the agent’s line doesn’t say direct, dray mcp on connects it; then restart the agent. Dray added by hand isn’t listed there, so check it in the agent’s own MCP list.
The connection fails straight away
Check the type is HTTP or Streamable HTTP. Dray doesn’t support the older SSE transport.
The sign-in page asks you to sign in to the extension
For a coding agent, sign in with the CLI, then choose Use an access key instead on that page and paste the output of dray key privately. You don’t need to install the extension. If you already use Dray for Chrome, opening the page there also works.
Dray works on claude.ai, but Claude Code says it can’t sync
Check the two directions separately. MCP tools read memory already saved to your account. Local hooks save Claude Code sessions only after this computer is approved: run dray status, then dray setup if capture is missing or dray login if sign-in expired. Restart Claude Code. A missing Chrome extension is not a coding-sync failure.
A scripted run wasn’t saved
Unattended runs (claude -p, Agent SDK, codex exec, opencode run, CI) aren’t saved unless you run dray config scripted on. Cursor fires no hooks for cursor-agent -p, so those runs are never saved.
It worked for months, then stopped
A connection ends after 90 days unused. One made before Dray could renew connections ends 90 days after it was made, used or not. For an agent the CLI set up, dray mcp on connects it again. For any other agent, sign in again from its MCP menu.
Your company’s agent won’t add servers
Some business plans switch MCP off or allow only approved servers. Ask your admin to allow Dray.
The agent connects but finds no memory
Ask it to use Dray by name, for example: Use Dray to tell me what you remember about this project. If it still finds nothing, run the checks on the help page.

Agent not listed, or still stuck?

Tell us which agent you use and what happened. We’ll reply by email.