Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Ahrefs MCP server

Vendor MCP
Open markdown

The Ahrefs MCP connector routes your AI agent's tool calls to Ahrefs's own MCP server through Scalekit. Each user signs in to Ahrefs once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 134 tools.

Tools
134
What they doRead · write · destructive
134 · 0 · 0134 read0 write0 destructive
Users sign in with
OAuth app
Scalekit's or your own

What you can do

  • Analyze backlinks: retrieve backlink profiles, referring domains, anchors, and broken links for any URL or domain
  • Research keywords: get keyword ideas, search volume, difficulty scores, SERP overviews, and ranking history
  • Explore site data: fetch organic and paid traffic estimates, top pages, and outlinks for any domain
  • Track rankings: monitor keyword positions across countries and devices over time
  • Audit sites: run crawls to surface broken pages, redirect chains, and on-page SEO issues
  • Analyze web analytics: retrieve traffic stats, top pages, UTM breakdowns, and traffic sources for Web Analytics projects

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Ahrefs MCP connection

    In AgentKit > Connections, create an Ahrefs MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Ahrefs MCP server, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'ahrefsmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Ahrefs MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'ahrefsmcp_management_brand_radar_reports',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • ahrefsmcp_batch_analysisPerforms a batch analysis of multiple URLs, domains, or subdomains to retrieve selected SEO, backlink, organic, and paid traffic metrics.Read-only

    Batch Analysis

    Performs a batch analysis of multiple URLs, domains, or subdomains to retrieve selected SEO, backlink, organic, and paid traffic metrics.

    Inputs

    selectarrayrequired
    Comma-separated list of fields to include in the response.
    targetsarrayrequired
    No description.
    countrystring
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    order_byarray
    Sort order as an array of `field:asc` or `field:desc` strings.
    outputstring
    Response format. Use `json` (default) or `csv`.
    volume_modestring
    How to calculate search volume: `monthly` or `average`.
  • ahrefsmcp_brand_radar_ai_responsesRetrieve questions asked to AI assistants and the AI-generated responses that mention your brand or competitors, including cited sources and search volume estimates.Read-only

    Brand Radar Ai Responses

    Retrieve questions asked to AI assistants and the AI-generated responses that mention your brand or competitors, including cited sources and search volume estimates.

    Inputs

    data_sourcestringrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    selectstringrequired
    Comma-separated list of fields to include in the response.
    brandstring
    Your brand domain to track (e.g. `ahrefs.com`).
    competitorsstring
    Comma-separated list of competitor domains.
    countrystring
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    datestring
    Target date for the snapshot (YYYY-MM-DD).
    limitinteger
    Maximum number of results to return.
    marketstring
    Market or country code for brand radar data.
    order_bystring
    Sort order as an array of `field:asc` or `field:desc` strings.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    wherestring
    Filter expression in Ahrefs API filter syntax.
  • ahrefsmcp_brand_radar_ai_responses_entitiesRetrieve questions asked to AI assistants and the AI-generated responses that mention your brand or competitors, with entity-based inputs for more precise brand matching.Read-only

    Brand Radar Ai Responses Entities

    Retrieve questions asked to AI assistants and the AI-generated responses that mention your brand or competitors, with entity-based inputs for more precise brand matching.

    Inputs

    data_sourcearrayrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    selectarrayrequired
    Comma-separated list of fields to include in the response.
    brand_filterobject
    Filter object to restrict results to a specific brand or competitor entity, using the same structure as the `brands` and `competitors` fields.
    brandsarray
    Array of brand domains to track.
    competitorsarray
    Comma-separated list of competitor domains.
    countryarray
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    datestring
    Target date for the snapshot (YYYY-MM-DD).
    limitinteger
    Maximum number of results to return.
    marketarray
    Market or country code for brand radar data.
    order_bystring
    Sort order as an array of `field:asc` or `field:desc` strings.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    tags_filterobject
    No description.
    volume_rangeobject
    Filter results to items whose associated search volume falls within a numeric range. Provide optional `from` and/or `to` bounds.
    whereobject
    Filter expression in Ahrefs API filter syntax.
  • ahrefsmcp_brand_radar_citations_history_entitiesProvides the historical number of citations for your and competitors' brand URLs in an LLM you specify.Read-only

    Brand Radar Citations History Entities

    Provides the historical number of citations for your and competitors' brand URLs in an LLM you specify. Every entity provided in `brands` (and `competitors`, when applicable) must include at least one value in `url_groups`; entities consisting only of `names` are not supported here because citations are matched against URL groups. Prefer this tool over the non-entities variant, since you can more accurately describe brands/competitors with multiple names and/or websites.

    Inputs

    data_sourcearrayrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    date_fromstringrequired
    Start date for the data range (YYYY-MM-DD).
    brandsarray
    Array of brand domains to track.
    countryarray
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    date_tostring
    End date for the data range (YYYY-MM-DD).
    marketarray
    Market or country code for brand radar data.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    tags_filterobject
    No description.
    whereobject
    Filter expression in Ahrefs API filter syntax.
  • ahrefsmcp_brand_radar_citations_overview_entitiesProvides the number of citations for your and competitors' brands in an LLM you specify, with filters for locations, query text, URL, and more.Read-only

    Brand Radar Citations Overview Entities

    Provides the number of citations for your and competitors' brands in an LLM you specify, with filters for locations, query text, URL, and more. Every entity provided in `brands` (and `competitors`, when applicable) must include at least one value in `url_groups`; entities consisting only of `names` are not supported here because citations are matched against URL groups. Prefer this tool over the non-entities variant, since you can more accurately describe brands/competitors with multiple names and/or websites.

    Inputs

    data_sourcearrayrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    selectarrayrequired
    Comma-separated list of fields to include in the response.
    brandsarray
    Array of brand domains to track.
    competitorsarray
    Comma-separated list of competitor domains.
    countryarray
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    marketarray
    Market or country code for brand radar data.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    tags_filterobject
    No description.
    whereobject
    Filter expression in Ahrefs API filter syntax.
  • ahrefsmcp_brand_radar_cited_domainsRetrieve domains cited in AI-generated responses that mention your brand or competitors in a specified LLM, with response counts and estimated monthly search volume.Read-only

    Brand Radar Cited Domains

    Retrieve domains cited in AI-generated responses that mention your brand or competitors in a specified LLM, with response counts and estimated monthly search volume.

    Inputs

    data_sourcestringrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    selectstringrequired
    Comma-separated list of fields to include in the response.
    brandstring
    Your brand domain to track (e.g. `ahrefs.com`).
    competitorsstring
    Comma-separated list of competitor domains.
    countrystring
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    datestring
    Target date for the snapshot (YYYY-MM-DD).
    limitinteger
    Maximum number of results to return.
    marketstring
    Market or country code for brand radar data.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    wherestring
    Filter expression in Ahrefs API filter syntax.
  • ahrefsmcp_brand_radar_cited_domains_entitiesRetrieve domains cited in AI-generated responses mentioning your brand or competitors in a specified LLM, using entity-based inputs for more precise brand matching.Read-only

    Brand Radar Cited Domains Entities

    Retrieve domains cited in AI-generated responses mentioning your brand or competitors in a specified LLM, using entity-based inputs for more precise brand matching.

    Inputs

    data_sourcearrayrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    selectarrayrequired
    Comma-separated list of fields to include in the response.
    brand_filterobject
    Filter object to restrict results to a specific brand or competitor entity, using the same structure as the `brands` and `competitors` fields.
    brandsarray
    Array of brand domains to track.
    competitorsarray
    Comma-separated list of competitor domains.
    countryarray
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    datestring
    Target date for the snapshot (YYYY-MM-DD).
    limitinteger
    Maximum number of results to return.
    marketarray
    Market or country code for brand radar data.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    tags_filterobject
    No description.
    volume_rangeobject
    Filter results to items whose associated search volume falls within a numeric range. Provide optional `from` and/or `to` bounds.
    whereobject
    Filter expression in Ahrefs API filter syntax.
  • ahrefsmcp_brand_radar_cited_pagesRetrieve pages cited in AI-generated responses that mention your brand or competitors in a specified LLM, with response counts and estimated monthly search volume.Read-only

    Brand Radar Cited Pages

    Retrieve pages cited in AI-generated responses that mention your brand or competitors in a specified LLM, with response counts and estimated monthly search volume.

    Inputs

    data_sourcestringrequired
    AI platform to pull data from (e.g. `google_ai_overview`).
    selectstringrequired
    Comma-separated list of fields to include in the response.
    brandstring
    Your brand domain to track (e.g. `ahrefs.com`).
    competitorsstring
    Comma-separated list of competitor domains.
    countrystring
    Two-letter ISO country code to filter data (e.g. `us`, `gb`, `de`).
    datestring
    Target date for the snapshot (YYYY-MM-DD).
    limitinteger
    Maximum number of results to return.
    marketstring
    Market or country code for brand radar data.
    outputstring
    Response format. Use `json` (default) or `csv`.
    promptsstring
    Search prompt or topic to track brand mentions for.
    report_idstring
    ID of the brand radar report to query.
    search_volume_typestring
    Type of search volume to use when calculating brand radar metrics, such as `organic` or `ai_overview` search volume.
    tracked_urlsstring
    No description.
    wherestring
    Filter expression in Ahrefs API filter syntax.