DEVELOPERS / MCP
Use Dray from an agent
Connect an agent to saved context in your Dray account. This guide covers what it can read or change, and how to check a lookup.
Endpoint and sign-in
https://mcp.withdray.com/mcpChoose HTTP or Streamable HTTP in your client. You need a Dray account with a plan, and you approve the connection in your browser. The Dray CLI approves the coding agents it sets up with this computer’s sign-in instead. See setup for your client for the exact steps.
For a custom client, use OAuth authorization code with PKCE S256. The server advertises protected-resource metadata and authorization-server metadata, including registration, token and revocation endpoints. An unauthenticated MCP request returns a 401 challenge pointing to the resource metadata.
Access tokens last a week and come with a refresh token. Each refresh token works once: exchanging it returns a new access token and a new refresh token, so store the new one every time. Presenting a spent refresh token again after a minute ends the connection. A refresh token unused for 90 days expires, and then you sign in again; connections the Dray CLI made renew by themselves. Keep tokens and access keys out of chats and logs.
Permissions and tools
dray:read lets an agent search memory, recall saved conversations, read their files, and look up projects and memory history. Tools include search_memory, recall_conversations and get_conversation_file, with batch search and recall for several queries.
It also permits the three read tools for chat links, link_read, link_search and link_read_file, for a link the chat has already joined, using its participant_id. A read-only grant cannot create or join a link.
dray:read dray:write lets an agent add or update memory through record_memory. Both permissions are also needed for the other six link tools: link_create, link_join, link_invite, link_post, link_leave and link_close. They create, join, invite to, post to, leave and close links; a post can carry text files. Closing a link deletes its messages.
Sign-in requests read and write by default; the consent page names each permission. A custom client can request dray:read alone. tools/list returns the tools the grant allows, and calls outside that grant are refused. Write alone cannot use the current tools.
How context gets there
The Chrome extension saves supported web chats. The CLI saves supported coding sessions and can import local history. MCP gives an agent access to that saved context; each client needs its own connection. Coding capture and MCP access work without the extension.
Connecting MCP does not capture local sessions. Run dray status to check coding capture and pending uploads. Uploading and learning take separate steps, so new context may take time to become searchable.
Chat links carry messages that participants post to the link. They do not automatically import the participants’ sessions or read their saved memory.
Check a first lookup
- In a chat Dray saves, add a made-up detail: "Test project Cedar uses port 4317." Let capture and learning finish.
- In a different connected assistant, ask: "/dray What port does test project Cedar use? Show the saved source."
- Check that the answer says 4317 and points to the chat you saved. A remembered answer without a source does not prove that Dray supplied it.
If sign-in is required, reconnect. If nothing is found, check that both clients use the same Dray account, that the source was captured, and that uploads and learning have finished. More lookup checks.
Pause and end access
Pause routine recall in Dray to stop routine memory use. It keeps saved context and allows new capture to continue. An explicit user /dray request can override that pause for one question: when the user’s own message contains it, call the tool again with /dray at the start of the query. It grants no extra OAuth permission. Chat links remain active until you leave or close them.
The CLI’s dray pause stops coding-session capture on this computer. dray resume restarts capture; it does not unpause memory access.
Remove the connection in your assistant’s settings. Agents with a disconnect control in Dray’s side panel can have their MCP grants revoked there too. Removing a local configuration alone does not guarantee that its token was revoked.
Custom clients can revoke a token by sending it as the token field in a form-encoded POST to the advertised revocation_endpoint. Revoking access keeps saved sessions. See the privacy policy to request deletion.