Ahrefs MCP, Ahrefs' own server for SEO data
@ahrefs/mcpLets your AI assistant pull Ahrefs SEO data: backlinks, keywords, rankings and competitor traffic.
This is Ahrefs' npm package for bringing Ahrefs data into Claude, Cursor and other assistants. It can look up a site's backlinks, organic keywords, traffic history and competitors, research keywords, and read your Rank Tracker and Site Audit projects. It runs on your machine and uses your Ahrefs API key. Every tool fetches data, so it does not change your Ahrefs projects.
Good for
- SEO specialists who want backlink and keyword answers without opening Ahrefs
- Content marketers researching keywords and checking who ranks
- Agencies comparing a client with competitors in one prompt
- Link builders hunting broken and lost backlinks
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install @ahrefs/ MCP
Claude Code
- 1
Copy this prompt.
Add the @ahrefs/ MCP server to Claude Code. Run this command: claude mcp add ahrefs -e API_KEY=<API_KEY> -- npx -y @ahrefs/mcp Ask me for API_KEY and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
Built from the package data we hold. Not yet tested by us.
Tools
Gets a site's Domain Rating
Returns the Domain Rating and related metrics for a domain or URL on a given date.
Try: “What is the Domain Rating of example.com today?”
Network ·
site-explorer-domain-ratingShows how a site's Domain Rating changed
Returns Domain Rating over a date range, grouped by day, week or month.
Try: “Chart example.com's Domain Rating over the last year.”
Network ·
site-explorer-domain-rating-historyShows how a page's URL Rating changed
Returns URL Rating history for a URL over a date range.
Try: “How has the URL Rating of our pricing page changed this year?”
Network ·
site-explorer-url-rating-historyGets organic and paid search metrics for a site
Returns SEO performance metrics for a domain, URL or site section on a given date.
Try: “Give me the organic traffic and keyword count for example.com.”
Network ·
site-explorer-metricsShows organic and paid traffic over time
Returns organic and paid traffic and cost history for a domain, URL or path.
Try: “Show example.com's organic traffic by month for the last two years.”
Network ·
site-explorer-metrics-historyBreaks a site's search traffic down by country
Returns organic and paid search metrics by country for one date.
Try: “Which countries bring example.com the most organic traffic?”
Network ·
site-explorer-metrics-by-countryShows how many keywords a site ranks for over time
Returns the count of organic keywords by position range over a date range.
Try: “How many top-3 keywords did example.com have each month last year?”
Network ·
site-explorer-keywords-historyShows total search volume and traffic value over time
Returns historical total organic search volume, traffic and traffic value for a site.
Try: “Show the traffic value of example.com over the past 12 months.”
Network ·
site-explorer-total-search-volume-historyShows how many pages a site has over time
Returns historical page counts for a domain, URL or section.
Try: “How many pages did example.com have indexed each quarter?”
Network ·
site-explorer-pages-historyLists the keywords a site ranks for
Returns organic keywords for a domain, URL or path with rankings, intent, SERP features, traffic and CPC.
Try: “List the top 50 keywords example.com ranks for in the US.”
Network ·
site-explorer-organic-keywordsFinds a site's search competitors
Returns organic competitors with shared keywords, traffic estimates and domain strength.
Try: “Who are example.com's biggest organic competitors?”
Network ·
site-explorer-organic-competitorsLists a site's top pages by search performance
Returns top pages with rankings, traffic, top keyword and changes over time.
Try: “What are example.com's ten best pages by organic traffic?”
Network ·
site-explorer-top-pagesRanks pages by estimated organic traffic
Returns pages of a domain, path or URL ranked by estimated organic traffic for a country.
Try: “Rank the blog pages on example.com by estimated traffic.”
Network ·
site-explorer-pages-by-trafficLists pages that rank in paid search
Returns pages ranking in paid search with traffic, keyword and ad data.
Try: “Which example.com pages run paid search ads?”
Network ·
site-explorer-paid-pagesSummarizes a site's backlinks
Returns backlink counts for a URL or domain on a given date.
Try: “How many backlinks and referring domains does example.com have?”
Network ·
site-explorer-backlinks-statsLists the backlinks pointing to a site
Returns detailed backlinks to a URL or domain, with filtering, sorting and field selection.
Try: “List the newest dofollow backlinks to example.com/pricing.”
Network ·
site-explorer-all-backlinksFinds backlinks that point to broken pages
Returns backlinks that point to pages that no longer work.
Try: “Find broken backlinks to example.com that I can reclaim.”
Network ·
site-explorer-broken-backlinksLists the domains that link to a site
Returns referring domains with backlink metrics, filters and sorting.
Try: “List the top referring domains to example.com by Domain Rating.”
Network ·
site-explorer-refdomainsShows referring domains over time
Returns referring domain counts over a date range for a domain or URL.
Try: “Plot referring domains for example.com over two years.”
Network ·
site-explorer-refdomains-historyLists the anchor texts used in links to a site
Returns anchor text and backlink metrics for a domain or URL.
Try: “What anchor texts link to example.com most often?”
Network ·
site-explorer-anchorsSummarizes a site's outgoing links
Returns statistics about outbound links from a URL, domain or site section.
Try: “How many external links does our blog link out to?”
Network ·
site-explorer-outlinks-statsLists the domains a site links out to
Returns external domains linked from a target, with filtering and field selection.
Try: “Which domains does example.com link to most?”
Network ·
site-explorer-linkeddomainsLists anchor texts used on a site's outgoing links
Returns external anchor text used on a domain, subdomain or URL, with dofollow counts.
Try: “What anchor texts do we use for outgoing links?”
Network ·
site-explorer-linked-anchors-externalLists anchor texts used in a site's internal links
Returns internal anchor text data showing how pages link to each other.
Try: “What anchor texts do we use for internal links to the pricing page?”
Network ·
site-explorer-linked-anchors-internalFinds a site's pages with the most external links
Returns top pages ranked by referring external links.
Try: “Which pages on example.com earn the most backlinks?”
Network ·
site-explorer-best-by-external-linksFinds a site's pages with the most internal links
Returns internal link metrics showing which pages receive the most internal links.
Try: “Which pages on example.com get the most internal links?”
Network ·
site-explorer-best-by-internal-linksGets volume, difficulty and CPC for keywords
Returns search volume, CPC, difficulty, traffic potential and intent for keywords in a country.
Try: “Give me volume and difficulty for these 20 keywords in the UK.”
Network ·
keywords-explorer-overviewShows a keyword's search volume over time
Returns historical search volume for a keyword in a country and date range.
Try: “How has search volume for "standing desk" changed in five years?”
Network ·
keywords-explorer-volume-historyCompares a keyword's volume across countries
Returns search volume for one keyword broken down by country.
Try: “Which countries search for "standing desk" the most?”
Network ·
keywords-explorer-volume-by-countrySuggests keyword ideas that contain your terms
Returns keyword ideas and metrics by matching input terms, with filtering and sorting.
Try: “Give me keyword ideas containing "standing desk" with volume above 500.”
Network ·
keywords-explorer-matching-termsSuggests related keywords
Returns related terms such as keywords that pages also rank for or also talk about.
Try: “What related terms go with "standing desk"?”
Network ·
keywords-explorer-related-termsSuggests search queries people type
Returns search suggestions with volume, difficulty and CPC for your queries.
Try: “Show search suggestions for "standing desk" with metrics.”
Network ·
keywords-explorer-search-suggestionsShows who ranks on a results page
Returns the top search results for a keyword and country with position, backlinks and traffic.
Try: “Show me the top 10 results for "standing desk" in the US and how strong they are.”
Network ·
serp-overview-serp-overviewCompares many sites or pages in one go
Returns chosen SEO, backlink, organic and paid metrics for a list of URLs, domains or subdomains.
Try: “Compare Domain Rating and organic traffic for these 25 competitors.”
Network ·
batch-analysis-batch-analysisShows how your tracked keywords rank
Returns an overview of tracked keyword rankings for a Rank Tracker project and date, with optional comparison to an earlier date.
Try: “How did my tracked keywords move since last month?”
Network ·
rank-tracker-overviewShows how competitors rank on your tracked keywords
Returns competitor rankings and keyword metrics for a Rank Tracker project and date.
Try: “Which competitor gained the most rankings in my project?”
Network ·
rank-tracker-competitors-overviewLists your Ahrefs projects
Returns your projects with ownership, access type, whether Rank Tracker keywords exist, and the project ID.
Try: “List my Ahrefs projects.”
Network ·
management-projectsLists the keywords tracked in a project
Returns the Rank Tracker keywords of one project.
Try: “List the keywords tracked in my main project.”
Network ·
management-project-keywordsLists the competitors set on a project
Returns the competitors of one Rank Tracker project.
Try: “Who are the competitors in my main project?”
Network ·
management-project-competitorsLists locations you can track from
Returns locations filtered by country code and optionally US state.
Try: “Which locations can I track for Germany?”
Network ·
management-locationsLists your Site Audit projects
Returns the Site Audit projects available to your account.
Try: “List my Site Audit projects.”
Network ·
site-audit-projectsUsed by the assistant behind the scenes
Shows the exact inputs another Ahrefs tool needs
Returns the input schema for one of the other tools. The tool descriptions tell the assistant to call it first.
Try: “What inputs does the backlinks tool need?”
Read ·
doc
Read from the source code
Permissions
low risk · 2 things to watch
Low risk
The assistant can read the Ahrefs data your API key can reach, and nothing more.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
Use a dedicated API key
Create a separate key for the assistant and check its permissions in Ahrefs. The README says the key must allow what the tools need. npmjs.com
Your questions and data go through your AI provider
Results from Ahrefs are passed to the assistant you use, so they leave Ahrefs. Check your own policy before sharing client data. npmjs.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Turning on read-only | Not needed: every tool fetches data and none changes anything in Ahrefs. |
|---|---|
| Talks to | Ahrefs API (api.ahrefs.com) |
| Scopes |
|
Questions
Do I need an Ahrefs API key?
Yes. The server reads it from an API_KEY setting. Ahrefs documents how to create and manage API keys in its API reference.
Can it change my Ahrefs projects?
No. All of its tools fetch data, including the project and keyword lists. It does not create, edit or delete anything.
What can it look up?
Site Explorer data such as backlinks, referring domains, organic keywords and traffic history, plus Keywords Explorer, SERP overviews, Rank Tracker and Site Audit project lists. The tool list above has the full set.
Why does the README install it differently?
The README installs the package into a folder in your home directory first, to avoid permission errors with global npm installs. The install box runs it with npx instead. Use the README method if you hit permission errors.
Does it work in Claude Desktop?
Yes. The README gives Claude Desktop setup steps and mentions Cursor too. After you change the config file, restart Claude Desktop fully.
How do I add it to Cursor?
Use the Cursor tab in the install box above and replace the key placeholder with your own.
Information
updated Nov 2, 2026
- Publisher
- Ahrefs (official)
- Package
@ahrefs/mcp- Registry
- npm
- Transport
- stdio
- Auth
- API key
- Version
- 0.0.11
- License
- MIT
Other Ahrefs MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 1Hide
- @ahrefs/mcp on npm · npmjs.com