> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Ahrefs in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/ahrefs
Last updated: 2026-11-24

Share Ahrefs with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or API key sign-in, 19 tools (18 read-only).

---

To give your team Ahrefs in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Ahrefs integration in a Metorial portal, and each person signs in to Ahrefs with their own account. Agents can access Ahrefs SEO data including backlink analysis, keyword research, organic traffic estimates, and SERP analysis. The integration has 19 tools, 18 read-only and 1 write, plus 1 trigger.

**What you will learn**

- How an admin shares Ahrefs in a portal and how each person connects
- The 1 OAuth scope Ahrefs can request, and what each one allows
- How to keep the 18 read-only tools and reject the other 1

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Ahrefs for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **API Key** | API token | `token` |
| **Ahrefs Connect (OAuth)** (default) | OAuth | Signs in to Ahrefs |

The portal and `metorial setup` use **Ahrefs Connect (OAuth)** unless someone picks another method.

### API Key

To connect, a person enters:

- `token`: Ahrefs API key (Bearer token). Create one in Account Settings > API keys.

### Ahrefs Connect (OAuth)

People sign in to Ahrefs and approve the scopes you allow. The integration can request:

| Scope | Name | What it allows |
| --- | --- | --- |
| `apiv3-integration-apps` | API v3 Integration | Full access to Ahrefs API v3 endpoints on behalf of the authorized user |

## Use your own Ahrefs OAuth app

With your own OAuth app, people see your company's name on the Ahrefs consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Ahrefs and copy the **Redirect URI**.

2. **Register the app with Ahrefs**

   Create an OAuth app or client in Ahrefs and add the redirect URI from Metorial as its redirect or callback URL.

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the Ahrefs integration.

## Admin: share Ahrefs in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Ahrefs. Under **Auth Method**, keep **Ahrefs Connect (OAuth)** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Ahrefs as themselves.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Ahrefs.

4. **Choose who gets it**

   Add the access groups that should see Ahrefs. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Ahrefs integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search ahrefs
```

## Employee: connect Ahrefs

### In the portal

1. **Open Ahrefs in the catalog**

   Sign in to your portal and open Ahrefs. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. An Ahrefs sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search ahrefs
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Ahrefs Connect (OAuth)**. To connect with **API Key** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Ahrefs connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list ahrefs
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 18 read-only tools, such as `get_anchors` and `batch_analyze`, and lose the write tool `manage_rank_tracker`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list ahrefs
metorial tools <integration-id>
metorial call <integration-id> get_site_audit -d '{"reportType":"projects"}'
```

`metorial tools` lists the 19 tools, minus any you rejected. `get_site_audit` needs `reportType`, so replace the placeholders. It retrieves Site Audit data including project list, health scores, detected issues, and crawled page details.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (18)

- `get_organic_keywords`: Retrieve organic keywords that a target domain or URL ranks for in Google search results. Needs `target`.
- `get_brand_radar`: Monitor how a brand appears in AI-generated responses across different AI platforms. Needs `target`.
- `get_organic_competitors`: Retrieve organic search competitors for a target domain. Needs `target`.
- `research_keywords`: Retrieve keyword metrics from Keywords Explorer for one or more keywords.
- `get_referring_domains`: Retrieve the list of referring domains that contain backlinks to a target domain or URL. Needs `target`.
- `get_keyword_ideas`: Discover keyword ideas based on a seed keyword. Needs `keyword`.
- `get_metrics_by_country`: Retrieve country-specific organic search metrics for a target domain or URL. Needs `target`.
- `get_serp_overview`: Retrieve the current search engine results page (SERP) data for a given keyword. Needs `keyword`.
- `get_linked_domains`: Retrieve domains that a target website links out to. Needs `target`.
- `get_top_pages`: Retrieve top pages for a domain ranked by organic traffic. Needs `target`.
- `get_domain_history`: Retrieve historical SEO metrics for a domain or URL over time. Needs `target` and `historyType`.
- `batch_analyze`: Analyze SEO metrics for multiple domains or URLs in a single request. Needs `targets`.
- `get_backlinks`: Retrieve backlinks pointing to a target domain or URL. Needs `target`.
- `get_site_audit`: Retrieve Site Audit data including project list, health scores, detected issues, and crawled page details. Needs `reportType`.
- `analyze_domain`: Retrieve a comprehensive overview of a domain or URL including Domain Rating, backlink statistics, outlink statistics, and organic traffic metrics. Needs `target`.
- `get_rank_tracker_data`: Retrieve rank tracking data for a Rank Tracker project. Needs `projectId`.
- `get_anchors`: Retrieve anchor text distribution for backlinks pointing to a target domain or URL. Needs `target`.
- `get_limits_and_usage`: Retrieve the connected API key expiration date, Ahrefs subscription plan, API unit limits, current usage, and billing reset date.

### Write tools (1)

- `manage_rank_tracker`: Manage Rank Tracker projects and tracked keywords. Needs `action`.

## Triggers

Ahrefs has 1 trigger, which fire on events in Ahrefs:

- `inbound_webhook`

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Ahrefs there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Ahrefs on metorial.com](https://metorial.com/integrations/ahrefs): the integration overview