Developers
AI Assistants (MCP)
Hey Human! This page is for your AI, so it might not make sense to you. Give your favorite robot the link and they’ll thank you for it. Looking for what an assistant can do for you? Start here.The Stattery MCP server: how an assistant connects, the permissions it asks for, each tool and what it needs, big changes a person approves, and the limits.
Connecting
- MCP endpoint:
https://mcp.stattery.com/mcp(Streamable HTTP, JSON responses, no sessions). - OAuth: authorization code with PKCE, dynamic client registration and Client ID Metadata Documents. Metadata at
/.well-known/oauth-authorization-serverand/.well-known/oauth-protected-resource/mcp. scopes_supported:stats:read security:read security:write settings:write looks:write chat:write offline_access. Ask for them all and let the person untick;chat:writestarts unticked.- The person ticks the sites the connection may use. A site added to their account later isn’t included until they connect again.
Permissions
stats:read: who’s on now, visits, pages, referrers, countries, daily totals, visitor paths, bots (with the Edge Observer), ad income (with the Ad income permission).security:read: sign-in alerts, the ban list, and what the Edge Observer refused.security:write: ban or unban an address, country bans, the ban switches, the Stattery network bad bot list, and locking a hacked WordPress account.settings:write: excluded visits, funnels, sales statuses, the chat box’s setup, and the person’s own email summaries.looks:write: the person’s own Sound Lab sounds and live view look.chat:write: read open chats and reply to a visitor as the person.ads:write: act on the Advertising report: exclude the placements its Placement Filter queues from the site’s ad accounts, or dismiss them, and add the negative keywords its Search Term Cleanup queues, or dismiss those searches. Off until the person ticks it.offline_access: stay connected for up to 30 days.
Every request is also capped by the person’s own permission on the site, as it is right now: stats need them to see the site; security, reading or changing it, needs the site in their own account or Site settings and People on it; changing site settings needs Site settings; chat needs Chat. Deleting or transferring a site, billing, people and teams, API keys and passwords have no tools at all.
Tools
stats:read:list_sites,live_now,site_stats,breakdown,daily_totals,visits,visitor_history,bot_report,ad_income, and the ad tools below.stats:read, ad spend (anyone who can see the site):ad_quality { site, period? | from?, to?, by?: network | placement | campaign | landing | gad_source | day, limit? }paid clicks graded when each visit ended (bot, left almost at once, engaged, converted) with real and engaged visitors per 100 clicks, spend, cost per engaged visitor and per order;waste_alerts { site, period? | from?, to?, rule?: noadv | spike | placement | scanner | spend | landing, limit? }the alerts Advertising sent, each with what to do and its numbers (spendalerts carrycampaigns,landingalerts carrypages; the same data as theads.alertwebhook);cost_per_outcome { site, period? | from?, to?, limit? }spend, orders, revenue, return on ad spend and cost per order and per engaged visitor, by network and campaign;explain_click { site, click }one gclid, gbraid, wbraid or msclkid: its visit, grade and any order or quote that followed. They return totals and the rows behind them, never lists of visits. Each costs 1 token plus 1 for every 10 days it covers (the default is the last 30 days, so 4);explain_clickcosts 1.stats:read, the Placement Filter:placement_queue { site, status?: open | applied | dismissed, limit? }the placements the weekly check queued for exclusion (each with itsid, network, clicks, cost, why in plain words and weekly waste, marked when estimated), what was excluded (who and when) or what was dismissed.ads:writewith the Advertising permission:apply_placement_exclusion { site, ids? | all? }excludes queued placements in the connected Google Ads or Microsoft Advertising account; it waits for a person to approve it in Stattery (arequest_idto check withrequest_status) unless the site’s owner has turned on Let my AI assistant change my ad accounts without asking in Advertising, andundo_changetakes it back.dismiss_placement { site, ids, restore? }keeps placements off the queue, or puts them back; it changes nothing in the ad account.stats:readwith the Advertising permission (who made a change is a person’s email), the Settings Guard:ad_settings_changes { site, period? | from?, to?, limit? }the campaign setting changes Stattery found in the connected Google Ads and Microsoft Ads accounts, newest first, read only.limitis 1 to 500 (default 50). It answerswatching(whether an ad account is connected),expected_languages(or null when none are set),accounts(each withnetwork,account,last_checkedand anyerror),campaigns_with_other_languages(each withcampaign,network,status,targets,not_expectedandwords, a plain sentence),changes(each withat,network,campaign,setting: language, location, budget, bid, network, campaign, status, targeting or other,what,from,to,by: an email or “not given”,toolandnot_expected_language) andmore(how many more changes are in the range). See Settings Guard.stats:read, Search Term Cleanup:search_term_queue { site, status?: open | applied | dismissed, limit? }the Negative Keyword Queue (open, the default), what was applied (with who and when) or what was dismissed. Each item hasid,network,search_term,campaign,performance_max,why(plain words),clicksandcostfor the week checked,lifetime_clicks,lifetime_cost,status,can_apply, andcant_apply(why not) when Stattery can’t add it; the answer also haschecked_from,checked_to,checked_at,open,weekly_cost,networks_without_accountandmore.limitis 1 to 500 (default 50).ads:writewith the Advertising permission:apply_negative_keyword { site, ids? | all? }adds each queued search as an exact-match negative keyword on its campaign; unless the site turned on automatic AI changes in Ad Spend Control, the answer is a pending request (arequest_idto check withrequest_status) that a person approves in Stattery, andundo_changetakes it back.dismiss_search_term { site, ids, restore? }keeps searches off the queue, or puts them back withrestore: true; it changes nothing in the ad account, andundo_changetakes it back. See Search Term Cleanup.stats:read, Broken Landing Pages:landing_problems { site }the ad landing pages broken right now. It answerssite,checked_at,pages_in_use,broken,accountsandproblems, each withurl(orproductandtitlefor a Shopping product),problem,why,status,ends_at(where a redirect ended),used_by(each{ network, campaign, ad }),paid_clicks_7_days,cost_7_days,first_seenandlast_checked.problemis one ofgone(missing),redir404(redirects to a missing page),home(redirects to the home page),error(server error),down(no answer),loop(too many redirects),oos(product page out of stock),feed_oos(Google’s product feed says out of stock) ordisapproved(Google won’t show the product). See Broken Landing Pages.- Send Sales Back and the Weekly Ad Report Email have no tools: no tool reads or changes ad connections or Send Sales Back, and turning it on stays a person’s choice in Advertising, Accounts. The weekly report’s figures are the Advertising report’s own, which the ad tools above already read.
security:read:signin_alerts { site, open_only?, limit? },ban_list { site, limit? },blocks_report { site, days?, limit? }.security:write:set_country_ban,set_ban_switch,set_network_list,ban_address(ranges up to /24 for IPv4 or /48 for IPv6),unban_address,lock_account, andrequest_status.settings:write:site_settings,add_exclusion,remove_exclusion,toggle_exclusion,set_sales_statuses,save_funnel,set_chat_setup,set_my_email_summary.looks:write:my_looks,set_sounds,set_look.chat:write:open_chats,read_chat,reply_chat.- Any write permission:
ai_changes(the history) andundo_change { change_id }, which also needs the change’s own permission.
Write tools carry readOnlyHint: false, and destructiveHint: true where they ban, remove or lock. A change answers:
{ "done": true, "change_id": 12, "summary": "…", "before": …, "after": …, "can_undo": true }Every change goes in the site’s Changed By AI history and on the bell for its people with Site settings. A security change also emails the account’s Security notices address.
Dates On Every Read
Reads over dates take either period or from and to (YYYY-MM-DD, in the time zone the answers name; to defaults to from, and a range is kept to at most a year and to days Stattery has). period is one of today, yesterday, this_week, last_7_days, this_month, last_month (ad tools and ad_income), last_30_days, this_quarter, this_year. With neither, a read covers today, except daily_totals, ad_income and the ad tools, which cover the last 30 days. site is the domain as list_sites gives it, like example.com.
Every Tool
| Tool | Arguments (* required) | What it gives or does |
|---|---|---|
| stats:read (the person must be able to see the site) | ||
list_sites | none | Every site the connection may use, with people on it now and today’s visits, visitors and pageviews. |
live_now | site*, limit (1 to 100, default 25) | Everyone on the site now: state, page, place, network, time on site, where they came from. With the Edge Observer, bots seen in the last 10 minutes. |
site_stats | site*, period or from/to, compare (true adds the same-length period before) | Totals, time per visit and per page, top pages, referrers, countries, events, downloads, outgoing links. Visitors over several days are each day’s visitors added up. |
breakdown | site*, report*, period or from/to, limit (1 to 300, default 50) | One ranked report. report: pages, entry_pages, countries, cities, organizations, languages, browsers, operating_systems, devices, screens, referrer_types, referrer_hosts, referrer_urls, and with the Edge Observer bot_pages, bot_files. |
daily_totals | site*, period (from this_week up) or from/to | One row a day: visits, visitors, pageviews, bot requests, excluded visits. |
visits | site*, page (a path like /pricing) or group + value, period (up to last_30_days) or from/to, limit (1 to 200, default 30) | The visits behind a page or group, newest first, each with its path (last 25 steps). group: country, city, organization, browser, operating_system, device, screen, language, referrer_type, referrer_host, referrer_url, entry_page. Gives visitor_id and, for known people, email_hash. |
visitor_history | site*, visitor_id or email_hash | Every kept visit for one visitor or one known person, newest first. |
bot_report | site*, days (1 to 30, default 7), bot (a name like Googlebot), status (verified, named, suspect, bad), limit (1 to 200, default 50) | Each bot with owner, status, category, requests and pages, plus its latest requests. Edge Observer sites only. |
ad_income | site*, period or from/to, limit (1 to 200, default 25) | AdSense income by day, top earning pages and RPM by Stattery’s and the network’s pageviews. Today’s figure is an estimate. Needs the Ad income permission and a connected AdSense account. |
ad_quality | site*, period or from/to, by (network default, placement, campaign, landing, gad_source, day), limit (1 to 200, default 25) | Paid clicks graded when each visit ended (bot, left almost at once, engaged, converted), real and engaged visitors per 100 clicks, and spend, cost per engaged visitor and cost per order where an ad account is connected. |
waste_alerts | site*, period or from/to, rule (noadv, spike, placement, scanner, spend, landing), limit (1 to 200, default 25) | The alerts Advertising sent, newest first, each with what to do and its numbers. |
ad_settings_changes | site*, period or from/to, limit (1 to 500, default 50) | Campaign setting changes in the connected ad accounts, newest first: what changed, from and to, when, who (an email) and the tool used, plus campaigns that target a language the site doesn’t expect. Needs the Advertising permission. |
search_term_queue | site*, status (open, applied, dismissed), limit (1 to 500, default 50) | The Negative Keyword Queue, or what was applied or dismissed, each search with its campaign, why in plain words, clicks and cost. |
landing_problems | site* | The ad landing pages broken right now, each with its problem, why, the campaigns and ads that use it, and its paid clicks and cost over the last 7 days. |
cost_per_outcome | site*, period or from/to, limit (1 to 200, default 25) | Spend, orders, revenue, return on ad spend, cost per order and per engaged visitor, by network and campaign, plus custom outcome types. spend_known is false with no ad account connected. |
explain_click | site*, click* (a gclid, gbraid, wbraid or msclkid) | The visit one paid click started, its grade and any order or quote after it. A click that isn’t found may have been a bot: bot clicks are counted, not kept. |
| security:read (the site in the person’s own account, or Site settings and People on it) | ||
signin_alerts | site*, open_only, limit (1 to 100, default 25) | Suspicious sign-ins, newest first: when, address, network, country, the reasons, what the session did next, and whether it was handled. Each has the alert_id that lock_account takes. |
ban_list | site*, limit (1 to 200, default 50) | Banned addresses with reason and end, the ban switches, country bans, the countries the site serves, Allowed addresses, the latest auto-bans. |
blocks_report | site*, days (1 to 30, default 7), limit (1 to 50, default 25) | What the Edge Observer refused (today, 7 days, 30 days, ever, by cause, with the latest addresses) and hits refused from other sites. |
| security:write | ||
set_country_ban | site*, country* (two letters, like CN), mode* (bots, all, none) | Refuse bots, or everyone, from a country, or lift it. all waits for a person’s approval. |
set_ban_switch | site*, switch* (auto_ban, ban_all_suspected, refuse_dc_signins, ban_bot_swarms, ban_polling_bots), on* | Turn a ban switch on or off. Turning ban_all_suspected on waits for approval. |
set_network_list | site*, mode* (on, off, default) | Use the Stattery network’s shared bad bot list. default follows Auto-ban. |
ban_address | site*, address* (IP or range, up to /24 IPv4 or /48 IPv6), hours (0 to 8760; 0 or left out is until lifted), note, label | Ban an address. Search engine and crawler owners’ addresses are refused. Ask the person first whether the address could be theirs or their team’s. |
unban_address | site*, address* | Lift a ban listed by ban_list. |
lock_account | site*, alert_id* | Ends every session of the WordPress account in that alert, sets a random password and sends WordPress’s reset email. Always waits for approval. Can’t be undone from Stattery. Needs the Stattery plugin 0.9.21 or later. |
request_status | request_id* | Whether a waiting big change was approved, declined, expired or failed. Free. |
| settings:write (Site settings on the site) | ||
site_settings | site* | The current excluded-visit rules and funnels (with ids), sales statuses and buckets, and the chat setup with chat_fields_an_ai_may_change. Read it before changing any of these. |
add_exclusion | site*, type* (ip, cidr, domain for an email domain, role for a WordPress role, person for an email hash, visitor for a visitor id), value*, note, label | Leave matching visits out of the counts. |
remove_exclusion | site*, id* | Remove one rule. |
toggle_exclusion | site*, id*, on* | Switch a rule off or on without removing it. |
set_sales_statuses | site*, map* (status to bucket, like { "on-hold": "pending" }, or "default") | Sort WooCommerce order statuses into buckets. The site’s orders are re-sorted. |
save_funnel | site*, op* (create, update, archive, unarchive), id (for all but create), name, steps, order (strict or any), win (days to finish, 0 is the same visit) | 2 to 20 steps, each { "kind": "page", "page": "/path*" }, { "kind": "event", "event": "…" }, { "kind": "proc", "proc": "…", "n": 1 }, { "kind": "download", "file": "…" } or { "kind": "goal", "goal": "…" }, each with an optional label. Funnels are archived, never deleted. |
set_chat_setup | site*, fields* (field to new value) | Wording, colours, placement, hours, routing and pre-chat questions: only the fields site_settings lists. Switching chat on or off and its images stay in Stattery. |
set_my_email_summary | site*, frequency* (daily, weekly, monthly), on* | The person’s own email summary for a site. |
| looks:write (the person’s own, on every site) | ||
my_looks | none | The person’s Sound Lab choices and live view look file. |
set_sounds | sounds* (the object my_looks returns as sounds) | Replace the Sound Lab choices. Read, change, send back the whole object. |
set_look | look* (a look file, or null for the default) | Replace the live view look, as my_looks returns it or Tweak Lab exports it. |
| chat:write (and the Chat permission on the site) | ||
open_chats | site*, limit (1 to 50) | Chats not closed: who, the page, waiting or answered, and by whom. |
read_chat | site*, chat_id* | One chat with its messages. |
reply_chat | site*, chat_id*, text* (1 to 2,000 characters) | Reply to the visitor as the person. It can’t be unsent, so confirm the wording with the person unless they gave it. |
| ads:write (and the Advertising permission on the site) | ||
apply_negative_keyword | site*, ids or all | Adds queued searches as exact-match negative keywords on their campaigns. Waits for a person’s approval unless the site turned on automatic AI changes; undo with undo_change. |
dismiss_search_term | site*, ids*, restore | Keeps searches off the queue, or puts them back. Changes nothing in the ad account. |
| Setup help (any permission for the guide; seeing the site for the status) | ||
setup_guide | topic (edge_observer, cloudflare, edge_observers_overview, edge_observer_missing, wordpress_plugin, set_up_stattery) | The help page as text, with its address and when it changed. Without a topic, the list. Free. |
setup_status | site* | Pages arriving, the WordPress plugin, Cloudflare (public DNS), the Edge Observer (on, key saved, installed, last report), and the next step with its guide topic. |
| Any write permission | ||
ai_changes | site, limit (1 to 100) | The site’s Changed By AI history: when, who, which assistant, before and after, and whether it can be undone. Without a site: the person’s own sound and look changes. |
undo_change | change_id* | Put one change back, whoever made it. Needs the permission the change needed. Chat replies and locked accounts can’t be undone; putting back a big change waits for approval. |
Working well with the person. Start with list_sites when you don’t know the site names, and prefer one wide read (site_stats, breakdown) to many narrow ones, since each call costs tokens. Before a change, read the current state (site_settings, ban_list, my_looks) and tell the person what you’ll change; after it, give them the change_id and say it can be undone. When an answer is a pending request, tell the person it waits for their OK on the bell, the phone app or the security email; there is nothing for them to tell you. A result with isError: true is a sentence meant for the person (a missing permission, site, Edge Observer or tokens, and how to get it): pass it on, and don’t retry it unchanged.
The Search tools (search terms, Easy Wins, fading and competing pages, crawlers, site health, page speed and Business Profile) are described in full on Search For Developers.
Big Changes: Approved By A Person
set_country_ban with mode: "all", set_ban_switch turning ban_all_suspected on, lock_account, and undo_change when it would put one of those back change nothing. They answer a pending request:
{ "pending": true, "request_id": 7, "status": "waiting", "change": "…", "warning": "…", "expires": "2026-11-20T04:33:54.750Z", "next": "…" }The account’s owner, or a team member with the permission the change needs, approves or declines it in Stattery: on the bell in the app and on the phone, in Site Settings, Overview, Changed By AI, or with the link in the Security notices email (opening it only shows the request). A request nobody decides expires after 24 hours, and a site has at most 5 waiting.
request_status { request_id } answers waiting, approved (with change_id), declined, expired or failed (with error), and who decided. Only the person whose assistant asked can read it. There is no code for the assistant to send back, so nothing it reads can approve a change: tell the person it waits for their OK in Stattery.
Limits
- Tool calls a minute: 30 per connection, 60 per person and 120 per account; changes: 20 per person and per account. Over any of them, the answer is
429withretry-after: 60. - A connection the person disconnected (Settings, Account, Connected AI) answers
401 invalid_token. Taking away a permission or a site applies on the next request. tools/listalways lists every tool, so it stays cacheable. A call without the needed permission, or on a site outside the grant, returns a tool result withisError: trueand a sentence saying what’s missing.- Each tool is one on-demand read or change. Call them when the person asks, not on a timer.
Tokens
Every tools/call uses the account’s tokens. During the alpha they’re counted and shown, but free and never capped.
- A read with no dates (
live_now,ban_list, a visitor, a chat): 1. - A read over dates (
site_stats,breakdown,visits,daily_totals,ad_income,bot_report,blocks_report): 1, plus 1 per 10 days when it covers more than one day. 30 days is 4. list_sites: 1, plus 1 per 5 sites the connection reaches.- A change: 5. A big change that becomes a request a person approves: 10.
- Free:
request_status,setup_guide, resources and prompts,tools/list, the handshake, a call without its permission, an unknown tool, and any call that ends in an error.
Caps: the account’s sites and AI assistants share the plan’s monthly tokens, and AI calls stop when the two together reach the limit (with Auto upgrade on, the account moves up a step first); one connection may use 2,000 tokens a UTC day unless its person changes that in Connected AI. A call past a cap returns isError: true with what’s used, what the plan includes, the next step’s price and the link to get more. Free calls still answer. Page tracking stops only on the sites’ own tokens.