Citation Intelligence MCP

Бесплатный MCP-сервер: узнайте, какие URL-адреса ChatGPT, Claude, Perplexity, Gemini и Bing цитируют для любого запроса.

Документация

Citation Intelligence MCP

A free, self-hosted MCP server that measures what AI search engines cite, what they read but do not cite, what platforms report, what AI referrals convert, and which AI crawlers actually fetch your pages.

npm version license node CI

What this is

An MCP server for agents and developers who need to know which URLs get cited by AI search engines for any query. Install once, query from any MCP-compatible client (Claude Desktop, Cursor, Claude Code, Continue, Cline, n8n, LangGraph). Self-hosted, no account, no centralized backend. Bring your own API keys; nothing is stored on a remote server.

Who this is for

Install this if you're:

  • Building an agent that does research and want it to cite sources LLMs already trust
  • A solo dev or indie hacker checking whether your SaaS is showing up in AI search
  • A content creator confirming your articles are being cited by ChatGPT, Claude, or Perplexity
  • An SEO or GEO practitioner who wants programmatic citation data without a $295-$499/mo dashboard
  • Running an editorial pipeline and want citation-deficit-driven topic selection
  • Comparing competitor visibility across AI engines for any niche

Do NOT install this if you want:

  • A polished marketing dashboard with charts and team seats - try Profound, AthenaHQ, or Otterly.AI
  • A hosted service with SLAs - this is self-hosted by design
  • Citation tracking for academic papers - try citecheck
  • 350M+ pre-modeled prompts - that's Ahrefs Brand Radar

Why this exists

The AI citation tracking market is dominated by VC-funded dashboards starting at $295/mo. None ships MCP-first. If you're an agent or developer who wants citation data piped directly into your workflow - not into a SaaS login - there isn't a tool for you. This is that tool.


Data classes

Every number carries one class. They are never summed.

ClassMeaning
reportedThe platform counted it (GSC Generative AI impressions, Bing AI Performance citations). We did not observe it.
observedWe made the request, stored the response, and counted from it (panel runs, referral rows, crawler log lines).
estimatedInferred from observations with the inference stated (cost_estimate).

metrics_query refuses blended names (visibility_score, ai_visibility) and cross-class totals, and names the per-class alternatives instead. Method details and the "what this does not measure" list live in docs/measurement-methods.md.


Tools

38 tools. Wire names use underscores (not dots) so Anthropic-API-based MCP clients can forward the tool list without HTTP 400. The full registry and the deprecation policy are in docs/tool-surface.md.

Start with citations_provenance or domain_am_i_cited. Single-engine results are directional; multi-engine consensus is the honest signal.

Observed citations — run a panel, measure what came back

ToolPurpose
citations_provenanceRecommended first tool. Fan a query across engines; per-URL cross-engine consensus.
citations_checkURLs cited by Perplexity / Claude / ChatGPT / Gemini / Google AI Mode, or web rank via Brave SERP.
citations_evidenceExtract the cited snippet from raw_answer for each citation.
citations_freshnessRecency score (halflife = 365 d) for the pages an engine cites.
citations_trendCitation rate over time + per-query gained/lost deltas (legacy snapshots).
signals_answer_boxWhere each citation's first mention sits in the answer (early/middle/late).
domain_am_i_citedDomain citation check across engines with per-engine breakdown.
domain_cited_forQueries the domain has been cited for, from local storage.
domain_cited_for_diffCitation drift between two time windows.
panel_trackSave / load / list named query panels.
panel_runRun a panel and append a snapshot.
retrieval_eligibilityRead-but-not-cited rate per platform. Refuses platforms without a verified read set.
sources_seenConsulted URLs by run, ranked, annotated with whether each was cited.
metrics_queryUnified read API. Any metric with data_class, method, sample_size, caveats; refuses cross-class aggregation.

Reported platform data — import the vendor's own numbers

ToolPurpose
official_importImport Bing AI Performance or GSC Generative AI CSV exports (idempotent).
official_queryQuery imported official rows. Deprecated: use metrics_query.
coverage_matrixCapability matrix + which layers are configured. Never reports a missing layer as zero.

Referrals and crawlers — the other two signal families

