ai-visibility-mcp
The ai-visibility-mcp server audits and fixes how AI systems (ChatGPT, Claude, Perplexity, etc.) see and access a website, closing the full audit-to-fix loop in a single session.
Audit Tools:
check_ai_bot_access(domain): Analyzesrobots.txtand Cloudflare settings to determine allow/disallow status for 22 known AI user-agents (GPTBot, ClaudeBot, PerplexityBot, etc.).audit_ai_visibility(domain): Generates a 0–100 AI visibility score with explainable deductions covering robots.txt rules, meta tags (noai/noimageai), JSON-LD structured data, sitemap.xml, llms.txt, and SPA shell detection.check_llm_mention(brand, query, aliases?, models?): Queries multiple LLMs simultaneously (Perplexity Sonar, GPT-4o-mini, Gemini 2.0 Flash by default) to measure brand/product presence in AI-generated answers, with per-model mention status, citation counts, and share-of-voice.compare_competitors(your_domain, competitor_domains): Runs parallel visibility audits across your domain and up to 10 competitors, returning a ranked side-by-side comparison of scores, blocked bots, JSON-LD presence, llms.txt, sitemap size, and Cloudflare state.
Fix-Generation Tools:
generate_robots_patch(domain, allow_bots?, deny_bots?): Produces a correctedrobots.txtthat unblocks AI bots while preserving existing rules.generate_json_ld(url, page_type?): Generates Schema.org JSON-LD structured data for a page, with auto-detection of page type.generate_llms_txt(domain, crawl_depth?, max_pages?): Crawls the site's homepage and sitemap to produce a spec-compliantllms.txtfile.
Analyzes website visibility by detecting Cloudflare's AI bot blocking defaults and provides recommendations for improving AI crawler access.
Uses Google's Gemini 2.0 Flash model (via OpenRouter) for brand mention checks and evaluates Google-Extended bot access from robots.txt.
Uses OpenAI's GPT-4o-mini model (via OpenRouter) to evaluate brand mentions in AI responses for cross-model comparison.
Queries Perplexity's sonar model to check if a brand or domain appears in LLM-generated answers, supporting brand visibility analysis.
ai-visibility-mcp
MCP server that audits and fixes how AI sees your website. Robots, schema, LLM mentions, Cloudflare AI defaults — audit the problem, generate the fix, re-audit in one loop.
Most websites are accidentally invisible to AI search. Cloudflare's bot-management defaults block GPTBot / ClaudeBot / PerplexityBot. SPAs render an empty <div id="root"> to crawlers that don't run JS. Marketing teams have no idea their brand isn't surfacing in ChatGPT, Claude, or Perplexity answers — until traffic dries up.
ai-visibility-mcp closes the audit-and-fix loop inside a single agent session:
Audit — find what's blocking AI visibility
Fix — generate the artifact that corrects it
Paste — site owner applies the output
Re-audit — verify the fix was picked up
Tools
Audit tools
Tool | Purpose | Needs API keys? |
| Per-bot robots.txt + Cloudflare AI-default flag for 22 AI user-agents | No |
| 0-100 composite score with explainable deductions (robots, meta, JSON-LD, sitemap, llms.txt, SPA shell) | No |
| Cross-model brand surfacing (Perplexity sonar + OpenAI gpt-4o-mini + Gemini 2.0 Flash by default) | Yes |
| Parallel ranked audit, max 10 in flight | No |
Generator tools (v0.3)
Tool | Purpose | LLM call? |
| Corrected robots.txt that opens access to AI bots; preserves existing rules; detects Cloudflare | No |
| Schema.org JSON-LD block for any page; auto-detects type (Product/Article/Organization/FAQPage/SoftwareApplication/WebSite); validates required fields | Yes (gpt-4o-mini) |
| spec-compliant llms.txt; crawls homepage + sitemap; graceful fallback to link extraction | Yes (gpt-4o-mini) |
Related MCP server: INITE MCP
Why this exists
Cloudflare flipped defaults in 2024-2025 to block AI scrapers. Most site owners never updated their config, so AI bots get challenged and bounce.
MCP marketplaces shipped in 2026 (MCP Hive, Smithery, mcp.so, Glama). Every AI agent needs tools that can audit the real web. This is one.
Brand visibility in LLM answers is the new SEO. Nobody has a clean stack for measuring it from a single MCP call.
Install
Requires Python 3.10+ and uv.
git clone https://github.com/bestaiinsider/ai-visibility-mcp
cd ai-visibility-mcp
uv sync
cp .env.example .env # fill in PERPLEXITY_API_KEY / OPENROUTER_API_KEYRun
# stdio transport — Claude Desktop / Claude Code
uv run ai-visibility-mcp
# HTTP transport — remote agents
uv run ai-visibility-mcp --http --port 8000Claude Desktop / Claude Code config
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Desktop) or ~/.claude.json (CLI):
{
"mcpServers": {
"ai-visibility": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/ai-visibility-mcp", "run", "ai-visibility-mcp"]
}
}
}Audit-and-fix loop
# Step 1 — audit
> audit_ai_visibility(domain="example.com")
score: 55
warnings:
- "9/22 AI bots disallowed — site largely invisible to AI search"
- "no JSON-LD structured data — LLMs lose entity grounding"
- "no /llms.txt found at root"
# Step 2 — generate fixes
> generate_robots_patch(domain="example.com")
→ new_robots: "User-agent: GPTBot\nAllow: /\n\nUser-agent: ClaudeBot\nAllow: /\n..."
→ diff: unified diff of exactly what changed
→ paste_target: "/robots.txt at site root, replaces existing"
> generate_json_ld(url="https://example.com/")
→ page_type_detected: "Organization"
→ script_tag: '<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization"...}</script>'
→ paste_target: "inside <head> of the page"
> generate_llms_txt(domain="example.com")
→ content: "# Example Corp\n\n> One-sentence summary...\n\n## Pages\n- [Home](...): ..."
→ paste_target: "/llms.txt"
# Step 3 — site owner pastes the three artifacts
# Step 4 — re-audit
> audit_ai_visibility(domain="example.com")
score: 95 ← was 55Example session
> check_ai_bot_access(domain="bandcamp.com")
summary: { total: 22, allowed: 13, disallowed: 9 }
warnings: ["9/22 AI bots disallowed — site largely invisible to AI search"]
blocked: ["GPTBot", "ClaudeBot", "Google-Extended", "Bytespider",
"CCBot", "Meta-ExternalAgent", "FacebookBot", "Amazonbot", "Diffbot"]
> audit_ai_visibility(domain="bandcamp.com")
score: 49
reasons:
-36: 9 AI bots disallowed in robots.txt
-10: no JSON-LD structured data
-5: no /sitemap.xml
> check_llm_mention(brand="Anthropic", query="Who makes the leading foundation AI models?")
share_of_voice: 0.667
by_model:
perplexity/sonar mentioned=true citations=3
openrouter/gpt-4o-mini mentioned=true citations=0
openrouter/gemini-flash mentioned=false citations=0
est_total_cost_usd: 0.00088
daily_spend_usd: 0.00088 / $5.00 capSecurity posture
This server makes outbound HTTP requests to caller-supplied domains and to LLM providers. v0.2 hardening:
SSRF guard. All outbound HTTP refuses loopback, link-local (AWS / GCP / Azure metadata IPs), RFC1918, CGNAT, and IPv6 ULA addresses. Redirects are re-validated.
Daily spend cap. LLM calls are gated by
MAX_DAILY_USD(default $5.00), persisted to~/.cache/ai-visibility-mcp/spend.json. Loop-amplification can't drain your Perplexity / OpenRouter credits.Per-call cost ceiling.
MAX_COST_PER_CALL(default $0.10) plusLLM_MAX_OUTPUT_TOKENS(default 1024) hard-bounds any single tool invocation.No persistence of user content. Nothing is logged to disk except the daily spend totals.
Configuration
Env var | Default | Purpose |
| — | Required for Perplexity models in |
| — | Required for OpenAI / Gemini / Claude via OpenRouter |
|
| USD ceiling per tool invocation |
|
| USD ceiling per UTC day, persisted |
|
| Hard cap on output tokens per LLM call |
|
| Override spend ledger location |
Development
uv sync --extra dev
uv run pytest # 40 tests
uv run ruff check . # lintStatus
v0.3 — audit + fix loop complete. 7 tools (4 audit + 3 generator), 40/40 tests, SSRF-hardened, spend-capped. Smoke-verified against tealhq.com / bandcamp.com / anthropic.com.
License
MIT.
Available Tools
4 toolsaudit_ai_visibilityA
Composite AI-visibility audit for a domain.
Combines check_ai_bot_access with homepage scrape: meta robots tags
(incl. noai/noimageai), JSON-LD structured data, sitemap.xml, llms.txt.
Produces a 0-100 score with explainable reasons.
Inputs: domain (required). Returns: object
check_ai_bot_accessA
Check whether AI bots can read this site.
Fetches /robots.txt and the root URL. Reports per-bot allow/disallow
plus Cloudflare AI-bot-default warning signals.
Inputs: domain (required). Returns: object
check_llm_mentionA
Check whether brand surfaces in LLM answers to query.
Fans out the same query to multiple LLMs (Perplexity sonar, OpenAI gpt-4o-mini, Gemini 2.0 Flash by default) and reports per-model mention + citations. Cost-capped via MAX_COST_PER_CALL env var.
Inputs: brand (required), query (required), aliases, models. Returns: object
compare_competitorsA
Side-by-side AI-visibility audit: your_domain vs competitors.
Runs audit_ai_visibility in parallel for all domains and returns a
ranked comparison (score, blocked bots, JSON-LD presence, llms.txt,
sitemap size, Cloudflare challenge state).
Inputs: your_domain (required), competitor_domains (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: audit_ai_visibility performs a comprehensive composite audit, check_ai_bot_access focuses solely on robots.txt and bot access, check_llm_mention checks LLM responses for brand mentions, and compare_competitors runs audits across multiple domains. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern: audit_ai_visibility, check_ai_bot_access, check_llm_mention, compare_competitors. The verbs (audit, check, compare) clearly indicate the action, and nouns describe the target.
With 4 tools, the server covers its core domain—AI visibility auditing—without being excessive or insufficient. Each tool contributes a distinct operation: detailed audit, specific check, LLM search, and competitive comparison.
The tool surface is complete for the domain: it includes a comprehensive audit (robots, sitemap, JSON-LD, llms.txt), a specific robots.txt check, LLM mention analysis, and competitor comparison. No obvious missing operations like per-resource checks are needed, as they are covered by the composite audit.
Maintenance
Related MCP Connectors
Audits AI search crawlers, citation blockers, llms.txt, JSON-LD, canonicals & sitemaps.
21Checks llms.txt, AI crawler access in robots.txt, and sitemap - with a 0-100 AI readiness score.
See what GPTBot, ClaudeBot and other crawlers get from a site: robots.txt checks and AI scans.
Audit any website for AI agents and AI search (AEO): llms.txt, AI bots, schema. Score plus fixes.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to check whether a public website is crawlable, understandable, and ready for AI search workflows through local-only audits of robots.txt, sitemaps, metadata, and llms.txt.379 npm2MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to audit a website's AI visibility by checking crawler access, identity files, and page signals, and running a full scored audit across ChatGPT, Claude, Gemini, and Perplexity.10106 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to audit and improve a site's visibility in AI search by checking robots.txt against 17 major AI crawlers, detecting llms.txt, and returning a 0-100 visibility score with per-crawler verdicts; it also lists known AI crawlers and their purposes.2MIT

QueryRev AI Readinessofficial
AlicenseAqualityCmaintenanceChecks a site for AI crawlers: which of 11 AI crawlers its robots.txt lets in, whether its llms.txt follows llmstxt.org, and what its home page says without scripts. Findings with evidence; no scores, no model calls, no telemetry.549 npmMIT