Skip to main content

Prerequisites

  • A Cometly workspace and a Space you are a member of.
  • Cursor 0.42 or newer (any version with MCP support).

Add the server

Open Cursor’s settings (Cmd + , on macOS, Ctrl + , on Windows / Linux), search for MCP, and click + Add new MCP server. Set: Click Save. Or, if you’d rather edit the config file directly, open ~/.cursor/mcp.json and add:

Authorize

The first time Cursor tries to talk to the server, it’ll open your browser to the Cometly authorization page. Log in, choose which Spaces to grant (all of yours or specific ones, with a default), and click Approve. Cursor takes over from there and saves the token automatically.

Verify

Back in Cursor, open the chat sidebar and type:
You should see a tool indicator pop up (list_events), then a response with real data from your Space. If you see 401 Unauthorized, your token expired — just send the message again and Cursor will re-walk the OAuth flow.

Troubleshooting

Confirm the URL is https://app.cometly.com/mcp (no trailing slash). Cursor caches a failed handshake for a minute or so — wait and try again.
You’re using an older /mcp/{space_id}/public-api URL and the token was approved for a different Space. Switch the URL to https://app.cometly.com/mcp, or open ~/.cursor/mcp.json, delete the cometly entry, restart Cursor, and re-add the server. Cursor will walk the OAuth flow again and you can include the right Space.
Make sure Cursor is using the latest Claude or GPT model. Some smaller models hallucinate MCP tool names — bigger frontier models read the input schema and follow it.

What you can ask

  • “Show me my top 10 ad sets by ROAS for the last 30 days.”
  • “List purchases from contacts where Customer Plan is Premium this month.”
  • “What was my CPA on Meta last week vs the week before?”
  • “Look up contact 12345 and tell me their full journey.”
Cursor will pick the right tool (query_ad_metrics, list_events, get_contact…) automatically. You don’t have to name the tool.