Ahrefs MCP server
- MCP server
- 4 capabilities
Overview
Ahrefs publishes a hosted MCP server that lets AI agents access the Ahrefs API for an Ahrefs account. It works with Ahrefs SEO and marketing data.
Capabilities:
- Access Ahrefs API data from AI agents
- Enrich AI assistant answers with Ahrefs data
- Connect an Ahrefs account to supported AI tools via OAuth
- Use an MCP API key generated in the Ahrefs account
Works with
The products your agent can work with through this server.
Installation
Follow the installation guide for supported clients, authentication and required permissions.
Add Ahrefs MCP server to Claude Code
Run this in your terminal:
If the server asks you to sign in, run /mcp in Claude Code and follow the browser prompt.
Add Ahrefs MCP server to Cursor
Add it with the Add to Cursor button below, or add it to .cursor/mcp.json in your project (~/.cursor/mcp.json for every project):
Add Ahrefs MCP server to VS Code
Add it to .vscode/mcp.json in your workspace. VS Code uses servers rather than mcpServers. Or run MCP: Add Server from the Command Palette and choose HTTP.
Add Ahrefs MCP server to Codex
Run this in your terminal:
Or add it to ~/.codex/config.toml:
If the server uses OAuth, sign in with codex mcp login ahrefs.
Add Ahrefs MCP server to Claude
Add it as a custom connector with this URL:
- Open Customize, then Connectors.
- Click + Add, then Add custom connector.
- Name it, paste the URL and click Continue.
- Choose how to sign in, then click Add.
On Team and Enterprise plans, an Owner adds it in Organization settings first, then members connect it.
Add Ahrefs MCP server to other clients
For any other client that connects to remote MCP servers over HTTP, use this URL:
Sources
Documentation and source code reviewed on 12 November 2026.