Skip to main content
Glama
ai-visibility-mcp

ai-visibility-mcp

by d1fpc3

ai-visibility-mcp

CI License: MIT Node 22+

An open-source Model Context Protocol server that lets Claude check whether AI assistants recommend a business.

Ask Claude "Does ChatGPT recommend Eco-Cool HVAC for AC repair in Bel Air?" and it can now find out. The server asks Claude, ChatGPT, Perplexity and Gemini the questions real customers ask, finds every business each one names, and reports whether yours made the list, where it ranked, what was said, and who got named instead.

How it works

flowchart LR
    C[Claude Desktop / Claude Code<br/>any MCP client] -- tool call --> S[ai-visibility-mcp]
    S --> R[run: concurrency limit,<br/>retries, answer cache]
    R --> A[Anthropic]
    R --> O[OpenAI]
    R --> P[Perplexity]
    R --> G[Gemini]
    A & O & P & G -- raw answers --> M[matching: extract named<br/>businesses, fuzzy-match yours]
    M -- per engine report<br/>+ structured JSON --> C
  1. Each question goes to every engine you have a key for, in parallel, capped by a concurrency limit.

  2. Each answer is parsed for the businesses it recommends (numbered lists, bullets, headings, bold names, "Best overall: X" labels), in order.

  3. Your business is matched against those names with variant-tolerant matching, and against passing mentions in the prose and your website domain.

  4. Results come back as readable text for the model plus structuredContent that validates against a declared outputSchema.

Related MCP server: AEO Copilot MCP Server

Tools

Tool

What it does

ask_engines

Ask one customer question to every configured engine and return the raw answers and cited sources.

check_visibility

Run a list of questions and report, per engine and per question: named or not, position, an evidence quote and the competitors named instead.

suggest_questions

Write 8 to 12 realistic customer questions for a business type and city. Uses a model if one is configured, otherwise a built-in template set.

compare_competitors

Rank which businesses the engines name most across a set of questions, with mention counts, which assistants named them and average position.

Also exposed:

  • Prompt visibility_report: walks the model through suggest, check, compare and a written audit with fixes.

  • Resource ai-visibility://engines: which engines are configured, their models and the run limits (never keys).

All tools are marked readOnlyHint, and the network-calling ones openWorldHint.

Install

Requires Node 22+. Clone and build:

git clone https://github.com/d1fpc3/ai-visibility-mcp.git
cd ai-visibility-mcp
npm install
npm run build

Claude Code

claude mcp add ai-visibility \
  -e ANTHROPIC_API_KEY=sk-ant-... \
  -e OPENAI_API_KEY=sk-... \
  -- node /absolute/path/to/ai-visibility-mcp/dist/index.js

Claude Desktop

Add this to claude_desktop_config.json (Settings, Developer, Edit Config) and restart Claude Desktop:

{
  "mcpServers": {
    "ai-visibility": {
      "command": "node",
      "args": ["/absolute/path/to/ai-visibility-mcp/dist/index.js"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "OPENAI_API_KEY": "sk-...",
        "PERPLEXITY_API_KEY": "pplx-...",
        "GEMINI_API_KEY": "..."
      }
    }
  }
}

Over HTTP

node dist/index.js --http --port 3333
# MCP endpoint: http://127.0.0.1:3333/mcp (stateless Streamable HTTP)

Configuration

Each engine turns on only when its key is set. Set at least one.

Variable

Default

Notes

ANTHROPIC_API_KEY

Enables Claude

OPENAI_API_KEY

Enables ChatGPT

PERPLEXITY_API_KEY

Enables Perplexity (returns cited sources)

GEMINI_API_KEY or GOOGLE_API_KEY

Enables Gemini

AIV_ANTHROPIC_MODEL

claude-haiku-5-5

AIV_OPENAI_MODEL

gpt-5-mini

AIV_PERPLEXITY_MODEL

sonar

AIV_GEMINI_MODEL

gemini-2.5-flash

AIV_CONCURRENCY

4

Max engine calls in flight at once

AIV_TIMEOUT_MS

45000

Per attempt

AIV_MAX_RETRIES

2

On 429, 5xx, timeouts and network errors

AIV_CACHE_TTL_SECONDS

600

Reuse identical question answers for this long

AIV_MAX_QUESTIONS

12

Per tool call, so one request can't run up a bill

Design notes

Matching. Assistants write the same business many ways: "Eco-Cool HVAC LLC", "EcoCool", "Eco Cool Heating & Air". Names are normalized (case, accents, punctuation, & vs and, a leading "The", trailing LLC/Inc/Co), then compared as token sets with one-typo tolerance on longer words, squashed-spacing checks ("EcoCool" vs "Eco Cool") and trade-word groups, so "Heating" and "HVAC" agree but "Plumbing" and "HVAC" do not. A name made only of trade words ("Heating and Cooling") never matches anyone. Aliases and the website domain count as matches too.

