Live SERP, keyword, backlink, and on-page SEO data for an AI agent.
Ahrefs
Backlinks, keyword research, and rank tracking from the official Ahrefs remote MCP.
Quick answer
What it does
Connects to the Ahrefs API via a hosted remote MCP endpoint and exposes backlink profiles, referring domains, keyword research with Ahrefs proprietary metrics, and rank-tracking data so an agent can enrich answers with Ahrefs SEO intelligence.
Best for
- Backlink and referring-domain analysis
- Keyword research with Ahrefs metrics
- Rank tracking queries
- Competitor SEO analysis
Not for
- Teams without a paid Ahrefs plan
- Pay-per-request budgets
Source: top-mcps.com/mcp/ahrefs — verified Sep 2026
Setup recipe
Pick your client, then follow the three steps.
- 1
Install
claude_desktop_config.jsonjson{ "mcpServers": { "ahrefs": { "command": "npx", "args": [ "-y", "mcp-remote", "https://api.ahrefs.com/mcp/mcp" ] } } }Claude Desktop launches stdio servers, so mcp-remote bridges to the hosted endpoint and opens the sign-in in your browser. On Pro, Max, Team and Enterprise you can skip the file: Settings → Connectors → Add custom connector → https://api.ahrefs.com/mcp/mcp. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
CLI or .mcp.jsonshellclaude mcp add --transport http ahrefs https://api.ahrefs.com/mcp/mcpThen run /mcp inside Claude Code to finish the sign-in. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
.cursor/mcp.jsonjson{ "mcpServers": { "ahrefs": { "url": "https://api.ahrefs.com/mcp/mcp" } } }Global path: ~/.cursor/mcp.json. Cursor shows "Needs login" once it connects — click it to authorize. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
.vscode/mcp.jsonjsonc{ "servers": { "ahrefs": { "type": "http", "url": "https://api.ahrefs.com/mcp/mcp" } } }VS Code uses the "servers" key. Run MCP: List Servers → Start Server and allow the sign-in. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
~/.codeium/windsurf/mcp_config.jsonjson{ "mcpServers": { "ahrefs": { "serverUrl": "https://api.ahrefs.com/mcp/mcp" } } }Windsurf uses "serverUrl" for hosted servers. Open via Cascade → hammer icon → Configure. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
cline_mcp_settings.jsonjson{ "mcpServers": { "ahrefs": { "command": "npx", "args": [ "-y", "mcp-remote", "https://api.ahrefs.com/mcp/mcp" ] } } }Bridged through mcp-remote. Open via the Cline sidebar → MCP Servers → Edit. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
~/.continue/config.jsonjson{ "experimental": { "modelContextProtocolServers": [ { "transport": { "type": "streamable-http", "url": "https://api.ahrefs.com/mcp/mcp" } } ] } }Continue takes the hosted URL directly in the transport block. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
CLIshellcodex mcp add ahrefs --url https://api.ahrefs.com/mcp/mcpCodex detects OAuth support and opens the browser to authorize. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
~/.config/zed/settings.jsonjsonc{ "context_servers": { "ahrefs": { "command": { "path": "npx", "args": [ "-y", "mcp-remote", "https://api.ahrefs.com/mcp/mcp" ] } } } }Bridged through mcp-remote under "context_servers". Settings live-reload on save. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").
ChatGPT → Settings → Connectors (remote URL)json{ "name": "Ahrefs", "transport": "http", "url": "https://api.ahrefs.com/mcp/mcp" }Paste this into Settings → Connectors → Add custom connector. Requires ChatGPT Pro / Team / Enterprise / Edu with Developer mode enabled.
- 2
Set required secrets
No credentials required — this MCP runs over stdio without authentication.
- 3
Try a minimum working prompt
Minimum working prompt pending verification. Try any prompt from the MCP’s README once installed.
Tools & permissions
| Tool | Description | Args | Side effects |
|---|---|---|---|
backlinks | Return backlinks and referring domains for a target from the Ahrefs index. | target: string | Network |
keywords_explorer | Keyword research with Ahrefs volume, difficulty, and intent metrics. | keywords: string[] | Network |
rank_tracker | Return rank-tracking positions for a tracked project. | — | Network |
site_explorer | Return Domain Rating, organic traffic, and top pages for a domain. | target: string | Network |
Security & scope
- Access scope
- Network
- Sandbox
- Hosted remote MCP reached over Streamable HTTP at api.ahrefs.com/mcp/mcp. Authentication is an Ahrefs API key with an MCP scope; each connection gets its own key for per-integration tracking. No local process runs and no local filesystem access is involved — the trust boundary is the API key and your Ahrefs plan unit allowance.
- Gotchas
- The local @ahrefs/mcp npm package is archived and unmaintained — do not use it; it only supports legacy v3 keys.
- Calls consume your monthly Ahrefs API unit allowance; an agent that loops can exhaust units before month end.
- Treat the MCP-scoped API key like any credential — revoke the per-connection key if a client is decommissioned.
Agent prompt pack
— copy into Claude, Cursor, or ChatGPT.Recommend the best MCP servers for [task: e.g. marketing & seo work] in [client: Claude]. Constraints: - Prefer tools that are [official | open-source | read-only] — pick what matters for my use case. - Exclude MCPs that require [e.g. a paid plan, OAuth-only flows, remote-only transport]. - Return at most 3 picks, ranked. For each pick include: 1. One-sentence rationale. 2. The ready-to-paste install snippet for my client. 3. Any required secrets I need to create before installing. Cross-check the top-mcps.com listing: https://top-mcps.com/top-mcps-for-marketing-seo
Compare Ahrefs MCP vs [DataForSEO MCP] for the following job: [describe the job, e.g. "let an agent create GitHub issues on bug triage"]. Judge them on: - Setup time and complexity (what a new user hits first). - Auth model (none / API key / OAuth 2.1) and credential risk. - Transport (stdio / Streamable HTTP / SSE) and where the server runs. - Required secrets and the blast radius if they leak. - Operational risk in an unattended agent loop. - Which one is "good enough" for a weekend prototype vs. production. End with one sentence: which should I pick for my scenario, which is: [my scenario]. References: - https://top-mcps.com/mcp/ahrefs - top-mcps.com listing for DataForSEO
Install the Ahrefs MCP server for my [client: Claude] at the default config path for that client. Use the exact install snippet published at https://top-mcps.com/mcp/ahrefs (fetch https://top-mcps.com/mcp/ahrefs.json for the canonical server.json if you can read URLs). Before finishing: 1. Create the required secrets (no secrets) and put them in the appropriate env block — do not hard-code them. 2. Restart or reload the client so it picks up the new server. 3. Verify the server is connected (green / running state) and at least one tool is listed. 4. If anything fails, read the client's MCP logs and report the exact error — do not silently retry. Confirm when done and list the tools the server now exposes.
Frequently asked questions
What changed
— 2 updates tracked.Refreshed install snippets and fact sheet; verified for 2026.
Initial directory listing.
More Marketing & SEO MCPs
Other tools in the same category worth evaluating.
Query GA4 reports, funnels, and realtime data from an AI agent.
Query Search Console clicks, impressions, and queries from an AI agent.
Compared with Ahrefs
Side-by-side breakdowns for the choices people most often weigh against this MCP.
Exploring Top MCPs for Marketing & SEO? See all Marketing & SEO MCPs →