Integration · Ahrefs

The foundational MCP for the SEO audit suite.

Six audit-suite skills (orchestration, backlink, keyword gap, content gap, traffic, site health, rank tracking) all assume Ahrefs as the data backend. The agent runs the audit; Ahrefs returns the data; the orchestration skill turns the data into deliverables.

Backlink profiles with referring-domain quality scoring, keyword data with traffic value estimates, content explorer for discovering high-performing competitor pages, technical site audits with crawl-budget diagnostics, rank tracking with SERP-feature presence, and content gap analysis at the topic-cluster level. The MCP exposes the same data the platform UI does; the agent orchestrates the calls and writes the report. Cross-validate findings with Semrush and Similarweb for the strongest signal.

Official MCPAhrefs official MCP, API key auth, the primary backend for the catalog's SEO audit suite.

What you can do via MCP

Example prompts the agent runs.

  • Run a backlink-reclamation audit on rampstack.co; surface the top 25 lost links from the last 6 months and rank them by referring-domain authority.

    Calls the backlink history endpoint, filters to lost links in the window, joins to referring-domain DR, returns the top 25 ranked. The reclamation list is the output the seo-backlink-audit skill consumes for outreach prioritization.

  • Find content gaps where competitors rank in the top 10 for keywords with over 500 monthly searches and we have no relevant page at all.

    Pulls competitor top pages, intersects with our ranking universe, filters to keywords above the volume threshold, returns the gap list with traffic-potential estimates. Feeds the seo-content-gap-audit framework's Category 1 (Missing topics) directly.

  • Diagnose the 30 percent organic traffic drop on rampstack.co since April 1; is this a competitor move or an algorithm hit?

    Pulls our traffic curve, our top-page traffic deltas, our SERP-position deltas, and overlays competitor traffic curves and competitor SERP-position deltas. If the pattern is ours alone, points to algorithm or technical; if the vertical moved together, points to category-level intent shift. Layer 5 of the seo-traffic-diagnosis framework.

  • Score our top 10 pages on the site-audit dimensions (Core Web Vitals, schema coverage, mobile usability, internal linking density). Return the worst-scoring page first.

    Calls the site-audit endpoint for each page, returns the dimension-by-dimension breakdown, sorts by composite score ascending. The worst-scoring page is the agent's prioritization signal for the seo-site-health-audit skill.

  • Track our 50 priority keywords daily; alert me when any drops more than 3 positions in a week.

    Configures the rank-tracking project (50 keywords, daily cadence), sets the position-delta alert threshold, returns the alert configuration. The seo-rank-tracking skill assumes a configuration like this exists; this prompt creates it.

Ahrefs · MCP

Backlink history retrieval via the Ahrefs MCP. The agent specifies the target site and time window; Ahrefs returns the backlink delta with referring-domain context.

Ahrefs MCP
docs
# Ahrefs MCP, called via the agent runtime
mcp.ahrefs.site_explorer.backlinks_history({
  target: "rampstack.co",
  mode: "domain",
  date_from: "2026-01-01",
  date_to: "2026-05-01",
  history_grouping: "monthly",
  status: "lost",
  order_by: "domain_rating_source:desc",
  limit: 25
})

# Returns: lost_backlinks[] with referring_domain, referring_url,
#          domain_rating_source, traffic_value_lost, last_seen_date.
One command sample showing how the agent talks to Ahrefs. The MCP exposes the platform's primitives as tools; the agent translates the prompt into the right call.

MCP integration

Ahrefs MCP server.

Server
Ahrefs official MCP endpoint (verify URL at authoring time; Ahrefs ships first-party MCP tooling)
Auth
API key (per-account, rotatable in Ahrefs settings; subscription-tier scoping applies)
Hosting
Ahrefs hosted
Scoping note
MCP access is scoped to the API tier on the Ahrefs subscription. Standard subscriptions cover most audit-suite calls; deeper historical data (multi-year backlink history, full SERP archive) may require a higher tier. The 6 audit-suite skills assume tier-appropriate access.
  • Backlink profiles with referring-domain authority and quality scoring
  • Keyword data with traffic value estimates and parent-topic clustering
  • Content explorer for discovering high-performing competitor pages
  • Site audit with Core Web Vitals, schema coverage, crawl diagnostics
  • Rank tracking with daily SERP-position deltas and feature-presence flags
  • Content gap analysis at keyword and topic-cluster level