ToolPurpose
referrals_importImport GA4 / Matomo / CSV referral data; classify AI sources; keep unattributed separate.
crawler_ingestImport nginx/Apache/Cloudflare logs; match AI bots; verify IPs against published ranges.
audit_crawler_accessProbe robots.txt + live fetch per AI bot, then report log-observed hits separately.

Reporting, export, cost

ToolPurpose
report_ai_visibilityFour measured layers (L1 official, L2 read-vs-cited, L4 referrals, L5 crawlers). L3 is reported as not configured. Every figure labelled; includes "what this does not tell you".
report_visibilityLegacy blended report. Deprecated: use report_ai_visibility.
export_datasetSix core tables to JSONL or CSV, windowed. Runs export replays into a fresh store.
cost_estimatePer-platform projected USD with published unit prices, source URLs and a prices_verified_on date.
prompts_generateMonitoring prompt candidates from panel gaps, GSC queries and People-Also-Ask, each with its source.

Competitors

ToolPurpose
competitors_canonical_setTop cited domains per query, aggregated across engines.
competitors_competeEnd-to-end snapshot: your URL vs top cited competitors.
competitors_compareSide-by-side signal comparison across 2-10 URLs.

Signals and on-page audits

ToolPurpose
signals_ai_overviewGoogle AI Overview presence + cited sources (SerpAPI).
signals_wikipediaWikipedia articles referencing a domain (zero keys).
signals_gsc_gapJoin Search Console performance with AI citation status.
signals_bing_gapJoin Bing Webmaster query stats with AI citation status.
citations_predictHeuristic citation-likelihood signals. Not a fitted model.
audit_schemaSchema.org validation: required fields per @type, malformed JSON-LD.
audit_structured_dataSuggested JSON-LD additions for a URL.
audit_sitemapBulk readiness audit across every URL in a sitemap.
audit_sitemap_mapCross-reference sitemap URLs with stored citations.
audit_llms_txtGenerate an llms.txt from a sitemap.

Prompts

  • audit_citation_readiness(url) — chains citations_predict + audit_schema
  • audit_competitor_snapshot(query, your_url?) — chains competitors_canonical_set + competitors_compete
  • audit_crawler_checkup(url) — runs audit_crawler_access and writes a remediation list
  • audit_gap_analysis(domain, days?) — drives signals_gsc_gap and suggests next moves
  • audit_sitemap_coverage(sitemap_url) — runs audit_sitemap_map and recommends priorities

Resources

  • citation://cache/summary — entry counts by type/engine, unique queries/URLs
  • citation://panels — saved panels + per-panel snapshot counts
  • citation://docs/llms-txt — llms.txt primer (markdown)
  • citation://docs/ai-crawlers — AI crawlers cheatsheet (markdown)
  • citation://domain/{domain}/cited-for — dynamic template: citations for {domain}

What this actually measures

Every response names its surface and its data class. Read both before drawing a conclusion.

SurfaceEngines / sourcesWhat it meansWhat it does not mean
apiopenai, claude, gemini, perplexityFirst-party API call with grounded search.It is not the consumer product: model routing, memory and personalisation differ.
serp_capturegoogle_ai_mode, google_ai_overviewThird-party capture of a consumer Google surface via SerpAPI.Not stable across locales and capture times; not a rank tracker.
webmaster_reportofficial_import (Bing, GSC)Platform-reported numbers imported from CSV.The platform decides what a citation or impression is, and GSC exposes impressions only.
web_rankbrave_serpTraditional SERP rank.It is not an LLM citation. domain_am_i_cited refuses it.
logcrawler_ingestServer or CDN access logs.A fetch is not a read; user agents can be spoofed.
derivedmetrics, reportsComputed from observations.It adds no evidence; it only rearranges counted evidence.

Every tool response includes an interpretation_note summarising its transport. There is no "pixel-accurate" claim anywhere in this project: an API proxy and a consumer session are different transports and can return different citations for the same query. See docs/measurement-methods.md.


Quick start

npx -y @automatelab/citation-intelligence

Requires Node 20 or later.

Claude Desktop

Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "citation-intelligence": {
      "command": "npx",
      "args": ["-y", "@automatelab/citation-intelligence"],
      "env": {
        "PERPLEXITY_API_KEY": "pplx-...",
        "SERPAPI_KEY": "...",
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "OPENAI_API_KEY": "sk-...",
        "GEMINI_API_KEY": "..."
      }
    }
  }
}

