Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cometly.com/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

  • A Cometly workspace and a Space you have Use Public API permission in.
  • Cursor 0.42 or newer (any version with MCP support).
  • Your numeric Space ID — copy it from the ID row at the bottom of the dashboard sidebar, or from Space SettingsSpace Details. See Finding your Space ID for step-by-step instructions.

Add the server

Open Cursor’s settings (Cmd + , on macOS, Ctrl + , on Windows / Linux), search for MCP, and click + Add new MCP server. Set:
FieldValue
Namecometly
TypeHTTP
URLhttps://app.cometly.com/mcp/{your-space-id}/public-api
Click Save. Or, if you’d rather edit the config file directly, open ~/.cursor/mcp.json and add:
{
  "mcpServers": {
    "cometly": {
      "url": "https://app.cometly.com/mcp/42/public-api"
    }
  }
}
Replace 42 with your Space ID.

Authorize

The first time Cursor tries to talk to the server, it’ll open your browser to the Cometly authorization page. Log in, confirm you’re authorizing the right Space, and click Approve. Cursor takes over from there and saves the token automatically.

Verify

Back in Cursor, open the chat sidebar and type:
Using the cometly MCP server, list my conversion events from the last 7 days.
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/{space_id}/public-api (no trailing slash) and that you replaced {space_id} with a real numeric ID. Cursor caches a failed handshake for a minute or so — wait and try again.
The token was approved for a different Space. 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 pick 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.