How to connect Cursor to WhatsApp for a client business
If you build things for small businesses, sooner or later a client asks for "AI on our WhatsApp". Cursor is a comfortable place to start: you can add the Spaces MCP server, look at the client's real chats from the editor, try prompts against them, and write whatever code the project needs. This guide is for that developer. It covers the setup, who should own which account, how to test without sending anything you regret, why Cursor itself is not the thing that answers customers, and a hand-over checklist for the client.
What you need
- Cursor on your computer, with its agent chat.
- A Spaces account in the client's name. The trial starts when the first account is connected, with no card needed.
- The client's WhatsApp number, and the client with their phone for a minute to scan the QR code.
- Half an hour with the client to write down prices, hours and the things they never want promised.
- An hour or so for setup and a first look at the chats.
Step 1: connect your WhatsApp account to Spaces
You scan a QR code with the phone that has the number, the same way you would link WhatsApp on a computer. Your account stays yours, and you keep using it on your phone as normal.
Once it is connected, the account shows in your Spaces dashboard. Connecting does not send anything. It only means Spaces can read and send on that account when an AI agent you have added asks it to.
The number belongs to the client, so the client scans the QR code with their own phone. Use the number their customers already know. A brand-new number gets no new chats at all from Spaces for its first 24 hours, though replies to people who message it go out from day one.
Step 2: add Spaces to Cursor
- Add the block below to ~/.cursor/mcp.json, or to .cursor/mcp.json in one project.
- Cursor finds the Spaces sign-in on its own. Sign in to Spaces in the browser and approve access.
{
"mcpServers": {
"spaces": { "url": "https://api.spacesos.com/mcp" }
}
}To check it worked: Spaces shows with its tools in Cursor’s MCP settings. The MCP Logs output panel shows any error.
You sign in on Spaces' own page during this step, so Cursor never sees your WhatsApp login or your Spaces password. If Spaces does not show up:
- Check the address is exactly https://api.spacesos.com/mcp, with nothing added at the end.
- Run the sign-in step again, in case the first sign-in in the browser did not finish.
- Restart Cursor so it reads the new settings.
- If it still does not appear, the Cursor MCP docs have the current steps, and our Cursor setup page has ours.
Step 3: try it
Open Cursor's agent chat in the project and ask in plain words. Start with requests that only read:
- List the WhatsApp accounts on this Spaces workspace.
- Show me the ten most recent chats on the client's number, without sending anything.
- Group last week's incoming messages by what the customer wanted.
- Draft replies to today's unanswered chats using the notes in client-notes.md, and do not send them.
Start with a question that only reads, like the first one. It shows you that Cursor can see your WhatsApp messages before you let it send anything. Then try a draft, read it carefully, and only then let it send.
Good to know
Cursor acts when you ask it in the editor. It does not watch the client's WhatsApp on its own, and it stops when you close the chat. That makes it a good place to explore, test and build, but not the thing that answers customers at night.
For replies around the clock, move to an agent that runs all the time, such as Claude Code, Codex, OpenClaw or Hermes, or build on the Spaces API yourself. For set replies to set triggers, such as an out-of-hours message, a Spaces routine is simpler. A routine is not an AI. It sends text you wrote in advance.
Keep the client in the loop while you test. They know their customers, and the first drafts are where you learn what the business would and would not say.
Who owns what
Set the accounts up the way they will be run after you leave. That saves an awkward migration later and keeps the client in control of their own customers.
| Thing | Who should own it | Why |
|---|---|---|
| The WhatsApp number | The client | It is their customers' chats and their phone. |
| The Spaces account | The client | Billing, limits and the pause switch should sit with the business. |
| Access for your work | You, through the client's Spaces account | Sign in from Cursor, or use an API key they can revoke when you finish. |
| The business notes | The client, written with you | They know the prices and the things never to promise. |
| Any code you write | As your contract says | Agree it before you start. |
If you prefer an API key to signing in, keep it out of the repository and read it from an environment variable:
{
"mcpServers": {
"spaces": {
"url": "https://api.spacesos.com/mcp",
"headers": { "Authorization": "Bearer ${env:SPACES_API_KEY}" }
}
}
}Test on real chats without sending
The client's chats are real conversations with real customers, so treat the first days as read-only. A safe order of work:
- Start with reads only: list chats, read messages, group them. This shows you the questions the business actually gets.
- Write the business notes with the client from what you found, and keep them in a file in the project.
- Ask Cursor to draft replies to real chats and compare them with what the client would have said. Do not send.
- When drafts are reliably right, send a few to test numbers you control, such as your own phone.
- Only then let anything go to a customer, with the client watching the first ones.
Spaces also has approvals, where replies wait for a person to approve them before they are sent, and draft-only access for a key. Both are useful while you test: turn approvals on for the client's workspace, and nothing reaches a customer until someone says yes.
Moving to something that runs all the time
Most clients want customers answered when nobody is at a computer. Cursor cannot do that on its own, so plan the production set-up early. The usual options:
| Option | Good for | What to know |
|---|---|---|
| An always-on agent: Claude Code, Codex, OpenClaw or Hermes | AI replies around the clock with little code | Runs on a machine or server that stays on. Give it the same notes and rules you tested in Cursor. |
| Your own code on the Spaces API | A custom flow, such as checking a booking system first | Webhooks tell you about new messages. Every send needs an Idempotency-Key. |
| Spaces routines | Set replies to set triggers, such as an out-of-hours message | Not an AI. Cheap to run, and often the right answer for evenings. |
Whichever you choose, Spaces enforces the same per-account limits for every key and every agent, however the agent is prompted. Over a limit, the call is refused with a time to retry, and nothing is sent. That is worth telling the client: no prompt or bug in your code can push their number past those limits.
Keep the scope narrow
- If the project is WhatsApp only, use the WhatsApp-only MCP address from the docs, so the agent cannot reach any other channel the client connects later.
- Keep the client's notes in one file that both Cursor and the production agent read, so testing and production say the same thing.
- Never build a broadcast to the client's contact list. WhatsApp's terms prohibit bulk messaging, and Spaces refuses the same cold text sent to many people.
- Write down which messages always go to a person: complaints, refunds, health questions and anything angry.
A hand-over checklist for the client
- The client can sign in to Spaces and sees their number connected.
- They know where pause all sending is, and that reading keeps working while it is on.
- They have the business notes file and know that changing it changes the replies.
- Any API key you used is revoked, or handed over and rotated.
- They know what runs at night, whether that is an always-on agent, a routine or nothing.
- They have read the WhatsApp note at the top of this page and understand the risk is lowered, not removed.
Summing up
Cursor and the Spaces MCP server make a good workbench for a client's WhatsApp project: read real chats, write the notes, test drafts and build what is needed. Keep the number and the Spaces account in the client's name, test without sending, move production to an always-on agent, your own code or routines, and leave the client a clear way to pause everything.
How Spaces keeps your account safe
Whatever you ask, Spaces keeps your WhatsApp account inside safe limits: at least 10 seconds between messages, up to 200 a day, and 10 new conversations a day at most, with a gentler start for a newly connected account. If your AI tries to go faster, Spaces holds the message and says when it can try again.
New conversations warm up over the first weeks after you connect:
| Since connecting | New chats an hour | New chats a day |
|---|---|---|
| First 24 hours | None | None |
| Rest of week 1 | 1 | 3 |
| Week 2 | 2 | 6 |
| Weeks 3 and 4 | 3 | 8 |
| After that | 5 | 10 |
Replies to people who message you are not held back by the warm-up, so customers get answers from the first day.
These are Spaces' own limits. They lower the risk of a restriction, but they cannot remove it, because WhatsApp makes its own decisions about accounts. Read the note at the top of this page before you connect.
Pricing
FAQ
Can Cursor answer the client's WhatsApp around the clock?
No. Cursor acts when you ask it in the editor. For replies around the clock, use an always-on agent such as Claude Code, Codex, OpenClaw or Hermes, your own code on the Spaces API, or routines for set replies.
Does this use the WhatsApp Business Platform?
No. Spaces links the client's own number with a QR code, like WhatsApp on a computer. There are no templates or per-message fees from Meta, and WhatsApp's terms for its apps apply.
Should the Spaces account be in my name or the client's?
The client's. They own the number and the customers, and billing, limits and the pause switch should sit with them. You work through access they can take away.
How do I stop test replies reaching customers?
Start with reads only, ask Cursor to draft without sending, and send tests to numbers you control. With approvals turned on in Spaces, replies wait for a person to approve them.
What happens if my code sends too fast?
Spaces refuses the send with a time to retry, and nothing goes out. Wait, then retry with the same Idempotency-Key, which never sends twice.
Can I use the same set-up for Instagram later?
Yes. The same MCP server covers every channel the client connects, or you can use a channel-only address to keep a project to one channel.
Where is the developer reference?
The Spaces docs have the REST routes, the MCP tools, webhooks and error codes. This guide keeps to the set-up and the working practice.