Set only the keys you have. Any MCP client that supports stdio transport works - same command / args pattern.

How it stays free

  • No central backend. The server runs on your machine. Nothing is uploaded.
  • Free tier first. SerpAPI gives 100 free Google AI Overview lookups/month. Bing Webmaster Tools provides statistics for verified sites; the Azure Bing Web Search API is retired. Perplexity offers free Sonar access on signup.
  • Bring your own paid keys if you want the premium engines (Claude, ChatGPT, Gemini). Keys pass through to the vendor and never touch any third party.
  • Local cache at ~/.config/citation-intelligence/cache.json. Repeated queries hit cache, not API. Default TTL: 7 days.
  • citations_predict runs with zero keys - it scores citation likelihood from public signals (Wikipedia, schema.org, llms.txt, GitHub) without firing any LLM.

Privacy

  • All API calls go from your machine directly to the vendor (Anthropic, OpenAI, Google, Perplexity, Bing, SerpAPI).
  • No proxy. No analytics. No telemetry by default.
  • API keys are read from environment variables on the MCP process - never logged, never persisted.
  • Cache file lives at ~/.config/citation-intelligence/cache.json. Delete it any time.

Storage

Measurements are recorded to an append-only event log at ~/.config/citation-intelligence/events/YYYY-MM.jsonl — one JSON line per run, holding the prompt, the engine's own search queries, the pages it read, the pages it cited, and the model that answered. Derived monthly roll-ups live in aggregates/. The log is the source of truth; roll-ups can be regenerated.

Existing v0.12 data is not touched. To import it into the log once (idempotent, safe to re-run):

npm run build && npm run migrate

Legacy cache.json, panels/ and snapshots/ keep working and are never rewritten. See docs/adr/001-event-log-storage.md for why the store is a log rather than a database.

Environment variables

VarPurposeFree tier?
PERPLEXITY_API_KEYcitations_check (perplexity — api_proxy)Yes
SERPAPI_KEYsignals_ai_overview + citations_check (google_ai_mode — serp_capture)100/month free
ANTHROPIC_API_KEYcitations_check (claude — api_proxy)Paid only
OPENAI_API_KEYcitations_check (openai — api_proxy)Paid only
GEMINI_API_KEYcitations_check (gemini — api_proxy)Yes
BING_WEBMASTER_API_KEYsignals_bing_gap (verified-site Bing statistics)Yes
BRAVE_API_KEYcitations_check (brave_serp — web_rank)Yes (2000/month)
CITATION_CACHE_TTL_DAYSCache TTL for citations_check entries (default 7)n/a
CITATION_AI_OVERVIEW_TTL_DAYSCache TTL for signals_ai_overview entries (default 1)n/a
CITATION_CONFIG_DIROverride config dir (default ~/.config/citation-intelligence)n/a

Example: am I cited?

You: For the queries "best AI citation tracker", "MCP for AI search", "self-hosted GEO tool",
     is automatelab.tech cited?

(agent invokes `domain_am_i_cited`)

Result:
{
  "domain": "automatelab.tech",
  "engine": "perplexity",
  "results": [
    { "query": "best AI citation tracker",   "cited": true,  "rank": 4 },
    { "query": "MCP for AI search",          "cited": true,  "rank": 1 },
    { "query": "self-hosted GEO tool",       "cited": false, "matching_urls": [] }
  ],
  "summary": {
    "queries_total": 3,
    "queries_cited": 2,
    "citation_rate": 0.67,
    "sample_size": 3,
    "average_rank": 2.5
  }
}

Example: predict citation likelihood (no key required)

You: How likely is https://example.com/blog/post to be cited by AI?

(agent invokes `citations_predict`)

Result:
{
  "url": "https://example.com/blog/post",
  "score": 62,
  "grade": "C",
  "signals": {
    "wikipedia_linked": false,
    "github_referenced": false,
    "reddit_referenced": true,
    "llms_txt_present": true,
    "https": true,
    "has_article_schema": true,
    "has_faq_schema": false,
    "has_breadcrumb_schema": true,
    "canonical_clean": true,
    "word_count": 1850,
    "reading_time_minutes": 8,
    "h2_count": 7,
    "h2_question_count": 1,
    "authority_link_count": 2,
    "external_link_count": 6,
    "internal_link_count": 11,
    "last_modified_days_ago": 42,
    "has_open_graph": true
  },
  "fixes": [
    { "signal": "has_faq_schema", "suggestion": "Page already has question-style H2s. Wrap them in FAQPage JSON-LD - high-leverage win.", "estimated_lift": "high" },
    { "signal": "h2_question_count", "suggestion": "Reframe at least 2 H2s as questions users actually ask...", "estimated_lift": "medium" }
  ]
}

