ahrefs-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ahrefs-mcp Get top organic keywords for example.com and check SERP overview for the most difficult ones"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ahrefs-mcp
Unofficial community server, not affiliated with Ahrefs.
MCP server for the Ahrefs API v3. Gives Claude and any other MCP client live SEO data: keyword research, SERP analysis, backlink profiles, domain authority.
Built to be frugal with API units: narrow select lists per endpoint, in-memory response caching with per-endpoint TTLs (a cache hit costs 0 units), retries with backoff on 429/5xx. Monetary fields arrive from Ahrefs in USD cents and are normalized to dollars.
Tools
16 tools across four groups.
Group | Tool | What it returns |
Keywords |
| Keyword ideas with volume, KD, CPC, traffic potential, intents |
Keywords |
| Autocomplete-style queries people actually type |
Keywords |
| Terms top-ranking pages also rank for |
Keywords |
| Monthly volume trend and seasonality |
Keywords |
| Demand split by country |
SERP |
| Top results with DR, UR, traffic, page type, AI overview presence |
Site |
| DR and Ahrefs Rank |
Site |
| Organic traffic, keywords, top-3 count, traffic value |
Site |
| Monthly organic traffic trajectory |
Site |
| Traffic split by country |
Site |
| Live and all-time backlinks and referring domains |
Site |
| Who links to a site, by authority |
Site |
| Keywords a domain ranks for, with positions |
Site |
| Competing domains with keyword overlap |
Site |
| Pages pulling the most traffic |
Account |
| API units used vs plan limit, never cached |
Related MCP server: Haloscan MCP Server
Setup
Requires Node 18+ and an Ahrefs API key with API v3 access (get one here).
git clone https://github.com/newilu/ahrefs-mcp.git
cd ahrefs-mcp
npm install
npm run buildClaude Code
claude mcp add ahrefs -e AHREFS_API_KEY=your_key -- node /absolute/path/to/ahrefs-mcp/dist/index.jsClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ahrefs": {
"command": "node",
"args": ["/absolute/path/to/ahrefs-mcp/dist/index.js"],
"env": { "AHREFS_API_KEY": "your_key" }
}
}
}Example
Pull the top 20 organic keywords for competitor.com in the US, then check SERP overview for the three with the lowest difficulty. Which ones have no site above DR 40 in the top 10?
The agent chains organic-keywords and serp-overview and answers with live data.
Cost notes
Ahrefs bills per row and per selected field, so limit matters. Defaults here are deliberately small. Check subscription-usage before large batches. Cached responses (SERP 6h, keyword metrics 7d, site metrics 3d) are free.
License
MIT
Available Tools
16 toolsbacklinks-statsBacklinks statsB
Backlink footprint of a domain: live and all-time backlinks and referring domains.
Inputs: target (required).
domain-ratingDomain ratingC
Domain Rating (0 to 100) and Ahrefs Rank for a domain.
Inputs: target (required).
keyword-metricsKeyword metricsB
Keyword ideas matching a seed term, with volume, difficulty, CPC, traffic potential, parent topic, and search intents. Ahrefs Keywords Explorer matching-terms.
Inputs: keyword (required), limit, country, min_volume.
keyword-suggestionsKeyword suggestionsA
Real autocomplete-style search suggestions for a seed keyword, with volume, CPC, and intents. What people actually start typing into Google around the term.
Inputs: keyword (required), limit, country.
keyword-volume-by-countryKeyword volume by countryA
Search volume of a keyword split by country. Shows where the demand actually lives geographically.
Inputs: keyword (required).
keyword-volume-historyKeyword volume historyB
Monthly search volume history for a keyword. Shows trend and seasonality.
Inputs: keyword (required), country.
organic-competitorsOrganic competitorsB
Domains competing with a target in organic search, with shared keywords and traffic.
Inputs: target (required), limit, country.
organic-keywordsOrganic keywordsB
Keywords a domain ranks for, with volume, difficulty, CPC, best position, and traffic. The clonable demand behind a competitor.
Inputs: target (required), limit, country.
referring-domainsReferring domainsA
Domains linking to a target, ordered by domain rating. Shows who links to a site and how authoritative they are.
Inputs: target (required), limit.
serp-overviewSERP overviewB
Top search results for a keyword with domain rating, URL rating, traffic, page type, and result type (organic, featured snippet, AI overview, etc).
Inputs: keyword (required), country, top_positions.
site-metricsSite metricsA
Organic profile of a domain: organic traffic, ranking keywords, top-3 keywords, traffic value, and paid traffic. Optionally scoped to one country.
Inputs: target (required), country.
site-metrics-by-countrySite metrics by countryC
Organic traffic of a domain split by country. Shows the site's real geography.
Inputs: target (required), limit.
site-metrics-historySite metrics historyA
Monthly organic traffic history for a domain. Shows whether a site is growing, flat, or declining.
Inputs: target (required), months.
subscription-usageSubscription usageA
Current API units usage against the plan limit. Never cached. Check before running expensive batches.
Inputs: no named parameters.
top-pagesTop pagesB
Pages that pull the most organic traffic on a domain, with top keyword and traffic value. What to study or beat first.
Inputs: target (required), limit, country.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools target distinct resources (keyword data, domain data, backlinks, SERP). Some overlap exists among keyword-related tools like keyword-metrics, keyword-suggestions, and related-keywords, but their descriptions clarify the differences. Overall, an agent can usually pick the right tool without confusion.
All tool names follow a consistent lowercase-hyphenated noun-phrase pattern (e.g., keyword-volume-history, site-metrics-by-country). No mixed conventions or verb-style changes. Names are predictable and align well with their purposes, despite 'keyword-metrics' being slightly misleading about its actual function.
16 tools is slightly above the typical 3-15 range but reasonable for a comprehensive SEO toolkit covering keyword research, domain metrics, backlinks, and SERP data. It is well-scoped for the server's purpose and does not feel bloated or redundant.
The tool set covers the core Ahrefs workflows: keyword research (volume, metrics, suggestions, related), domain organic search profiles (competitors, top pages, site metrics), backlink analysis (stats, referring domains), and SERP overviews. Minor gaps exist (e.g., no rank-tracker history or site audit data) but they are beyond the apparent scope and agents can work around them using available tools.
Maintenance
Related MCP Connectors
Official Ahrefs MCP server. Access SEO data, including backlinks, keywords, and competitor research.
SEO MCP server for keyword research, live SERPs, backlinks, site audits and AI visibility.
SEO MCP server for keyword research, SERP analysis, audits, and Search Console workflows.
Remote MCP server that gives Claude, ChatGPT, Cursor or any MCP client Google search volume, CPC, competition and similar keywords for 50+ countries. Works with no signup at 20 lookups a day; sign in with OAuth or an API key for higher limits, or $4.99 a month for unlimited.
Related MCP Servers
AlicenseBqualityCmaintenanceA Model Context Protocol server that enables Claude to interact with DataForSEO APIs, allowing access to SEO data including SERPs, keyword research, on-page metrics, and domain analytics.1712,753 npm262Apache 2.0- -licenseCqualityNot gradedmaintenanceA Model Context Protocol server that exposes Haloscan SEO API functionality, allowing users to access keyword insights, domain analysis, and competitor research through Claude for Desktop and other MCP-compatible clients.32109 npm-

Ahrefs MCP Serverofficial
AlicenseCqualityFmaintenanceA Model Context Protocol server that connects Claude desktop and other compatible AI assistants to Ahrefs, allowing them to access Ahrefs functionality.42100MIT- AlicenseCqualityDmaintenanceAn MCP server that integrates with the Haloscan SEO API to provide tools for keyword research, SERP analysis, and domain performance tracking. It enables users to perform comprehensive SEO tasks, including competitor analysis and visibility monitoring, within MCP-compatible clients.331MIT