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
curl -fsSL https://api.withdray.com/cli/install.sh | shFor 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
https://mcp.withdray.com/mcpAdd 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:
curl -fsSL https://api.withdray.com/cli/install.sh | sh- You paste the install command into your terminal.
- Your browser opens Dray, and you connect your coding agents to your account.
- Setup lists the agents it found, all ticked. You press Enter to keep them.
- Each one saves its sessions, and its memory tools connect to Dray directly, with no page to approve per agent.
- Setup offers to import local history, and trusts Codex’s hooks for you.
- dray status shows your plan, this month's usage, and which agents used memory from which.
- dray activity shows a calendar of lookups, a bar per agent, and the latest lookups.
- 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.
- 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,codexpicks them without asking. - 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
~/.drayand 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. - 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.
- 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.
- In Codex, setup trusts Dray’s hooks for you.
/hookslists them, and turns any of them off. - Cursor picks its hooks up by itself, in the editor and in
cursor-agent. Runs withcursor-agent -paren’t saved, because Cursor fires no hooks there.cursor-agentasks once per project before it uses Dray’s tools:cursor-agent mcp enable dray. - Setup also adds a
draycommand to~/.local/bin. If that folder isn’t on your PATH yet, setup prints the one line to add. - 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 statusshows 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 activitydraws 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 30for a shorter window, or--jsonfor the numbers.
Watch Dray status and activity- 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 offstops it;dray images onstarts 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 onordray tokens offchanges 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 anddray tokens onname it, since you may not need both. While it’s on, your agents’ Dray instructions also mentiondray 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 mcplists each agent’s connection and when its key renews.dray mcp onconnects the agents Dray is installed on, or the ones you name with--agents.dray mcp offtakes them out, with the rules that let their read tools run without asking, and revokes their keys.dray setup --no-mcpsets up saving and leaves each agent’s connections as they are.- Your chat links
dray linkslists them.dray links 2reads link 2 from the start, and--followkeeps printing new messages.search WORDSfinds messages in it, andfile SEQsaves the file on a message.dray link watch IDprints 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 terminal- Updates and sign-in
- The CLI updates itself once a day.
dray updateinstalls the latest now, anddray update offstops the daily check.dray loginsigns in again, anddray logoutsigns out and revokes this computer’s access.
Watch CLI updates and sign-in - Scripted runs
- Unattended runs aren’t saved:
claude -pand Agent SDK runs,codex exec,opencode runand anything under CI.dray config scripted onsaves them too, anddray config scripted offundoes it. - Stop for a while
dray pause, thendray resume. For one terminal, start the agent withDRAY_CAPTURE=0.- Keep a codebase out
- Add a
DRAY.mdwithsave: noin its front matter. Committed, it holds for everyone who works on that repository with Dray;DRAY.local.mdis just for you, andexcludecovers a folder on this computer only. Aproject:line files the codebase’s sessions under one project instead. - Hide or delete a session
dray sessionslists what was saved from the folder you’re in.hidekeeps the newest out of every agent’s memory andunhideundoes it;forgetdeletes it for good and stops saving it.
Watch what Dray saves from coding agents- Remove it
dray uninstalltakes the hooks and memory connections out and revokes their keys.--purgealso removes~/.drayand thedraycommand. 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 setup
The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.
curl -fsSL https://api.withdray.com/cli/install.sh | shTo connect Claude Code by hand instead, add the server below. The user scope makes Dray available in every project.
claude mcp add --transport http --scope user dray https://mcp.withdray.com/mcp- Start Claude Code and type
/mcp. - Choose dray, then Authenticate. Your browser opens Dray’s sign-in page.
- Choose Connect. If the sign-in page asks for the extension, choose Use an access key instead and paste the output of
dray keythere. Back in Claude Code,claude mcp listshows dray as connected.
Sign in from an interactive session first. Non-interactive runs like claude -p can’t open the sign-in page.
Codex
Watch Codex setup
The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.
curl -fsSL https://api.withdray.com/cli/install.sh | shThe Codex CLI, the IDE extension and the ChatGPT desktop app share one config, so one connection covers all three. To connect by hand instead:
codex mcp add dray --url https://mcp.withdray.com/mcp
codex mcp login drayThe second command opens Dray’s sign-in page. Check with codex mcp list, or /mcp inside Codex.
Grok Build
Watch Grok Build setup
The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.
curl -fsSL https://api.withdray.com/cli/install.sh | shSetup 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:
grok mcp add --transport http dray https://mcp.withdray.com/mcpThen type /mcps inside Grok Build, select dray and press i to sign in.
Antigravity
Watch Antigravity setup
The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.
curl -fsSL https://api.withdray.com/cli/install.sh | shSetup 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:
dray setup --agents antigravityAntigravity 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.
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:
gemini mcp add --transport http --scope user dray https://mcp.withdray.com/mcpGemini 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
copilot mcp add --transport http dray https://mcp.withdray.com/mcpSign 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.
OpenCode
The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.
curl -fsSL https://api.withdray.com/cli/install.sh | shIf 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:
{
"mcp": {
"dray": { "type": "remote", "url": "https://mcp.withdray.com/mcp" }
}
}Sign in with opencode mcp auth dray and check with opencode mcp list.
Amp
amp mcp add dray https://mcp.withdray.com/mcpAmp opens the sign-in page when it next starts. Check with amp mcp check dray.
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.
Warp
Open Settings › Agents › MCP servers, choose Add, and paste:
{
"dray": { "url": "https://mcp.withdray.com/mcp" }
}Warp opens the sign-in page when it first connects.
Cursor
The Dray CLI sets this up for you. Run this in your terminal, then choose the agents to connect. See all setup details.
curl -fsSL https://api.withdray.com/cli/install.sh | shSetup saves your Cursor sessions and connects Cursor to your memory. To connect by hand instead:
Or add it by hand to ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
{
"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.
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.
curl -fsSL https://api.withdray.com/cli/install.sh | shT3 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:
dray setup --agents t3VS Code
For GitHub Copilot in agent mode.
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:
{
"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.
Windsurf
Windsurf is now called Devin Desktop. In the Cascade panel, open the … menu, then MCPs › Open MCP config file, and add:
{
"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.
Zed
Open Settings › AI › MCP Servers › Add Server › Add Remote Server, or add this to your settings file:
"context_servers": {
"dray": { "url": "https://mcp.withdray.com/mcp" }
}Zed asks you to sign in. A green dot beside dray means it’s connected.
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:
{
"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.
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:
{
"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.
ChatGPT
Watch ChatGPT setup
Dray for Chrome sets this up for you. To do it by hand on the web:
- Open chatgpt.com/plugins, choose Add, then Add custom MCP server.
- Name it Dray, paste the server URL and leave Authentication on OAuth.
- Tick the box, then choose Create as a plugin.
- 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.
Claude
Watch Claude setup
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:
- Open claude.ai/customize/connectors, choose Add, then Add custom connector.
- Name it Dray, paste the server URL, choose Continue, then Add.
- 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.
Grok
Watch Grok setup
Dray for Chrome sets this up for you. To do it by hand:
- Open grok.com/connectors, choose New Connector, then Custom.
- Name it Dray, paste the server URL and choose Add Connector.
- Sign in to Dray in the window that opens and choose Connect.
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:
npx -y mcp-remote https://mcp.withdray.com/mcpHow 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 onconnects 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 keyprivately. 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, thendray setupif capture is missing ordray loginif 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 forcursor-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 onconnects 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.