The Wikipedia signal is measured (it correlates with citation) but no "go get a Wikipedia article" suggestion is emitted - the advice would be non-actionable. Scoring is split across six buckets - domain authority, structured data, content depth, link graph, freshness, metadata - so a thin page and a deep page on the same domain get meaningfully different scores.


Workflow recipes

Concrete patterns that compose the tools into something useful. Costs assume ChatGPT or Perplexity at ~$0.01-0.03/query; run cost_estimate for your own panel.

1. Weekly citation tracker

The single highest-ROI pattern. Pick 20-30 queries from your editorial backlog, snapshot weekly, watch the rate trend.

# One-time setup
panel_track name="editorial-watchlist" domain="example.com" action="save"
            queries=["best widget tutorial", "how to set up X", ...]

# Weekly cron (5 min, ~$0.20-0.60 per run)
panel_run name="editorial-watchlist"

# Anytime
citations_trend panel="editorial-watchlist"

citations_trend returns per-query deltas: which queries flipped from cited: false to cited: true since the first snapshot. That's your real editorial-impact metric.

2. Pre-publish gate

Before publishing a post, find out who owns the citation slot and whether the slot is worth competing for.

# 1. Is there an AI Overview to compete for?
signals_ai_overview query="<target query>"

# 2. Who is cited today?
citations_check query="<target query>"

# 3. After publish + 14 days: did the post break in?
domain_am_i_cited domain="example.com" queries=["<target query>"]

If citations_check returns 5+ strong incumbents on a low-volume query, pick a different angle. If ai_overview_present: false, the query has no AI surface - reconsider.

3. Bulk site audit

Catch site-wide structural issues across every page in one pass. Zero API spend.

audit_sitemap sitemap_url="https://example.com/sitemap.xml" limit=200

Returns worst_first sorted by citation-likelihood score. Surfaces missing schema, conflicting canonicals, missing /llms.txt, broken HTTPS.

4. Competitor signal gap

You're not cited; they are. Why?

# 1. Find the top-cited URLs for your target query
citations_check query="<query>"

# 2. Compare your URL to theirs signal-by-signal
competitors_compare urls=[
  "https://example.com/your-post",
  "https://competitor-1.com/their-post",
  "https://competitor-2.com/their-post"
]

diverging_signals is the list of where you're losing. Usually obvious once you see it - they have FAQ schema, GitHub references, Wikipedia links - you don't.

5. Google-rank vs AI-citation gap

The closest editorial wins are queries where you already rank in Google's top 10 but are invisible to AI. Requires a GCP service account with webmasters.readonly scope.

signals_gsc_gap
  domain="example.com"
  queries=["...editorial watchlist..."]
  start_date="2026-04-01"
  end_date="2026-05-01"

closest_wins returns queries with position <= 10 and ai_cited: false, sorted by impressions desc. Push citation signals on those specific URLs first.

6. Wikipedia mention monitor

Wikipedia is the top-correlation signal but the advice "get on Wikipedia" is useless. So instead: watch when it happens organically.

signals_wikipedia domain="example.com" limit=50

Returns Wikipedia article URLs that already link to the domain. Re-run quarterly; the diff is your "we got a Wikipedia citation" alert.

Schema.org

{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "Citation Intelligence MCP",
  "applicationCategory": "DeveloperApplication",
  "operatingSystem": "Cross-platform",
  "description": "Self-hosted MCP server for querying AI citation data from Perplexity, Claude, ChatGPT, Gemini, Bing, and Google AI Overviews.",
  "offers": { "@type": "Offer", "price": "0" },
  "url": "https://github.com/AutomateLab-tech/citation-intelligence"
}

Contributing

Bug reports, feature ideas, and PRs welcome. See CONTRIBUTING.md.

Security

Report a vulnerability via SECURITY.md.

License

MIT - see LICENSE.

Built by automatelab.tech

Maintenance and verification

See the maintenance guide for interpretation limits, current tool names where applicable, and reproducible verification.