MCP server

Two tools that let a coding agent scan a site for AI readiness and read the fixes, without leaving the repo.

Server

POST https://mcp.sagbot.app/mcpStreamable HTTP

  • Auth: a personal API token as Authorization: Bearer sgb_… (get a token). Sign-in from the client (OAuth) isn't supported.
  • Stateless: every request is a POST answered with plain JSON. There is no session and no server-sent stream, so GET and DELETE answer 405.
  • Setup for Claude Code, Cursor, Codex, Gemini CLI, VS Code and Windsurf, with your token filled in: sagbot.app/mcp.

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 can take up to a minute.

ArgumentTypeDescription
domainstring, requiredDomain or URL of the live site, such as example.com
siteTypestringcontent (blog, docs, marketing; the default), app (SaaS, web app) or shop
rescanbooleantrue 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.

ArgumentTypeDescription
domainstring, requiredDomain or URL of the site
siteTypestringcontent (default), app or shop

With no stored scan it answers, as plain text, that there is none yet and to call scan_site.

Tool output

Both tools 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. [partial] 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.com

structuredContent

{
  "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": "partial", "fix": "The homepage of example.com has no canonical link. …" }
  ],
  "couldNotVerify": [{ "id": "agent-mcp-card", "title": "MCP server card" }],
  "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. 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

WhatLimit or price
scan_site calls3 a minute per account, cached answers included, shared with POST /v1/scan
Requests to mcp.sagbot.app60 a minute per IP address
Scans of your own verified domainsFree, no cap (unless the domain redirects to another site)
New scans of other sitesFirst 3 a day (UTC) free, shared with the Scan API; then $0.06 each from your balance
Stored results, get_latest_scanFree

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_site and get_latest_scan; not charged);
  • today's free scans are used and the balance can't pay $0.06: the message links to Billing.

Requests that never reach a tool get an HTTP status with a JSON-RPC error:

StatusJSON-RPC codeWhen
401-32001Missing, unknown or revoked token (with WWW-Authenticate: Bearer)
405-32000GET or DELETE: only POST is served
429-32000Over 60 requests a minute from your IP (with Retry-After: 60)