Skip to main content
LiveProduct

Cursor integration

Search and draft ads from the Cursor editor.

Cursor supports MCP servers configured in .cursor/mcp.json. Add TexoAI's endpoint with a project token, enable the server in Cursor settings, and the six tools become available to Cursor's agent.

Connection methods

MCPAvailable

The server answers initialize, notifications/initialized, tools/list and tools/call over HTTPS POST (JSON-RPC 2.0). Notifications return an empty 202; the same tools are always callable as a plain API.

Setup

  1. Create a token
    Create a project token in Developer settings and copy the one-time mad_ value.
  2. Add .cursor/mcp.json
    Add the server to a project .cursor/mcp.json (or your global config) so Cursor can reach it.
    Cursor · Setup
    {
      "mcpServers": {
        "meta-ads": {
          "url": "https://<your-site>/api/developer/mcp",
          "headers": { "Authorization": "Bearer mad_..." }
        }
      }
    }
  3. Enable and test
    Open Cursor settings → MCP, confirm the server is enabled, then ask Cursor to search the ad library.

Available tools

ads.search
Read
ads:read
ads.get
Read
ads:read
ads.live_search_start
Write
ads:live
ads.live_search_get
Read
ads:read
boards.list
Read
boards:read
monitors.list
Read
monitors:read
jobs.get
Read
jobs:read
clones.submit
Write
Approved draft-only static job; never publishes to an ad account.

Common errors

Failures come back as HTTP 400 with a JSON-RPC error object (code + message), not as HTTP 401/403/429.

-32001 — invalid or missing token
tools/call requires a valid Authorization: Bearer mad_... header. Missing and invalid tokens both return JSON-RPC -32001 (HTTP 400). initialize, notifications/initialized and tools/list do not need a token.
-32003 — insufficient scope
The token is valid but lacks the scope the tool requires. Returned as JSON-RPC -32003 (HTTP 400). Change the token scopes in Developer settings, or call a read-only tool.
-32003 — rate limit exceeded
The token's one-minute window is exhausted. Returned as the same JSON-RPC -32003 (HTTP 400). Wait for the reset or raise the rate limit in Developer settings.
-32603 — tool failed
The tool call failed on the server. The HTTP status is still 400; check the JSON-RPC id and message for details.

FAQ