ai-visibility-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> 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 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:
1. **Audit** — find what's blocking AI visibility
2. **Fix** — generate the artifact that corrects it
3. **Paste** — site owner applies the output
4. **Re-audit** — verify the fix was picked up
Tools
Audit tools
| Tool | Purpose | Needs API keys? |
|---|---|---|
| check_ai_bot_access(domain) | Per-bot robots.txt + Cloudflare AI-default flag for 22 AI user-agents | No |
| 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 flight | No |
Generator tools (v0.3)
| Tool | Purpose | LLM call? |
|---|---|---|
| generate_robots_patch(domain, allow_bots?, deny_bots?) | Corrected robots.txt that opens access to AI bots; preserves existing rules; detects Cloudflare | No |
| generate_json_ld(url, page_type?) | Schema.org JSON-LD block for any page; auto-detects type (Product/Article/Organization/FAQPage/SoftwareApplication/WebSite); validates required fields | Yes (gpt-4o-mini) |
| generate_llms_txt(domain, crawl_depth?, max_pages?) | spec-compliant llms.txt; crawls homepage + sitemap; graceful fallback to link extraction | Yes (gpt-4o-mini) |
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.
Run
Claude Desktop / Claude Code config
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Desktop) or ~/.claude.json (CLI):
Audit-and-fix loop
Example session
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.