Extraction. Business names come from list items, headings, bold spans and "Best overall:" labels, cut at the first dash, colon, bracket or verb. Indented detail lines (**Phone:**, **Why they stand out:**), advice lines ("Tips", "Bottom line") and category headings ("Top HVAC Companies in Bel Air") are dropped. Spelling variants are merged so competitor counts are not split.

Reliability. Every call has a timeout, retries with exponential backoff and full jitter (honoring Retry-After), and fails fast on 4xx errors that retrying cannot fix. One engine failing never sinks a run: its error is reported next to the answers that worked. Client cancellation is passed through to in-flight requests.

Cost control.

  • Small, fast default models.

  • A hard cap on questions per call.

  • Duplicate questions inside a run are asked once.

  • An answer cache keyed on engine, model and normalized question is shared across tool calls, so check_visibility followed by compare_competitors on the same questions costs one set of calls.

  • Failed calls are never cached.

Protocol. Built on the official TypeScript SDK with zod input and output schemas, tool annotations, a prompt and a resource. stdout is reserved for the protocol, and all logs go to stderr.

Development

npm run check   # typecheck, lint (Biome), tests (Vitest), build, smoke test
  • test/ has 66 tests: matching and extraction, retries and timeouts, each provider's request and response shape, the concurrency limiter and cache, report building, and an in-process MCP client that calls every tool, prompt and resource against mock engines.

  • scripts/smoke.mjs starts the built server and speaks raw JSON-RPC to it over stdio and Streamable HTTP.

  • No API keys are needed to run any of it.

Hosted version

This is the small self-hosted cousin of SeenRank. SeenRank tracks AI visibility weekly for local businesses, explains why a business was left out, and writes the fixes.

Author

Built by Frank Claridge (github.com/d1fpc3).

MIT licensed.

Available Tools

4 tools
ask_enginesAsk AI enginesA
Read-only

Ask one customer-style question (for example "best HVAC company in Bel Air MD") to every configured AI engine and return each raw answer plus any cited sources. Use this to read exactly what an assistant tells customers.

Inputs: question (required), engines.

check_visibilityCheck AI visibilityA
Read-only

Run customer questions across the configured AI engines and report, per engine and per question, whether the business was named, its position in the list, a short evidence quote and which competitors were named instead. Handles name variants (LLC/Inc, "&" vs "and", spacing, small typos). Pass aliases for nicknames or old names.

Inputs: business (required), questions (required), domain, aliases, +1 more. Returns: stats, errors, engines, overall, +2 more

compare_competitorsCompare competitorsA
Read-only

Run customer questions across the configured AI engines and rank which businesses get named most, with how often, by which assistants and at what average position. Pass the business name to flag it in the ranking.

Inputs: questions (required), top, aliases, engines, +1 more. Returns: stats, answered, competitors

suggest_questionsSuggest customer questionsA
Read-only

Generate 8 to 12 realistic questions a customer might ask an AI assistant when looking for this kind of business in this city. Uses the first configured engine to write them, or a built-in template set if none is set up.

Inputs: city (required), businessType (required), count, service.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool targets a different output: raw answers (ask_engines), per-question business presence (check_visibility), question generation (suggest_questions), and competitor ranking (compare_competitors). The boundary between ask_engines and check_visibility is thin since both fan out the same questions to the same engines, differing only in whether raw output or analysis is returned.

    Naming Consistency5/5

    All four tools follow a clean verb_noun snake_case pattern (ask_engines, check_visibility, suggest_questions, compare_competitors). No mixed conventions or vague single-word names.

    Tool Count4/5

    Four tools is a tight, purposeful surface for a niche AI-visibility monitoring workflow, and each maps to a distinct step. The count is slightly lean given that raw-answer retrieval could arguably be a mode of the analysis tool rather than a peer.

    Completeness3/5

    The core loop (generate questions, check presence, benchmark competitors) is covered, but there is no tool for managing configured engines/business identity, no historical or trend tracking across runs, and no export/reporting operation. Agents will hit a dead end if they need to inspect or change configuration rather than just consume results.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to monitor and analyze a brand's visibility across ChatGPT, Claude, Perplexity, and Google AI Overviews, providing insights, recommendations, and competitive analysis without switching tabs.
      25
      197 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to scan brand visibility across ChatGPT, Claude, Gemini & Perplexity, analyze website GEO readiness, compare competitors, and get actionable recommendations.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Checks whether ChatGPT, Perplexity, and Gemini cite your brand for a given keyword, and who's winning the citation battle for it instead.
      6
      10
      MIT