Back to MCP Servers

Ahrefs MCP Server

Official remote MCP server from Ahrefs for keyword research, backlink analysis, rank tracking, site audits, and competitor research. Requires Lite plan or higher.

SEO & Content by Ahrefs OAuth2 active
Overview

Ahrefs MCP is the official remote Model Context Protocol server from Ahrefs that lets AI assistants like Claude, ChatGPT, and Copilot pull live SEO data directly from the Ahrefs API. Once connected, an agent can perform keyword research, analyze backlinks, check rankings, audit sites, and compare competitors without leaving the chat interface. The server is hosted by Ahrefs at https://api.ahrefs.com/mcp/mcp using the Streamable HTTP transport, with a legacy SSE endpoint also available.

The server exposes Ahrefs' core data products as MCP tools, including keyword metrics and difficulty, organic traffic estimates, competitor overlap, SERP feature filtering, backlink and broken link discovery, top linked pages, and Site Audit page data via Page Explorer. Authentication is handled via OAuth-style consent that issues an MCP-scoped API key, with Enterprise customers also able to use standard API keys.

Ahrefs MCP is available on Lite, Standard, Advanced, and Enterprise plans. Each plan determines the monthly API unit allowance and the maximum number of rows the agent can pull per request. Note that the older self-hosted @ahrefs/mcp npm package and the ahrefs/ahrefs-mcp-server GitHub repository were archived in February 2026 and replaced by this hosted remote server.

Tools

Tool Description
keyword_metrics Retrieve search volume, difficulty, traffic potential and trend data for keywords.
keyword_ideas Generate keyword ideas including questions, comparisons and trending queries.
domain_overview Pull organic traffic estimates, traffic value and top countries for a domain.
organic_competitors Identify competing domains ranked by shared keywords with the target.
organic_keywords List keywords a domain ranks for, with positions and SERP features.
backlinks Retrieve backlinks pointing to a target domain or URL with link attributes.
broken_backlinks Find broken backlinks pointing to specific URLs or domains.
top_linked_pages Find the most-linked pages on a site or within a subdirectory.
referring_domains List domains linking to the target with growth and quality signals.
page_explorer Access page-level crawl data from Site Audit, including redirects and 404s.
serp_overview View SERP results for a keyword with SERP feature filtering (PAA, videos, etc).
Setup Guide

Prerequisites

  • An active Ahrefs subscription on the Lite plan or higher
  • An MCP-compatible client (Claude Desktop, Claude Web, ChatGPT, Cursor, Copilot Studio, n8n, etc.)

Remote server URL

Use the Streamable HTTP endpoint:

https://api.ahrefs.com/mcp/mcp

A legacy SSE endpoint exists at https://api.ahrefs.com/mcp/mcpSse but is deprecated.

Connecting via Claude

The simplest setup is through the Claude Connectors directory at https://claude.com/connectors/ahrefs. Approve the consent screen and Claude will generate and store an MCP-scoped API key for your Ahrefs account.

Manual MCP client config

For clients that accept a URL-based remote server, point them at the Ahrefs endpoint. For clients that require an API key, generate an MCP key from your Ahrefs workspace settings and pass it as a Bearer token.

{
  "mcpServers": {
    "ahrefs": {
      "url": "https://api.ahrefs.com/mcp/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AHREFS_MCP_KEY"
      }
    }
  }
}

Plan limits

Plan Monthly API units Max rows per request
Lite 100,000 100
Standard 400,000 250
Advanced 1,000,000 500
Enterprise 2,000,000 Unlimited

One API call costs a minimum of 50 units, with more complex queries consuming more.

Note on the archived server

The previous self-hosted @ahrefs/mcp npm package and ahrefs/ahrefs-mcp-server GitHub repository were archived on 2026-02-24 and superseded by this remote server. Do not use the old local implementation.

Use Cases
  • Run keyword research from chat: pull volume, difficulty, and traffic potential for a list of seed terms, then cluster them by intent
  • Audit a competitor: get domain overview, top organic keywords, and shared-keyword competitors for a target site
  • Backlink prospecting: find a competitor's top linked pages and referring domains to seed an outreach list
  • Reclaim broken links: identify broken backlinks pointing at your domain and draft outreach to redirect them
  • Technical SEO triage: query Page Explorer for redirects, 404s, and crawl issues from your latest Site Audit run
Example Prompts
  • "Pull search volume and KD for these 20 keywords in the US and group them by intent."
  • "Who are ahrefs.com's top 10 organic competitors, and which keywords do they share?"
  • "Find the top 25 most-linked pages on backlinko.com and show referring domain counts."
  • "List broken backlinks pointing at my domain so I can plan a redirect campaign."
  • "From my latest Site Audit, show all pages returning 404 or chained redirects."
Pros
  • Official, provider-hosted server maintained directly by Ahrefs
  • Broad coverage across keywords, backlinks, SERPs, and Site Audit data
  • OAuth-style consent flow with auto-provisioned MCP-scoped keys
  • Works across Claude, ChatGPT, Copilot, Cursor, n8n, and other MCP clients
Limitations
  • Requires a paid Ahrefs plan (Lite or higher); no free tier
  • API units are consumed per request, so heavy agent use can burn through monthly allowances quickly
  • Row caps per request on lower tiers limit how much data an agent can pull at once
Alternatives
  • DataForSEO MCP server for raw SERP, keyword, and backlink data via DataForSEO APIs
  • Semrush (community MCP implementations) for similar keyword and competitive intelligence workflows
  • Google Search Console MCP servers for first-party query and ranking data on your own properties