Connect your AI Agents to Ahrefs in minutes

Merge lets you securely connect your agents to Ahrefs and thousands of tools instantly

Available tools

list_backlinks

List backlinks pointing to a target. Returns source URL, anchor text, domain rating, and more. Paginated with offset. Use select to choose fields.

list_refdomains

List referring domains linking to a target. Shows domain rating, backlink count, and first/last seen dates. Paginated with offset.

list_anchors

List anchor text distribution for backlinks to a target. Shows anchor text, backlink count, and referring domains. Paginated with offset.

list_broken_backlinks

List broken backlinks pointing to a target (links returning 4xx/5xx). Shows source URL, anchor, and HTTP status. Paginated with offset.

batch_analyze

Analyze up to 100 domains/URLs in a single request. Returns domain rating, backlinks, traffic, and more for each target. Use select to choose metrics.

get_domain_rating_history

Get Domain Rating trend over time for a target. Returns date and DR value pairs. Requires target and date_from. Optionally set grouping to daily/weekly/monthly.

get_refdomains_history

Get referring domains count trend over time for a target. Returns date and count pairs. Requires target and date_from. Optionally set grouping.

list_organic_keywords

List organic keywords a target ranks for. Shows position, volume, traffic, difficulty, and URL. Requires target and date. Paginated with offset.

list_top_pages

List top pages by organic traffic for a target. Shows URL, traffic, keyword count, and top keyword. Requires target and date. Paginated with offset.

list_organic_competitors

List organic search competitors for a target. Shows competitor domain, common keywords, traffic, and domain rating. Requires target, date, and country.

get_keyword_overview

Get keyword metrics: search volume, difficulty, CPC, clicks, and traffic potential. Pass comma-separated keywords and a country code. Consumes API units.

list_matching_terms

Find keyword variations matching seed keywords. Shows volume, difficulty, CPC, and traffic potential. Requires keywords and country. Paginated with offset.

list_related_terms

Find related keywords that top-ranking pages also rank for. Shows volume, difficulty, and traffic potential. Requires keywords and country. Paginated.

list_search_suggestions

Get Google search autocomplete suggestions for seed keywords. Shows volume, difficulty, and CPC. Requires keywords and country. Paginated with offset.

get_volume_history

Get monthly search volume history for a keyword over time. Requires keyword and country code. Optionally specify date_from and date_to.

list_projects

List Ahrefs projects. Free endpoint (0 API units). Optionally filter by owner email or access type.

create_project

Create a new Ahrefs project for a domain. Free endpoint (0 API units). Requires target URL.

list_project_keywords

List tracked keywords for an Ahrefs project. Free endpoint (0 API units). Use list_projects to find project IDs.

add_project_keywords

Add keywords to track in an Ahrefs project. Free endpoint (0 API units). Use list_projects to find project IDs.

remove_project_keywords

Remove keywords from an Ahrefs project. Free endpoint (0 API units). Use list_project_keywords to see current keywords.

list_project_competitors

List competitors for an Ahrefs project. Free endpoint (0 API units). Use list_projects to find project IDs.

add_project_competitors

Add competitors to an Ahrefs project. Free endpoint (0 API units). Each competitor needs url, mode, and protocol.

remove_project_competitors

Remove competitors from an Ahrefs project. Free endpoint (0 API units). Use list_project_competitors to see current competitors.

list_keyword_list_keywords

List keywords in a keyword list. Free endpoint (0 API units). Requires keyword_list_id.

add_keyword_list_keywords

Add keywords to a keyword list. Free endpoint (0 API units). Requires keyword_list_id and keywords array.

remove_keyword_list_keywords

Remove keywords from a keyword list. Free endpoint (0 API units). Use list_keyword_list_keywords to see current keywords.

get_domain_rating

Get Domain Rating (DR) for a domain, showing backlink profile strength on a 0-100 scale. Requires target domain and date.

get_backlinks_stats

Get backlink statistics for a target: live backlinks, all-time backlinks, live referring domains, all-time referring domains.

get_metrics

Get organic and paid search metrics for a target: keyword counts, traffic estimates, traffic value. Use country param for country-specific data.

get_pages_by_traffic

Get traffic distribution by page range for a target. Shows how many pages fall into each traffic bucket (0, 100, 1K, 5K, 10K+).

get_limits_and_usage

Check current API usage and subscription limits. Free endpoint (0 API units). Shows units consumed, remaining quota, and key expiration.

validate_credential

Validate Ahrefs API credentials by checking subscription info. Returns success status and message.

View all tools by creating a free accountSee more tools

How to set up Merge Agent Handler

In an mcp.json file, add the configuration below, and restart Cursor.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5      "headers": {
6        "Authorization": "Bearer yMt*****"
7      }
8    }
9  }
10}
11
Copy Code

Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.

Make sure Claude is using the Node v20+.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "command": "npx",
5      "args": [
6        "-y",
7        "mcp-remote@latest",
8        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9        "--header",
10        "Authorization: Bearer ${AUTH_TOKEN}"
11      ],
12      "env": {
13        "AUTH_TOKEN": "yMt*****"
14      }
15    }
16  }
17}
Copy Code
Copied!

Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.

Learn more in the official documentation ↗

1{
2    "mcpServers": {
3      "agent-handler": {
4        "command": "npx",
5        "args": [
6          "-y",
7          "mcp-remote@latest",
8          "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9          "--header",
10          "Authorization: Bearer ${AUTH_TOKEN}"
11        ],
12        "env": {
13          "AUTH_TOKEN": "<ah-production-access-key>"
14        }
15      }
16    }
17  }
Copy Code

In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".

You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.

Learn more in the official documentation ↗

1{
2  "inputs": [
3    {
4      "type": "promptString",
5      "id": "agent-handler-auth",
6      "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7      "password": true
8    }
9  ],
10  "servers": {
11    "agent-handler": {
12      "type": "stdio",
13      "command": "npx",
14      "args": [
15        "-y",
16        "mcp-remote@latest",
17        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18        "--header",
19        "Authorization: Bearer ${input:agent-handler-auth}"
20      ]
21    }
22  }
23}
Copy Code

FAQs on using Merge's Ahrefs  MCP server

FAQs on using Merge's Ahrefs  MCP server

Explore other MCP servers built and managed by Merge

github
GitHub
gitlab
GitLab
gmail
Gmail
gong
Gong
google_bigquery
Google BigQuery
google_calendar
Google Calendar
google_docs
Google Docs
google_drive
Google Drive
google_maps
Google Maps
google_meet
Google Meet
google_sheets
Google Sheets
google_slides
Google Slides
grafana
Grafana
greenhouse
Greenhouse
guru
Guru
hex
Hex
hibob
HiBob
hubspot
HubSpot
intercom
Intercom
jira
Jira
jira_service_management
Jira Service Management
kintone
Kintone
klaviyo
Klaviyo
linear
Linear

Ready to try it out?

Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now