Agents

Connect AdRevila to whatever agent surface you already use. MCP for Claude Desktop and Cursor, OpenAPI for ChatGPT, raw tool definitions for your own Anthropic SDK loop.

01

Claude Desktop (MCP)

Add AdRevila to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows). Replace pat_... with a token from /settings.

json
{
  "mcpServers": {
    "adrevila": {
      "url": "https://adrevila.com/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer pat_..."
      }
    }
  }
}

Restart Claude Desktop. An adrevila integration appears with four tools: analyze_ad, list_analyses, get_analysis, and get_credit_balance. Try: "Use adrevila to analyze [URL] and summarize the hook section."

Before running a batch, ask Claude: "Check my AdRevila balance first." The agent calls get_credit_balance and warns you if you're close to empty before spending credits on analyze_ad.

02

Cursor (MCP)

In Cursor's settings, search for "MCP Servers" and add:

json
{
  "mcpServers": {
    "adrevila": {
      "url": "https://adrevila.com/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer pat_..."
      }
    }
  }
}

Reload the workspace. The four tools show up in Cursor's chat agent.

03

ChatGPT Custom GPT (OpenAPI)

Create a Custom GPT in ChatGPT, scroll to Actions, click Import from URL, paste:

text
https://adrevila.com/api/v1/openapi.json

Set authentication to API Key Bearer → paste your pat_... token. The GPT can now call all four REST endpoints.

04

Anthropic API — schema-driven tool calling

For your own agent loop on Claude's API, pull tool definitions straight from the OpenAPI spec at request time.

Python

py
import anthropic, requests, yaml

# Load the OpenAPI spec, derive tool definitions
spec = yaml.safe_load(requests.get("https://adrevila.com/api/v1/openapi.yaml").text)

client = anthropic.Anthropic()
msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=2048,
    tools=[
        {
            "name": "submit_analysis",
            "description": "Submit an Ad Library URL for analysis",
            "input_schema": {
                "type": "object",
                "properties": {"url": {"type": "string"}},
                "required": ["url"],
            },
        },
    ],
    messages=[{"role": "user", "content": "Analyze https://www.facebook.com/ads/library/?id=..."}],
)

Node.js

ts
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();
const msg = await client.messages.create({
  model: 'claude-sonnet-4-6',
  max_tokens: 2048,
  tools: [
    {
      name: 'submit_analysis',
      description: 'Submit an Ad Library URL for analysis',
      input_schema: {
        type: 'object',
        properties: { url: { type: 'string' } },
        required: ['url'],
      },
    },
  ],
  messages: [{ role: 'user', content: 'Analyze https://www.facebook.com/ads/library/?id=...' }],
});
05

llms.txt

We publish an adrevila.com/llms.txt following the llmstxt.org convention. Search agents (Perplexity, Phind, others) read it to map the API without scraping the marketing site. It's a crawler artifact. Nothing in there you can't get from this page.

06

MCP rate limit

MCP gets its own bucket: 60 messages per minute per token. Every JSON-RPC call counts, including tools/list and initialize. Full table on rate limits.