Ahrefs MCP

com.ahrefs/mcp

Overview

Hosted remote MCP server for connecting MCP-compatible AI clients to Ahrefs search, SEO, backlink, keyword, and marketing data with OAuth or Ahrefs MCP key authentication.

Documentation

Ahrefs MCP

Ahrefs MCP is Ahrefs' hosted remote Model Context Protocol server. It lets MCP-compatible AI clients access Ahrefs marketing, SEO, search, keyword, backlink, and competitive intelligence data through Ahrefs APIs using either OAuth authorization or an Ahrefs MCP key.

Installation

This is a hosted remote MCP server. There is no local server package, source-build target, npm package, or PyPI package to install in Wardn. Install/connect it by adding the Ahrefs remote MCP endpoint to a supported MCP client.

Recommended Streamable HTTP endpoint:

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

Legacy SSE endpoint, documented as deprecated in many tools:

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

Documented client setup examples include:

claude mcp add ahrefs https://api.ahrefs.com/mcp/mcp -t http
npx mcp-remote https://api.ahrefs.com/mcp/mcp --header Authorization:<AUTH_HEADER>
npm install -g mcporter
mcporter config add ahrefs https://api.ahrefs.com/mcp/mcp

Other documented setup paths configure the same URL in ChatGPT Web, Lovable, Mistral Le Chat, Copilot Studio, Manus, n8n, OpenClaw, Claude Desktop/Web, Claude Mobile, and Claude Code.

Configuration

Supported clients can use OAuth. OAuth setup prompts the user to sign in to Ahrefs, select a workspace, and approve access.

Manual setup uses an Ahrefs MCP key generated from the Ahrefs API keys report. Clients pass that key as an Authorization bearer token. For example, n8n uses Bearer Auth credentials, Copilot Studio and Manus use an Authorization header, and the Claude Desktop/Web mcp-remote bridge uses an AUTH_HEADER helper environment variable containing a bearer token. AUTH_HEADER belongs to the client bridge configuration, not to a hosted server runtime environment.

The registered remote endpoints therefore have no server-side environment variables or query parameters. The Authorization header is optional in registry metadata because OAuth-capable clients can authenticate without a manually supplied bearer key, while manual MCP-key configurations provide Authorization: Bearer ....

Capabilities

Ahrefs documents the MCP server as a way for AI agents to securely access Ahrefs API/search/marketing data. Documented action examples include site-explorer-refdomains, keywords-explorer-matching-terms, and keywords-explorer-volume-history.

The documentation and API reference data exposed from the Ahrefs docs include MCP-enabled Ahrefs areas such as Site Explorer overview metrics, backlinks, broken backlinks, referring domains, anchors, outgoing links, organic keywords, organic competitors, top pages, paid pages, best pages by backlinks/internal links, crawled pages, total search volume history, Keywords Explorer overview, volume history, and volume by country. Client guides also show refreshing tool lists and selecting individual Ahrefs MCP tools inside n8n and other MCP clients.

Prerequisites

The remote MCP server is available on paid Ahrefs plans starting from Lite. Users need an Ahrefs account and workspace, a supported MCP-compatible AI client, and either OAuth authorization or a manually generated Ahrefs MCP key. API calls consume monthly Ahrefs API units and are subject to the user's plan limits, row limits, and request limits.

Limitations and Terms

Ahrefs states that the external MCP server is intended for MCP-compatible AI clients such as ChatGPT, Claude, and similar assistants for interactive AI-driven workflows. Using the external MCP endpoint through custom scripts, bridges, or standalone HTTP/JSON-RPC clients is unsupported and not permitted; Ahrefs directs programmatic integrations to the public Ahrefs API instead. Claude Mobile cannot add custom MCP connectors directly; setup must be completed through Claude Web/Desktop first. ChatGPT setup is documented for beta/developer-mode connector access.