Sponsored by Deepsite.site

Ai Visibility Mcp

Created By
krissandersa month ago
MCP server that audits AI-bot visibility. Reports per-bot robots.txt verdicts for 22 AI user-agents (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, etc.), Cloudflare AI-default flags, on-page schema, sitemap, llms.txt, SPA-shell detection, and cross-model brand mentions via Perplexity + OpenRouter. Produces a 0-100 score with explainable deductions. SSRF-guarded (blocks loopback / link-local / cloud IMDS), cost-capped (per-call + daily). MIT, 24 tests, runs on stdio or HTTP.
Overview

ai-visibility-mcp

MCP server that audits how AI sees your website. Robots, schema, LLM mentions, Cloudflare AI defaults — all in one tool call.

Python MCP License: MIT

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 answers four questions from any MCP client:

  1. Can AI bots read this site?
  2. What does the structured-data + meta-robots story look like to an LLM?
  3. Does this brand surface in LLM-generated answers — and which models?
  4. How does this site compare to its competitors?

Tools

ToolPurposeNeeds API keys?
check_ai_bot_access(domain)Per-bot robots.txt + Cloudflare AI-default flag for 22 AI user-agentsNo
audit_ai_visibility(domain)0-100 composite score with explainable deductions (robots, meta, JSON-LD, sitemap, llms.txt, SPA shell)No
check_llm_mention(brand, query, aliases?, models?)Cross-model brand surfacing (Perplexity sonar + OpenAI gpt-4o-mini + Gemini 2.0 Flash by default)Yes
compare_competitors(your_domain, competitor_domains[])Parallel ranked audit, max 10 in flightNo

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/krissanders/ai-visibility-mcp
cd ai-visibility-mcp
uv sync
cp .env.example .env  # fill in PERPLEXITY_API_KEY / OPENROUTER_API_KEY

Run

# stdio transport — Claude Desktop / Claude Code
uv run ai-visibility-mcp

# HTTP transport — remote agents
uv run ai-visibility-mcp --http --port 8000

Claude 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"]
    }
  }
}

Example 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 cap

Security 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) plus LLM_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 varDefaultPurpose
PERPLEXITY_API_KEYRequired for Perplexity models in check_llm_mention
OPENROUTER_API_KEYRequired for OpenAI / Gemini / Claude via OpenRouter
MAX_COST_PER_CALL0.10USD ceiling per tool invocation
MAX_DAILY_USD5.00USD ceiling per UTC day, persisted
LLM_MAX_OUTPUT_TOKENS1024Hard cap on output tokens per LLM call
AI_VISIBILITY_SPEND_FILE~/.cache/ai-visibility-mcp/spend.jsonOverride spend ledger location

Development

uv sync --extra dev
uv run pytest          # 24 tests
uv run ruff check .    # lint

Status

v0.2 — security-hardened, 24/24 tests, smoke-verified against tealhq.com / bandcamp.com / anthropic.com. track_changes (persistent diff over time) deferred to v0.3.

License

MIT.

Server Config

{
  "mcpServers": {
    "ai-visibility": {
      "command": "uv",
      "args": [
        "--directory",
        "/abs/path/to/ai-visibility-mcp",
        "run",
        "ai-visibility-mcp"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "<your-key>",
        "OPENROUTER_API_KEY": "<your-key>"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code