Ahrefs MCP Server

Official MCP server for Ahrefs SEO tools - analyze backlinks, keywords, competitors, and website performance with AI assistance

⚡ Quick Install with Claude Code MCP Guide

Connect Claude Code to any remote MCP server with one simple command. Choose between direct HTTP connections or a universal bridge - all configured automatically with our setup wizard.

Get the Claude Code MCP Setup Guide →

🔌 Test MCP Server Connection

Test your connection to the MCP wrapper server using your x-api-key. This validates that your MCP server credentials are configured correctly.

🚀 Test Full Ahrefs Connection

Test both your MCP server connection AND your Ahrefs API credentials. This ensures your complete setup is working correctly.

📡 API Endpoint & Required Headers

POST https://ahrefs.mcp.majewscy.tech

Required HTTP Headers:

Content-Type: application/json
x-api-key: Your MCP server API key
x-ahrefs-api-key: Your Ahrefs API v3 key (required - generate at docs.ahrefs.com/docs/api)

🛠️ Available Tools

analyze_url
Analyze a URL for SEO metrics and backlinks
backlinks
Get backlinks for a specific URL or domain
keywords_explorer
Research keywords and search volumes
content_explorer
Find popular content for any topic
site_audit
Audit website for technical SEO issues
competitor_analysis
Analyze competitor domains and strategies
rank_tracker
Track keyword rankings over time
domain_rating
Get domain rating and authority metrics

⚠️ Common Errors & Solutions

401 Unauthorized
Invalid API credentials
Solution: Check your x-api-key and x-ahrefs-api-key are correct
403 Forbidden
Insufficient API permissions
Solution: Ensure your Ahrefs API plan includes the required endpoints
429 Rate Limited
Too many requests
Solution: Reduce request frequency or upgrade your Ahrefs API plan
400 Bad Request
Missing required API key
Solution: Provide x-ahrefs-api-key header with your Ahrefs API v3 key

🏥 Service Health Check

Checking...
Response Time
-
Server Status
-
Protocol Version
2024-11-05
Last Checked
-

Configuration

// Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "ahrefs": {
      "command": "npx",
      "args": [
        "-y",
        "@ahrefs/mcp@latest"
      ],
      "env": {
        "API_KEY": "YOUR_AHREFS_API_KEY"
      }
    }
  }
}

Features

Enterprise-grade SEO analysis and monitoring for AI assistants

🔗

Backlink Analysis

Analyze backlink profiles with the world's largest link database.

🔍

Keyword Research

Discover keyword opportunities with search volume and difficulty metrics.

📊

Rank Tracking

Monitor keyword rankings across multiple search engines and locations.

🏆

Competitor Analysis

Analyze competitor strategies and find content gaps.

🔧

Site Audit

Identify and fix technical SEO issues on your website.

📈

Content Explorer

Find high-performing content ideas in any niche.

📋 Recent Updates from GitHub

Loading recent commits...
View all commits on GitHub →