Skip to main content

Getting started with Ahrefs MCP

Chat with Ahrefs API for actionable SEO & marketing data

Written by Constance Tan
Updated today

The Ahrefs MCP server allows you to connect Ahrefs’ API to your AI tool of choice (ChatGPT, Claude, Copilot, etc.)

No code required. Just chat in plain English to pull SEO insights, analyze competitors, create dashboards, and more — all within your AI chat interface.

What is MCP?

Model Context Protocol (MCP) is an open standard that enables AI models to connect with third-party APIs in a secure, consistent way.

📖 A further guide on What MCP is and how it works: What is an MCP server, and why should marketers care?

What can Ahrefs MCP help me do?

By connecting Ahrefs MCP to your AI tool of choice, you can:

  • Pull Ahrefs data directly into AI-generated answers

  • Automate exports without touching the API or having technical knowledge

  • Combine multiple data sources into one request (without writing a programming script)

  • Connect with other MCP-compatible apps

Which plans allow usage of Ahrefs MCP?

Ahrefs MCP is available to users on Lite and higher plans. Below is a table listing limits across the plans:

Plan / Limits

API Integration units

Max rows per request

Lite

25,000

10

Standard

150,000

25

Advanced

500,000

100

Enterprise

2,000,000

Unlimited

About monthly API unit limits and Max rows per request

Each time AI tools call Ahrefs API via the MCP, it consumes API units. One API call costs a minimum of 50 units, with the exact amount depending on the complexity of the request.

Learn more about how Ahrefs API units consumption is calculated

Max rows per request limits the number of results that can be returned in a single API call. This limit increases with higher calls.

API units are shared across Ahrefs MCP, Ahrefs Connect, and direct Ahrefs API v3 usage. To increase your monthly limit, upgrade your plan or purchase additional units on the Enterprise plan.

To view how much API units you've already consumed for the month, go to account settings.

Which AI tools can I connect to?

You can use Ahrefs MCP with any AI tool that supports the Model Context Protocol. Popular options include:

  • ChatGPT

  • Copilot

  • Lovable

  • n8n

  • Opencrawl

Note that each AI platform may have their own plan limits of what is required. View the documentation for more detailed setup guides of setting up MCP for specific platforms.

Example prompts you can try using Ahrefs MCP server

💡 Check out Glen Allsopp's Ahrefs MCP guide for a whole list of Ahrefs MCP use cases, plus best practices to get good results from your AI prompts.

Perform keyword research across multiple reports

My business sells [product type, e.g. coffee tables], and I’m looking to research more blog post ideas. Use Ahrefs to help me find keywords that people use for research before making a purchase.

AI may churn out a response like this:

Compare how AI answers branded queries and how they change over time

Use Ahrefs to find the top 10 most searched branded search queries for [brand], and its responses in AI Overviews. From these search queries and its AI Overview responses, analyze the overall sentiment of the brand, and highlight any differences between the answer made today, versus 6 months ago.

Note that this prompt requires the Brand Radar: AI Overviews & AI Mode Platform add-on purchased. AI may churn out a response like this:

Find top ranking pages for important keywords and analyze their backlink profiles

Use Ahrefs to find the top 3 ranking pages for keywords [keyword 1, 2, 3...]. Perform a comprehensive overview of their backlink profiles, and include the rate of which these top ranking pages pick up referring domains for the last 3 months.

AI may churn out a response like this:

Frequently asked questions (FAQ)

Does using the MCP server cost extra on top of my subscription?

There is no additional fee to use the MCP server itself, but it does consume the Integration API units included in your Ahrefs subscription plan.

Is my data secure?

Yes. The MCP server uses your private Ahrefs API key to fetch data. Your data is only shared with the AI client you have specifically configured on your local machine.

I'm seeing a 401 Authentication error

Here are some possible reasons for common issues with authenticating Ahrefs MCP:

  • Your API key is expired, and would need to generate a new key

  • Your subscription plan is no longer active, and needs renewal to continue using MCP

  • You may be accidentally using an API key with MCP scope instead of MCP by mistake; please note that API keys and MCP keys are not interchangeable.

If you are still facing issues, please contact our live chat support

Can I run Ahrefs MCP in a local setup?

Local MCP setup is no longer supported. We only support remote MCP server for now.

Did this answer your question?