ahrefs-mcp
Click on "Install 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-mcpGet 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: DataForSEO 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/newilu/ahrefs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server