AI editor with MCP
WhatsApp in Cursor: mcp.json, environment variables and the ZapZap OpenAPI
Cursor is a code editor with an AI agent that accepts MCP servers, configured in an mcp.json file. ZapZap has an open-source MCP server with 25 tools and a public OpenAPI specification. Together they let Cursor's agent look up instances, check numbers and, if you allow it, send messages while it writes your product's code.
Updated on
Why connect
Two uses make sense. The first is testing the API while you code: the agent calls check_whatsapp_numbers or get_webhook_deliveries to debug your webhook without leaving the editor. The second is generating code: point the agent at the OpenAPI and llms.txt and it writes the integration using only endpoints that exist. ZapZap connects numbers through an unofficial channel: WhatsApp may limit or block any number, so pacing, consent and warm-up matter. It costs R$15 per active number per month, prepaid, with no per-message fee, and you start with a welcome credit when you verify your phone, subject to the current campaign.
Step by step
- 1
Keep the keys in environment variables
In the dashboard, Settings > API, copy the API Key and API Secret and export them as ZAPZAP_API_KEY and ZAPZAP_API_SECRET in the environment where Cursor starts. The config file will reference the variable name, not the value.
- 2
Build the MCP server
git clone https://github.com/zapzapapi/zapzap-mcp.git, then npm install and npm run build (Node.js 18 or newer). The repository README mentions npx -y zapzap-mcp, but on 2026-11-11 the package is not yet published on npm (the registry returns 404). The route that works today is to clone, build and point the command at dist/src/index.js.
- 3
Create mcp.json in the project or in your account
According to Cursor's documentation (read on 2026-11-11), .cursor/mcp.json applies to the project and ~/.cursor/mcp.json applies everywhere. The format is mcpServers with command, args and env. Prefer the global file so the key does not land in a shared repository.
- 4
Use interpolation instead of writing the key
Cursor resolves ${env:NAME} in command, args, env, url and headers (documentation read on 2026-11-11). Write "ZAPZAP_API_KEY": "${env:ZAPZAP_API_KEY}" and the value never appears in the file. Start with ZAPZAP_READ_ONLY=true.
- 5
See the tools and approve each use
The tools appear under Available Tools and Cursor asks for approval before using an MCP tool by default, with expandable arguments and responses in the chat. Ask: list my instances and the status of each one.
- 6
Give the agent the OpenAPI and llms.txt
To generate code, add https://zapzapapi.com/openapi/zapzap-openapi.en.json and https://zapzapapi.com/llms.txt to the project docs, and write in the project rules: base https://api.zapzapapi.com/api/v1, headers x-api-key and x-api-secret, use only endpoints in the specification.
Example
{
"mcpServers": {
"zapzap": {
"command": "node",
"args": ["/absolute/path/to/zapzap-mcp/dist/src/index.js"],
"env": {
"ZAPZAP_API_KEY": "${env:ZAPZAP_API_KEY}",
"ZAPZAP_API_SECRET": "${env:ZAPZAP_API_SECRET}",
"ZAPZAP_READ_ONLY": "true"
}
}
}
}Illustrative. The exact fields and endpoints are in the documentation.
MCP or OpenAPI: when to use each in Cursor
| Goal | Use | Why |
|---|---|---|
| Debug a webhook, check a number, see status | MCP server in read mode | The agent calls the tool and shows the real result |
| Write the integration in your app | OpenAPI and llms.txt | The agent generates code with the right endpoints and fields |
| Send a test message | MCP with sending enabled and approval | A dedicated instance and a reviewed recipient list |
Frequently asked questions
Where is Cursor's mcp.json?
In .cursor/mcp.json inside the project or in ~/.cursor/mcp.json for all projects, according to Cursor's documentation read on 2026-11-11.
How do I avoid writing the key in the file?
Use the ${env:ZAPZAP_API_KEY} interpolation in the env field. Cursor resolves the variable when it starts the server.
Does npx -y zapzap-mcp work?
Not yet: the package is not on npm as of 2026-11-11. Use command node pointing to dist/src/index.js after building the repository.
Can the agent send messages without me seeing?
By default Cursor asks for approval before using MCP tools. Keep that on and use ZAPZAP_READ_ONLY=true while you only need to read.
What does it cost?
It costs R$15 per active number per month, prepaid, with no per-message fee, and you start with a welcome credit when you verify your phone, subject to the current campaign.
Start now
Create your account, connect a number in minutes and test the API with warm-up and anti-ban. R$15 per active number/month, prepaid, no lock-in.
