> ## Documentation Index
> Fetch the complete documentation index at: https://docs.staging.relayapp.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Connect Cursor to Relay and check its messaging setup.

## Before you start

* [Cursor](https://cursor.com/downloads), installed and signed in.
* Node.js 22.22.3 or newer.

## Connect

Run this in the folder where you work to connect cursor to Relay.

```bash theme={null}
npx relaymessenger@staging connect cursor
```

Follow the prompts to choose or create an agent and approve the change. Leave the command running: it answers each message with Cursor from the folder you ran it in. Control-C stops it. Relay's tools travel through the session, so no MCP file is written.

### Do it by hand

```bash theme={null}
ln -s "$PWD/plugins/relay" .cursor/plugins/local/relay
```

## Send it a message

Open Relay on your phone and message the handle. While connect runs, Cursor answers on its own in the same chat, and each chat keeps its own ACP session.

## What it can do

These come from the connection code for `cursor` and the Relay MCP tool list.

| Relay feature | Cursor |
| - | - |
| Connect | Connect writes no MCP file; Relay drives Cursor over ACP and its tools travel through the session. |
| Start | Connect stays running and drives `cursor-agent acp` in its folder, one message at a time. |
| Wakes when a message arrives | Yes, it answers on its own while connect runs, one message at a time. |
| Reply in the chat | Yes, text up to 10,000 characters, with a stable idempotency key. |
| A reply to an earlier Message | Yes. When a person swipe-replies, the agent reads the bubble they swiped, who sent it and what it says, beside their words. |
| Send attachments | No. The MCP tools send text only. |
| Receive attachments | Yes. Photos and files are saved under \~/.config/relay/media and their paths are added to the message, so the agent opens them with its own file tools. |
| Read chat history | Yes, by chat, oldest or newest first, one page at a time. |
| React, type, mark read | Yes, with reactions, typing indicators, and read marks. |
| Contact card | Yes, read and set the agent's name and picture. |
| Buttons | Yes; see [Buttons](https://docs.staging.relayapp.im/interactions/buttons.md). A tap comes back as a message whose text is the label. |
| Link preview | Yes; a URL alone on its own line in the answer goes out as its own link message, drawn as a card; see [Rich link previews](https://docs.staging.relayapp.im/messages/rich-link-previews.md). |
| Tool approvals | Cursor asks with its own settings. Each question goes to the agent's owners as a card in the Relay app; see [Approve tools from your phone](https://docs.staging.relayapp.im/cli/connect.md#approve-tools-from-your-phone). |

## When it fails

* `No reply yet. Run: relay watch @<handle>` Connect is not running, or Cursor is still working; run connect again and it answers from there.

Use the [CLI guide](https://docs.staging.relayapp.im/cli/index.md) for prompt, token, and restart errors.

[Selection](https://docs.staging.relayapp.im/interactions/selection.md). End the final answer with a `selection` JSON fence holding the question as `title` (1 to 60 characters) and the `options`; any words outside the fence go as a normal message above the card. The shared ACP bridge preserves `selected_values`, `reply_to`, and ordered rich parts as data alongside the readable bullet text.

[Payments](https://docs.staging.relayapp.im/interactions/payments.md). End the final answer with a `payment` JSON fence holding the payment request's fields, named as in the API. Connect creates the request with its own Relay token, any words before it go out first, and the card follows as its own Message. If Relay refuses the request, the terminal says why and sends no card.

## Next steps

* [Send messages](https://docs.staging.relayapp.im/messages/send.md)
* [Read message history](https://docs.staging.relayapp.im/chats/history.md)
* [Add Relay guidance](https://docs.staging.relayapp.im/integrations/skills.md)
* [Relay plugin source](https://github.com/RelayMessenger/Relay-SDK/tree/staging/plugins/relay)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.