Ahrefs MCP for keyword research
Add your Ahrefs API key and your agent can check keywords, competitors and backlinks next to your own clicks and impressions.
Get started freeRun it in a terminal, then sign in with Google.
Or run it on your machine
Installs the CLI, signs you in and adds the skill to your agents. Site crawls and Bing data run this way, on your own machine. A crawl fetches many pages, and Bing blocks our hosted server.
Questions you can ask it
Ask the way you would ask a colleague. Your agent picks the tool and reads your Ahrefs data before it answers.
What keywords does example.org rank for that I don't?
Ranked keywords for the competitor, which your agent can set against your own Search Console queries.
Which sites compete with mine?
Competitors: domains that rank for the same keywords, each with its Domain Rating.
Who links to this competitor?
Backlinks: the referring domains for a domain or URL.
How hard is this keyword?
Keyword metrics with volume, keyword difficulty and cost per click.
Tools your agent gets
The SEO Skill tools that read Ahrefs. Your agent calls them for you.
Keyword metrics, ranked keywords, SERPs, competitors and backlinks.
seo_research
What you need
An Ahrefs API key from a plan that includes API access. Ahrefs counts each request against your units.
Add your Ahrefs key
Sign in with Google first, then save your API key under Keys on your account page. Clients that send headers can pass it with each request instead.
Read it with its limits
Ahrefs numbers are estimates from its own index. They stay separate from your first-party data.
Ahrefs in your AI client
Setup steps for Ahrefs in each client.
Claude Code
One command in your terminal.
Ahrefs in Claude CodeClaude
A custom connector, added once for web, desktop and mobile.
Ahrefs in ClaudeChatGPT
A custom MCP server added from Plugins.
Ahrefs in ChatGPTCodex
Two commands in your terminal.
Ahrefs in CodexCursor
One entry in mcp.json.
Ahrefs in CursorVS Code
The Add Server command, or one entry in .mcp.json.
Ahrefs in VS CodeGemini CLI
One command in your terminal.
Ahrefs in Gemini CLIWindsurf
Two commands, or one entry in mcp_config.json.
Ahrefs in WindsurfLe Chat
A custom MCP connector.
Ahrefs in Le Chat