Ahrefs API docs

Visual demonstration

What this looks like in practice.

Ahrefs· DashboardLast 30 days
Site overview · rampstack.co
  • Domain Rating

    62

    +1.6%vs last 30d
  • Referring Domains

    1,284

    +4.2%vs last 30d
  • Organic Traffic

    48.2K

    -3.1%vs last 30d
  • Organic Keywords

    12,840

    +2.4%vs last 30d
  • Top Page Traffic

    8.4K

    -7.2%vs last 30d
  • Site Health Score

    87

    flatvs last 30d
The agent reads these metrics through the Ahrefs MCP, then asks the audit-suite skills which deltas need investigation. The down-trending top-page traffic is the prompt the seo-traffic-diagnosis skill picks up next.

CLI alternative

Ahrefs REST API for batch and CI workflows.

The MCP is the primary surface for agent-driven audit work. The REST API fills in for batch operations the agent runtime is not built for: bulk historical exports for a year-over-year executive review, scheduled CI runs that page on health-score regressions, and ETL into the team's warehouse for cross-source joins.

Pairs with these skills

The SEO audit suite plus the foundation skills.

Ahrefs is the data backend the SEO audit suite is built around. The orchestration skill (seo-audit-orchestration) sequences the six audit-suite skills below, each of which assumes Ahrefs is the data source.

  • seo-backlink-audit calls Site Explorer for backlink history, referring-domain authority, and link-velocity diagnostics.
  • seo-keyword-gap-audit calls Keywords Explorer for keyword universe and traffic-value estimates; intersects with our ranking universe.
  • seo-content-gap-audit calls Content Explorer for high-performing competitor pages and topic-cluster mapping.
  • seo-traffic-diagnosis uses Site Explorer for traffic curves, SERP-position deltas, and competitor traffic overlays.
  • seo-site-health-audit uses Site Audit for Core Web Vitals, schema coverage, and crawl-budget diagnostics.
  • seo-rank-tracking uses Rank Tracker for daily SERP-position deltas with feature-presence flags.

On Semrush and Similarweb, honestly.

Ahrefs is the foundational backend; Semrush and Similarweb are siblings, not replacements. Use Semrush alongside Ahrefs for cross-validation on US keyword data and for SEO-PR features (Topic Research, brand monitoring) Ahrefs does not cover. Use Similarweb for traffic estimation, audience overlap, and channel-mix breakdown that Ahrefs does not surface. Each platform answers a different question; running them together is sharper than relying on any one.

Cost considerations

Ahrefs's API charges per call. Long agent runs can compound.

Credits per call

This MCP wraps a paid API. Each tool call consumes credits or units against your plan. In long agentic sessions, costs can compound: a Claude agent running "audit competitors X, Y, Z across keyword, backlink, and traffic dimensions" may burn hundreds of API calls before it returns a single deliverable.

Ahrefs API uses Units (or Rows on legacy plans) per call. Multi-step agent workflows can consume thousands of units per session; verify your plan's allowance before long automated runs.

Recommended patterns

  • Cache responses in your agent's session memory rather than re-fetching the same data.
  • Scope queries narrowly before broad sweeps (a single competitor before all competitors).
  • Monitor your platform's usage dashboard during long workflows; set spend alerts where the platform supports them.
  • Batch where the API supports it; many endpoints accept arrays of inputs at the same credit cost as single inputs.
  • For audit-suite skills, run seo-audit-orchestration (which sequences calls efficiently) rather than the individual audit skills in parallel; the orchestration is more credit-efficient.
  • Prefer the Ahrefs Site Audit endpoint over recursive Site Explorer crawls; the Site Audit returns aggregate health data in a single call rather than per-page Unit consumption.