01
Quick start
- Create your account (free) and sign in.
- Open Meta connection, connect Facebook and pick an ad account.
- Paste
https://ads.viral4all.com/mcpinto your AI app and sign in when it asks (steps for every app below). - Ask: “How did my ads do this week?” Then set your safety limits on Goals & limits.
Prefer a guided tour? Read How it works.
02
Connect your AI
Pick your app for the exact steps. Most apps just need the URL and a sign-in.
Chat apps
Coding agents
Automation
Claude
- Open Settings → Connectors and click Add custom connector.
- Name it Viral4All Ads, paste the URL below and click Add.
- Click Connect, sign in here and choose read-only or read-and-change.
- It works in Claude on the web, desktop and phone with the same account.
https://ads.viral4all.com/mcp
Optional: add our ready-made workflows in Settings → Capabilities → Skills (upload each zip):
03
Approvals & limits
Approval links
Resuming ads, budgets, creative, targeting and archiving never run from the chat. Your AI gets a link; the change runs only when you open it, sign in and press Approve. Links last 30 minutes.
Hard limits
On Goals & limits, set the highest daily budget, the biggest raise per change, AI changes per day and protected campaigns. Our server blocks anything outside them, even approved requests.
Undo
Every applied change keeps what it replaced. Press Undo on its approval page to put it back (archiving can't be undone).
Activity log
Every AI and API action is recorded with who asked, what and when. Alerts email you when spend jumps or results drop.
Pauses run at once (they only stop spend). New campaigns and copies always start paused.
04
Tools
The same tools are in every AI app, the REST API and the CLI. This list comes from the live server. Money is in minor units: 2500 is $25.00.
| Tool | What it does | Runs |
|---|---|---|
| meta_list_ads | List Meta ads. List every Meta ad on the connected account with status, budget, spend, impressions, reach, interactions and destination link, plus the owner's goals and the hard limits every change request must stay inside. | Reads |
| meta_pause_ads | Pause Meta ads. Pause one or many live Meta ads, ad sets or campaigns by id. | Runs at once |
| meta_resume_ads | Resume Meta ads. Ask to restart paused Meta ads, ad sets or campaigns by id. | Needs your OK |
| meta_set_budget | Change a Meta budget. Ask to set the daily or lifetime budget of an ad set or campaign, in minor units (cents). | Needs your OK |
| meta_update_creative | Update a Meta ad's link or creative. Ask to change an ad's destination (website URL or WhatsApp number), copy, call to action, image URL or video id. | Needs your OK |
| meta_confirm_action | Check a pending Meta change. Check what happened to a change prepared by meta_resume_ads, meta_set_budget, meta_update_creative, meta_update_adset or meta_archive: waiting_for_approval, done (with the result read back from Meta), undone, failed or rejected, plus any note the owner left. | Reads |
| meta_upload_media | Upload media to Meta from a URL. Download an image or video from a public https URL, store it, and register it with Meta so it can be used in an ad. | Runs at once |
| meta_create_ad | Create a Meta campaign. Create a full paused Meta campaign: campaign, ad set with budget and targeting, creative and ad. | Runs at once |
| meta_sync_now | Refresh Meta data. Pull the latest spend, results and creative details from Meta and report what changed since the last sync. | Runs at once |
| meta_get_insights | Meta ads report. Performance report at account, campaign, ad set or ad level: spend, impressions, reach, frequency, clicks, CTR, CPC, CPM, results, cost per result, ROAS and every action count. | Reads |
| meta_list_campaigns | List Meta campaigns, ad sets and ads. The full structure: campaigns with their ad sets (budget, schedule, optimization goal) and ads (headline, link), each with spend, clicks, results and cost per result. | Reads |
| meta_list_accounts | List connected ad accounts. Every connected Meta ad account with currency, time zone and whether it can deliver, and which one the tools act on. | Reads |
| meta_switch_account | Switch the active ad account. Make another connected ad account the one every tool and the dashboard act on. | Runs at once |
| meta_search_targeting | Search Meta targeting. Find interests (with audience size) or locations (countries, regions, cities) to target. | Reads |
| meta_list_audiences | List custom audiences. Custom and lookalike audiences on the ad account with type, approximate size and whether they're ready to use. | Reads |
| meta_activity_log | What changed recently. Recent change requests (waiting, approved, rejected, failed, undone, with the owner's notes) and the ad changes the sync detected, newest first. | Reads |
| meta_connection_status | Meta connection status. Whether Meta is connected, the active ad account, when the login expires and the last sync. | Reads |
| meta_duplicate | Duplicate a campaign, ad set or ad. Make a PAUSED copy (campaigns and ad sets copy what's inside them). | Runs at once |
| meta_update_adset | Edit an ad set's targeting, schedule or bid. Ask to change an ad set: countries (replace the location targeting), ages, genders, interests (from meta_search_targeting; replaces detailed targeting, [] clears it), name, end time (ISO 8601) or bid cap in minor units. | Needs your OK |
| meta_archive | Archive campaigns, ad sets or ads. Ask to archive by id: they stop for good and leave the active lists. | Needs your OK |
| list_campaigns | List workspace campaign notes. List campaign plans saved in the Viral4All Ads workspace (local notes, not live Meta campaigns; use meta_list_campaigns for those), optionally filtered by status or platform. | Workspace note |
| create_campaign | Save a workspace campaign note. Save a campaign plan in the Viral4All Ads workspace. | Workspace note |
| update_campaign_status | Update a workspace campaign note. Change the status label of a campaign plan in the Viral4All Ads workspace. | Workspace note |
| list_posts | List workspace post drafts. List social post drafts saved in the Viral4All Ads workspace (local notes, nothing is published), optionally filtered by status or platform. | Workspace note |
| create_post | Save a workspace post draft. Save a social post draft in the Viral4All Ads workspace. | Workspace note |
| performance_summary | Workspace notes summary. Totals across the campaign plans saved in the Viral4All Ads workspace. | Workspace note |
05
REST API
Every tool is also a plain HTTP endpoint, for scripts, Zapier, Make, n8n and ChatGPT GPT Actions. Make a key on the API keys page and send it as Authorization: Bearer sk_meta_…. Import the OpenAPI schema to get every endpoint at once.
curl -X POST https://ads.viral4all.com/api/public/v1/tools/meta_get_insights \
-H "Authorization: Bearer sk_meta_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"level":"campaign","datePreset":"last_7d","breakdowns":["age"]}'GET /api/public/v1/tools lists the tools your key may use, with their input schemas. Changes that spend money answer with an approval link instead of running:
{
"status": "approval_required",
"approve_url": "https://ads.viral4all.com/approve/…",
"confirm_token": "cfm_…",
"expires_in_seconds": 1800,
"summary": { "object": { "name": "Spring sale" }, "budget": "daily", "from": "$20.00", "to": "$25.00" }
}Then call meta_confirm_action with the confirm_token to read the outcome: waiting, done, rejected (with your note), failed or undone.
| 401 | The key is missing, wrong or revoked. |
| 403 | The key lacks the permission this tool needs; the error names it. |
| 404 | No tool by that name. |
| 400 | Invalid input, or the tool refused (for example “Blocked by your limits: …”). |
Key permissions
ads:readRead ads: List ads with impressions, spend, budget and status.ads:createCreate ads: Launch new campaigns, ad sets and ads.ads:statusPause / resume: Stop and restart ads, single or in bulk.ads:creativeUpdate creative: Swap destination links, copy, images and videos.ads:budgetSet budget: Change daily or lifetime budgets.ads:editEdit ad sets: Change targeting, schedule and bid caps. Each change waits for your approval.media:writeUpload media: Import an image or video from a URL into Meta.sync:writeTrigger sync: Force a fresh pull of metrics from Meta.
06
CLI
Sign in once in your browser, then any terminal, script or coding agent can use every tool. Needs Node.js 18 or newer. Add --json for machine output.
npx -y viral4all-ads login # browser sign-in npx -y viral4all-ads login --key sk_meta_… # or an API key npx -y viral4all-ads ads npx -y viral4all-ads insights --level campaign --breakdowns age npx -y viral4all-ads budget 1234567890 2500 # asks for your approval npx -y viral4all-ads tools # everything you can run
Tip: alias v4a="npx -y viral4all-ads". npm blocked? Use npx -y https://ads.viral4all.com/cli/viral4all-ads.tgz instead. Exit codes: 0 ok, 1 tool error, 2 usage error, 3 not signed in. VIRAL4ALL_API_KEY overrides the saved sign-in.
07
Webhooks
Get told when something happens. Add an https URL on the Webhooks page and pick events. Slack and Discord webhook URLs get a plain message; anything else gets signed JSON.
approval.requestedYour AI asked for a change that waits for your approval.approval.approvedAn AI change was approved and applied.approval.rejectedAn AI change was rejected. Nothing changed.approval.failedAn approved change didn't go through on Meta.change.undoneA change was put back the way it was.alert.createdThe daily account check found something, like a spend jump.request.blockedAn AI request went over one of your limits and was stopped.
{
"id": "6f1c…",
"type": "approval.requested",
"created_at": "2026-10-22T09:30:00.000Z",
"data": { "approval_id": "…", "action": "budget", "headline": "Spring sale: daily budget $20.00 → $25.00", "approve_url": "https://ads.viral4all.com/approve/…" },
"text": "Approval needed: Spring sale: daily budget $20.00 → $25.00. Approve or reject: https://ads.viral4all.com/approve/…"
}Headers: X-Viral4All-Event, X-Viral4All-Delivery and X-Viral4All-Signature: t=…,v1=…, an HMAC-SHA256 of t.body with the secret shown when you added the webhook. Check it before trusting a message:
import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(rawBody, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; // older than 5 minutes
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
return v1?.length === expected.length && timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}Each event is sent once, with a 5-second timeout; any 2xx answer counts. A webhook that fails 20 times in a row is paused; resume it on the Webhooks page.
08
Plugin & skills
The Claude Code plugin adds the connector plus five ready-made workflows: weekly check, what changed, find wasted spend, launch a campaign and safe budget change.
/plugin marketplace add https://ads.viral4all.com/claude/marketplace.json /plugin install viral4all-ads@viral4all
Also on GitHub: /plugin marketplace add black12-ag/viral4all-ads. The skills work in Claude on the web too: upload them in Settings → Capabilities → Skills (zips are in the Claude steps under Connect your AI).
09
MCP details
- Server:
https://ads.viral4all.com/mcp(Streamable HTTP). Listed in the official MCP Registry ascom.viral4all.ads/mcp. - Sign-in: OAuth 2.1 with dynamic client registration and PKCE. Discovery at
/.well-known/oauth-authorization-server. Scopes:mcp:read(reports only) ormcp:write(everything, with approvals). - Apps without sign-in: send an API key as
Authorization: Bearer sk_meta_…. - AI agents can read /llms.txt to learn how to connect by themselves.
10
Troubleshooting
The sign-in window loops or closes
Desktop and terminal apps open your default browser, so sign in there. Allow pop-ups for your AI app and for ads.viral4all.com, and avoid private windows or strict tracking protection: they can drop your sign-in. Finish by clicking Allow. Still looping? Sign in at ads.viral4all.com in the same browser first, then click Connect in your AI app again.
“Tool … not found”, or a missing permission
Your AI app only sees the tools its sign-in or API key allows. Signed in read-only? The tools that make changes are hidden. Disconnect the app under Connected AI apps on the API keys page, connect again and tick Make changes. Using an API key? Switch the missing permission on for that key on the same page. The REST API's error names the permission it needs.
“Blocked by your limits: …”
The change would break a limit you set: the highest daily budget, the biggest raise, AI changes per day, or a protected campaign. Your AI can't change your limits. If you do want the change, adjust them on Goals & limits and ask again.
The approval link expired
Approval links last 30 minutes. Nothing changes when one expires. Ask your AI app for the change again and approve the new link.
“No Meta account connected”
Your AI app is signed in, but your Viral4All Ads account has no Meta login. Connect one on the Meta connection page, pick an ad account, then ask again.
“… isn't synced yet”
You have protected campaigns, and your AI asked to change something we haven't copied from Meta yet, so we can't check it against them. Click Sync now on the Overview page, then ask again.
Disconnect an AI app or revoke an API key
Open the API keys page. Under Connected AI apps, click Disconnect next to the app. Under Your keys, click Revoke. Either one stops working at once.
Company networks and proxies
Claude and ChatGPT reach us from their own servers, so on a company network only the sign-in page has to open. Coding agents, the CLI and scripts connect from your computer, so your proxy or firewall must allow HTTPS to ads.viral4all.com. If it inspects HTTPS, Node.js tools such as our CLI and mcp-remote also need your company's root certificate in NODE_EXTRA_CA_CERTS. A script that gets Cloudflare error 1010 should send a User-Agent header.
11
Support
Email [email protected]. Include your account email and the approval link or the time it happened; never send passwords or API keys. More on Support, Privacy and Terms.