Cette page est disponible en anglais uniquement.
MCP server
Tools that let a coding agent scan a site for AI readiness, read the fixes, make a client report and find the AI answers that cite a page, without leaving the repo.
Server
POST https://mcp.sagbot.app/mcpStreamable HTTP
- Auth: sign-in from the client (OAuth 2.1 with PKCE). A request without a token gets
401naming the resource metadata (/.well-known/oauth-protected-resource/mcp); the client registers itself (dynamic registration or a Client ID Metadata Document), openssagbot.app/oauth/authorizefor the user to sign in and press Allow, and gets tokens fromhttps://mcp.sagbot.app/oauth/token. Or a personal API token asAuthorization: Bearer sgb_…(get a token), for CI and scripts. Both have the same rights. - Stateless: every request is a
POSTanswered with plain JSON. There is no session and no server-sent stream, soGETandDELETEanswer405. - Setup for Claude Code, Claude.ai and Claude Desktop, ChatGPT, Cursor, Codex, Gemini CLI, VS Code and Windsurf: sagbot.app/mcp. Connected apps are listed, and revoked, in Account → Credentials.
Scans run against the public site, so deploy your fixes (or use a public preview URL) before a rescan. MCP scans show up in your Dashboard.
scan_site
Scans a site: Agent-ready and Answer-ready scores, and every failed or partial check with fix instructions written for a coding agent. A scan takes about 20 seconds.
| Argument | Type | Description |
|---|---|---|
domain | string, required | Domain or URL of the live site, such as example.com |
siteType | string | content (blog, docs, marketing; the default), app (SaaS, web app) or shop |
rescan | boolean | true scans again instead of reusing a recent result. Default false |
A result for the same site and type from the last 60 minutes (5 minutes if it didn't complete) is reused, for free. rescan: true runs a fresh scan at most once per site every 2 minutes; inside that window you get the site's newest stored scan, which may be of another siteType, and rescanInSeconds. Every call counts toward the 3 a minute, cached answers included.
If the call times out, the scan still finishes. Call get_latest_scan for it instead of scanning again.
get_latest_scan
Reads the newest stored scan of a site and type, complete or not, without scanning. Free, and it doesn't count toward the scan limit. Use it after a scan_site call that timed out, or to re-read the fixes.
| Argument | Type | Description |
|---|---|---|
domain | string, required | Domain or URL of the site |
siteType | string | content (default), app or shop |
With no stored scan it answers, as plain text, that there is none yet and to call scan_site.
create_report
Makes an agency report: a before/after page about a site for your client, under your brand, after a fresh scan. Set up the brand at Dashboard → Reports first. It costs $1.99 from your balance, refunded if the scan fails. Details: Agency reports.
| Argument | Type | Description |
|---|---|---|
domain | string, required | Domain or URL of the live site |
siteType | string | content (default), app or shop |
locale | string | Language of the report: en, uk, es, pt, de, fr, pl or it. Default your account's language |
periodFrom | string | Start of the period, an ISO date such as 2026-10-01. Default the end of your previous report of the site, else 30 days ago |
note | string | A note for your client, up to 1,000 characters |
dryRun | boolean | true shows the kind (delta or baseline), period and price without charging. Default false |
It answers with the report's kind, period, cost, balance and URL as text, and in structuredContent the id, url, kind, host, periodFrom, periodTo, costMicros and balanceMicros.
find_ai_citations
Finds the ChatGPT and Google AI Overviews answers that cite or mention a page, a domain or a keyword, from answers already collected for common questions. With several targets (up to 10), an answer must match every target that isn't excluded, so to compare pages, run one lookup per page. It costs $0.49 from your balance; your first lookup is free, and a lookup that finds nothing gets $0.24 back. ChatGPT data covers the United States in English only; other countries and languages return Google AI Overviews answers only. Details: AI citations lookup.
| Argument | Type | Description |
|---|---|---|
targets | object[], required | 1 to 10 targets, each with exactly one of url, domain or keyword, plus include_subpaths (url), include_subdomains (domain) and exclude, as in POST /v1/mentions |
country | string | Two-letter country code, default US |
language | string | Two-letter language code, not case-sensitive, default en |
It answers with a summary line (answers found per platform, and what was charged or refunded), then the 20 most-asked answers as n. [platform] question with the answer cut to 300 characters, and the link to the full list: GET https://api.sagbot.app/v1/mentions/{id}. structuredContent holds the id, counts and those 20 mentions, with the fields of the REST response.
get_balance
Reads your prepaid balance. Free, never charged, no arguments. Call it before a paid call, or after a balance-too-low error. It answers SagBot balance: $12.34 (top up: https://sagbot.app/account/billing) as text (rounded down to the cent), and in structuredContent the exact balanceUsd and the topUpUrl. Over REST: GET /v1/balance.
explain_check
Explains checks by id, such as the ids in scan_site fixes: what each one checks and why it matters, its part and score, its weight (1 to 3, or info for a check that is never scored), the site types it applies to, the spec it follows and how to fix it in general. The text comes from the scanner itself, the same source as Every check on the methodology page. Free, never charged, no scan.
| Argument | Type | Description |
|---|---|---|
ids | string[], required | 1 to 20 check ids, such as ["agent-robots"]; not case-sensitive |
robots.txt (agent-robots)
Part: Agent, in the Agent-ready score, weight 3 of 3. Category: Discoverability.
Applies to: content, app, shop sites.
Why: robots.txt is the file crawlers and AI agents read first to learn what they may fetch.
How to fix: Serve /robots.txt as text/plain with at least one User-agent group and a Sitemap line. Unknown or malformed lines are ignored by crawlers.
Spec: https://www.rfc-editor.org/rfc/rfc9309
More: https://sagbot.app/methodology#agent-robotsstructuredContent holds checks, one card per id with id, title, why, part (agent, seo, geo or aeo), score (Agent-ready, Answer-ready, or null for an info check), category, weight, appliesTo, specUrl, fix and methodology. Where the fix depends on what a scan finds, fix is null and the text says to run scan_site for the site’s own fix; otherwise it uses example.com as a stand-in for your own site. An unknown id is a tool error that names the closest ids.
check_ai_answer
Reads an AI answer you already have, pasted from ChatGPT, Perplexity, Gemini or another assistant, and reports whether a brand is mentioned by name or domain, its position among the competitors you list, which cited sources are on its domain, and short snippets around each mention. It is plain text matching on SagBot: no AI model or search is called, so it is free and never charged. To have SagBot ask the engines itself, use the AI visibility API.
| Argument | Type | Description |
|---|---|---|
answer | string, required | The answer text, up to 20,000 characters |
brand | string | The brand or product name, up to 100 characters; brand, domain or both |
domain | string | Its domain, such as example.com; a URL or www. is read as the bare domain |
aliases | string[] | Up to 10 other names of the brand |
competitors | string[] | Up to 20 competitor names or domains; a domain also counts its cited sources. A repeat of the brand, an alias, the domain or another competitor is dropped |
sources | string[] | Up to 50 URLs the answer cites; links written in the answer count too. Only http and https URLs count |
Names match as whole words, ignoring case and accents: SagBot matches sagbot but not SagBots. The brand counts as mentioned when its name, an alias or its domain appears. Its position is the order of first mention among the brand and the competitors, from 1; names first mentioned at the same spot share a position. A source is on the domain when its host is the domain or a subdomain of it; sources are counted once per host and path.
{
"answer": "For checking AI readiness, Ahrefs and SagBot both help. SagBot (sagbot.app) scores a site in about 20 seconds and lists fixes for a coding agent [1].",
"brand": "SagBot",
"domain": "sagbot.app",
"competitors": ["Ahrefs", "Semrush"],
"sources": ["https://sagbot.app/mcp", "https://ahrefs.com/blog/ai-search"]
}SagBot (sagbot.app) is mentioned 3 times, position 2 of 2 positions.
Cited: 1 of 2 sources on sagbot.app:
- https://sagbot.app/mcp
Where it is mentioned:
- For checking AI readiness, Ahrefs and SagBot both help. SagBot (sagbot.app) scores a site in about 20 seconds and lists fixe…
Competitors:
- Ahrefs: position 1
- Semrush: not mentionedstructuredContent holds brand (name, domain, mentioned, mentions, position, cited, citedCount, sources and up to 3 snippets), competitors (name, mentioned, position, cited, citedCount), namedCount (how many distinct positions there are) and sourcesChecked. The brand’s sources shows up to 10 of its cited URLs as written; citedCount is the full count.
Tool output
scan_site and get_latest_scan return the scan twice: as text for the agent to read, and as structuredContent for code. The fields match the Scan API response, in camelCase and without cost_usd. Fix texts are shortened here.
Text
SagBot scan of example.com (content), 2026-11-17T09:41:07.000Z
Agent-ready: 62/100 · Answer-ready: 71/100
Fixes, by impact (2):
1. [fail] llms.txt (agent-llms-txt)
https://example.com/llms.txt returns HTTP 404. Serve /llms.txt as plain text or Markdown: …
2. [fail] Canonical URL (seo-canonical)
The homepage of example.com has no canonical link. Add exactly one absolute <link rel="canonical"> …
Couldn't verify: MCP server card (agent-mcp-card)
Passing: 31 · Info: 4 · n/a: 3
Report: https://sagbot.app/d/example.comstructuredContent
{
"host": "example.com",
"siteType": "content",
"scannedAt": "2026-11-17T09:41:07.000Z",
"cached": false,
"complete": true,
"scores": { "agentReady": 62, "answerReady": 71 },
"fixes": [
{ "id": "agent-llms-txt", "title": "llms.txt", "status": "fail", "fix": "https://example.com/llms.txt returns HTTP 404. …" },
{ "id": "seo-canonical", "title": "Canonical URL", "status": "fail", "fix": "The homepage of example.com has no canonical link. …" }
],
"couldNotVerify": [{ "id": "agent-mcp-card", "title": "MCP server card" }],
"advice": [
{ "id": "agent-search", "title": "Search for agents", "level": "advice", "fix": "https://example.com has no search endpoint for agents at /.well-known/search. …" },
{ "id": "agent-web-bot-auth", "title": "Web Bot Auth", "level": "found" }
],
"counts": { "pass": 31, "info": 4, "na": 3 },
"report": "https://sagbot.app/d/example.com"
}fixes lists every failed or partial check, highest impact first, with its fix text as written. advice holds the Advice checks (never scored): what each found, with a fix for warn and advice. It is in structuredContent only, not in the text, so an agent doesn't treat a tip as a fix. rescanInSeconds and failReason appear only when they apply; report is the public report page.
Call it without a client
The server is stateless, so a single JSON-RPC request is enough; no initialize handshake is kept between calls. Send both types in Accept.
curl https://mcp.sagbot.app/mcp \
-H "Authorization: Bearer $SAGBOT_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "get_latest_scan", "arguments": { "domain": "example.com" } }
}'For scripts and CI, the Scan API does the same over plain REST.
Limits and prices
| What | Limit or price |
|---|---|
scan_site calls | 3 a minute per account, cached answers included, shared with POST /v1/scan |
Requests to mcp.sagbot.app | 60 a minute per account; with a personal token, also 60 a minute per IP address |
| Scans of your own verified domains | Free, no cap (unless the domain redirects to another site) |
| New scans of other sites | First 3 a day (UTC) free, shared with the Scan API; then $0.06 each from your balance |
Stored results, get_latest_scan | Free |
get_balance, explain_check, check_ai_answer | Free, limited only by the 60 requests a minute |
| Request body | Up to 512 KB and one JSON-RPC message per request: a batch gets 400 |
check_ai_answer input | An answer of up to 20,000 characters, 20 competitors, 50 sources |
create_report | $1.99 a report, fresh scan included, outside the 3 free scans; 10 a minute per account |
find_ai_citations | $0.49 a lookup, the first one free, $0.24 back when nothing is found; 10 a minute per account |
Top up at Account → Billing. More on pricing: Getting started.
Errors
Tool errors come back as a tool result with isError: true and the reason as text:
- an unreadable domain or an unknown
siteType; Rate limit: 3 scans a minute, retry in ~60 s;- the site's results are hidden by its owner or SagBot and you aren't its verified owner (
scan_siteandget_latest_scan; not charged); - today's free scans are used and the balance can't pay $0.06: the message links to Billing;
create_reportonly: no agency brand yet, a balance under $1.99, a site that opted out of SagBot, or a scan that failed (refunded).explain_checkonly: an unknown check id (the message names the closest ids).check_ai_answeronly: neitherbrandnordomain, adomainthat isn’t a host name, or input over the limits.find_ai_citationsonly: an invalid target, a balance under $0.49 (the message links to Billing), a target on a hidden site, a domain that is a public suffix such asgithub.io, or aurlwithuser:password@or a port (not charged), too many lookups, or answers that couldn't be read (nothing charged).
A balance-too-low error ends with Request id: …, the Cloudflare Ray ID of the request (quote it to support), and has structuredContent with code: "insufficient_balance", the topUpUrl and the requestId.
Requests that never reach a tool get an HTTP status with a JSON-RPC error:
| Status | JSON-RPC code | When |
|---|---|---|
| 400 | -32700 or -32600 | A body that isn’t JSON, or a JSON-RPC batch: send one message per request |
| 401 | none or -32001 | Missing, unknown, expired or revoked token, or a deleted account. WWW-Authenticate: Bearer names the resource_metadata to sign in again |
| 403 | -32001 | The account is suspended. Don't refresh the token: the app works again when the suspension ends |
| 405 | -32000 | GET or DELETE: only POST is served |
| 413 | -32600 | A body over 512 KB |
| 429 | -32000 or none | Over 60 requests a minute per account, or with a personal token over 60 a minute from your IP (with Retry-After: 60) |