ahrefs-mcp-server

MCP.Pizza Chef: ahrefs

Ahrefs holds the search and link data many people use to work out why a site ranks the way it does. This is the official connection to it, so an assistant can fetch that data while you are working — who links to a page, which keywords a site ranks for, how traffic has moved. It works in Claude Desktop and Cursor, installs by pasting a config entry, and needs your Ahrefs key.

Archived · The author made this repository read-only on GitHub.
Data
Web/Research

Use This MCP server To

Check who links to a page Find which keywords a site ranks for See how a site's traffic has moved Compare two sites on search visibility Look up a page's backlink profile Pull data for a report without the dashboard

README

Ahrefs MCP

A Model Context Protocol server to connect Claude desktop and other compatible AI assistants to Ahrefs.

Installation

npm commands need to be executed in a terminal:

  • macOS: open the Terminal from your Applications folder
  • Windows: press Windows + R, type cmd, and press Enter

Install Node.js and npm

  1. Download Node.js from nodejs.org
  2. Follow the installation instructions for your operating system
  3. Verify installation by running:
npm -v
  1. A version number will be printed if installation was successful

Install Ahrefs MCP Server

npm install --prefix=~/.global-node-modules @ahrefs/mcp -g

Upgrading versions

If you've installed our MCP server before, and just want to upgrade, run this command:

npm install --prefix=~/.global-node-modules @ahrefs/mcp@latest -g

Configuration

You can now add the Ahrefs MCP to your favourite AI assistant app by adding the ahrefs part to your app's configuration file:

ahrefs-mcp-server FAQ

Can I use this to check who links to my site?
Yes — backlink data can be pulled directly into the conversation.
Do I need an Ahrefs account?
Yes, along with a key; the data comes from your own subscription.
Is this the official connection?
Yes, it is published by Ahrefs rather than being a third-party wrapper.
Which apps does it work with?
It is documented for Claude Desktop and Cursor.
How hard is it to set up?
You install it with a single command and paste a config entry with your key.