Set up Ahrefs in Metorial for Claude, ChatGPT and Cursor
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'll 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 with at least one access group
- An account with Ahrefs for each person who connects
- For the CLI steps: the Metorial 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.
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.
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.
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
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
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.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Ahrefs.
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:
Employee: connect Ahrefs
In the portal
Open Ahrefs in the catalog
Sign in to your portal and open Ahrefs. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. An Ahrefs sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
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.
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.
Check it worked
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. Needstarget.get_brand_radar: Monitor how a brand appears in AI-generated responses across different AI platforms. Needstarget.get_organic_competitors: Retrieve organic search competitors for a target domain. Needstarget.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. Needstarget.get_keyword_ideas: Discover keyword ideas based on a seed keyword. Needskeyword.get_metrics_by_country: Retrieve country-specific organic search metrics for a target domain or URL. Needstarget.get_serp_overview: Retrieve the current search engine results page (SERP) data for a given keyword. Needskeyword.get_linked_domains: Retrieve domains that a target website links out to. Needstarget.get_top_pages: Retrieve top pages for a domain ranked by organic traffic. Needstarget.get_domain_history: Retrieve historical SEO metrics for a domain or URL over time. NeedstargetandhistoryType.batch_analyze: Analyze SEO metrics for multiple domains or URLs in a single request. Needstargets.get_backlinks: Retrieve backlinks pointing to a target domain or URL. Needstarget.get_site_audit: Retrieve Site Audit data including project list, health scores, detected issues, and crawled page details. NeedsreportType.analyze_domain: Retrieve a comprehensive overview of a domain or URL including Domain Rating, backlink statistics, outlink statistics, and organic traffic metrics. Needstarget.get_rank_tracker_data: Retrieve rank tracking data for a Rank Tracker project. NeedsprojectId.get_anchors: Retrieve anchor text distribution for backlinks pointing to a target domain or URL. Needstarget.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. Needsaction.
Triggers
Ahrefs has 1 trigger, which fire on events in Ahrefs:
inbound_webhook
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Ahrefs there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Ahrefs on metorial.com: the integration overview