Ahrefs MCP server
154 operations0 webhooks
SEO toolkit for keyword research, backlink analysis, and search ranking insights.
Try Ahrefs with your agent
Connect Ahrefs, then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.
Using Corsair, show me what you can do in Ahrefs on my account, then run one read-only example and show me the result.
Ahrefs tools and triggers
Tools are what your agent can do in Ahrefs through Corsair's MCP server. Triggers are the Ahrefs events a routine can start from.
Web Analytics
- Browser VersionsRead-only
Web Analytics: list visitors by browser version
webAnalytics.browserVersions
- Browser Versions ChartRead-only
Web Analytics: chart visitors by browser version over time
webAnalytics.browserVersionsChart
- BrowsersRead-only
Web Analytics: list visitors by browser
webAnalytics.browsers
- Browsers ChartRead-only
Web Analytics: chart visitors by browser over time
webAnalytics.browsersChart
- ChartRead-only
Web Analytics: chart visitors, visits and pageviews over time
webAnalytics.chart
- CitiesRead-only
Web Analytics: list visitors by city
webAnalytics.cities
- Cities ChartRead-only
Web Analytics: chart visitors by city over time
webAnalytics.citiesChart
- ContinentsRead-only
Web Analytics: list visitors by continent
webAnalytics.continents
- Continents ChartRead-only
Web Analytics: chart visitors by continent over time
webAnalytics.continentsChart
- CountriesRead-only
Web Analytics: list visitors by country
webAnalytics.countries
- Countries ChartRead-only
Web Analytics: chart visitors by country over time
webAnalytics.countriesChart
- DevicesRead-only
Web Analytics: list visitors by device type
webAnalytics.devices
- Devices ChartRead-only
Web Analytics: chart visitors by device type over time
webAnalytics.devicesChart
- Entry PagesRead-only
Web Analytics: list visitors by entry page
webAnalytics.entryPages
- Entry Pages ChartRead-only
Web Analytics: chart visitors by entry page over time
webAnalytics.entryPagesChart
- Exit PagesRead-only
Web Analytics: list visitors by exit page
webAnalytics.exitPages
- Exit Pages ChartRead-only
Web Analytics: chart visitors by exit page over time
webAnalytics.exitPagesChart
- LanguagesRead-only
Web Analytics: list visitors by browser language
webAnalytics.languages
- Languages ChartRead-only
Web Analytics: chart visitors by browser language over time
webAnalytics.languagesChart
- Operating SystemsRead-only
Web Analytics: list visitors by operating system
webAnalytics.operatingSystems
- Operating Systems ChartRead-only
Web Analytics: chart visitors by operating system over time
webAnalytics.operatingSystemsChart
- Operating Systems VersionsRead-only
Web Analytics: list visitors by operating system version
webAnalytics.operatingSystemsVersions
- Operating Systems Versions ChartRead-only
Web Analytics: chart visitors by operating system version over time
webAnalytics.operatingSystemsVersionsChart
- ReferrersRead-only
Web Analytics: list visitors by referrer
webAnalytics.referrers
- Referrers ChartRead-only
Web Analytics: chart visitors by referrer over time
webAnalytics.referrersChart
- Source ChannelsRead-only
Web Analytics: list visitors by source channel
webAnalytics.sourceChannels
- Source Channels ChartRead-only
Web Analytics: chart visitors by source channel over time
webAnalytics.sourceChannelsChart
- SourcesRead-only
Web Analytics: list visitors by traffic source
webAnalytics.sources
- Sources ChartRead-only
Web Analytics: chart visitors by traffic source over time
webAnalytics.sourcesChart
- StatsRead-only
Web Analytics: get visitors, visits, pageviews, bounce rate and session length for a period
webAnalytics.stats
- Top PagesRead-only
Web Analytics: list visitors by page
webAnalytics.topPages
- Top Pages ChartRead-only
Web Analytics: chart visitors by page over time
webAnalytics.topPagesChart
- Utm ParamsRead-only
Web Analytics: list visitors by UTM parameter value
webAnalytics.utmParams
- Utm Params ChartRead-only
Web Analytics: chart visitors by UTM parameter value over time
webAnalytics.utmParamsChart
Site Explorer
- Ai Responses CountRead-only
Count AI assistant answers that cite a target, per platform
siteExplorer.aiResponsesCount
- All BacklinksRead-only
List backlinks pointing to a target
siteExplorer.allBacklinks
- AnchorsRead-only
List anchor texts of backlinks pointing to a target
siteExplorer.anchors
- Backlinks StatsRead-only
Get live and all-time backlink and referring-domain counts for a target
siteExplorer.backlinksStats
- Broken BacklinksRead-only
List backlinks pointing to broken pages on a target
siteExplorer.brokenBacklinks
- Crawled PagesRead-only
List pages of a target that Ahrefs has crawled, with status and type
siteExplorer.crawledPages
- Domain Rating HistoryRead-only
Get Domain Rating history for a target
siteExplorer.domainRatingHistory
- Get Domain RatingRead-only
Get Ahrefs Domain Rating and Ahrefs Rank for a target
siteExplorer.getDomainRating
- Keywords HistoryRead-only
Get organic keyword counts by position bucket over time for a target
siteExplorer.keywordsHistory
- Linked Anchors ExternalRead-only
List anchor texts a target uses in its outgoing external links
siteExplorer.linkedAnchorsExternal
- Linked Anchors InternalRead-only
List anchor texts a target uses in its internal links
siteExplorer.linkedAnchorsInternal
- Linked DomainsRead-only
List external domains a target links to
siteExplorer.linkedDomains
- MetricsRead-only
Get organic and paid traffic, keyword and value metrics for a target
siteExplorer.metrics
- Metrics By CountryRead-only
Get organic and paid traffic metrics for a target split by country
siteExplorer.metricsByCountry
- Metrics HistoryRead-only
Get organic and paid traffic and value history for a target
siteExplorer.metricsHistory
- Organic CompetitorsRead-only
List sites that compete with a target for the same organic keywords
siteExplorer.organicCompetitors
- Organic KeywordsRead-only
List organic keywords a target ranks for, including positions and traffic metrics
siteExplorer.organicKeywords
- Outlinks StatsRead-only
Get counts of outgoing links and linked domains for a target
siteExplorer.outlinksStats
- Pages By BacklinksRead-only
List pages of a target ranked by backlinks and referring domains
siteExplorer.pagesByBacklinks
- Pages By Internal LinksRead-only
List pages of a target ranked by internal links pointing to them
siteExplorer.pagesByInternalLinks
- Pages By TrafficRead-only
Get how many pages of a target fall into each organic traffic range
siteExplorer.pagesByTraffic
- Pages HistoryRead-only
Get the number of ranking pages of a target over time
siteExplorer.pagesHistory
- Paid PagesRead-only
List pages of a target that get paid search traffic
siteExplorer.paidPages
- RefdomainsRead-only
List referring domains linking to a target
siteExplorer.refdomains
- Refdomains HistoryRead-only
Get referring domains count history for a target
siteExplorer.refdomainsHistory
- Top PagesRead-only
List top organic pages for a target with traffic, keyword, and link metrics
siteExplorer.topPages
- Total Search Volume HistoryRead-only
Get the total search volume of keywords a target ranks for over time
siteExplorer.totalSearchVolumeHistory
- Url Rating HistoryRead-only
Get URL Rating history for a page
siteExplorer.urlRatingHistory
Management
- Add Brand Radar PromptsWrite
Add custom prompts to a Brand Radar report
management.addBrandRadarPrompts
- Add Keyword List KeywordsWrite
Add keywords to a keyword list
management.addKeywordListKeywords
- Add Project CompetitorsWrite
Add competitors to a Rank Tracker project
management.addProjectCompetitors
- Add Project Keyword TagsWrite
Add or replace tags on tracked keywords
management.addProjectKeywordTags
- Add Project KeywordsWrite
Add tracked keywords to a Rank Tracker project
management.addProjectKeywords
- Brand Radar PromptsRead-only
List custom prompts of a Brand Radar report
management.brandRadarPrompts
- Brand Radar ReportsRead-only
List Brand Radar reports
management.brandRadarReports
- Create Brand Radar ReportWrite
Create a Brand Radar report for a brand and its competitors
management.createBrandRadarReport
- Create Keyword ListWrite
Create a Keywords Explorer keyword list
management.createKeywordList
- Create ProjectWrite
Create an Ahrefs project for a target
management.createProject
- Delete Brand Radar PromptsDestructive
Remove custom prompts from a Brand Radar report
management.deleteBrandRadarPrompts
- Delete Keyword List KeywordsDestructive
Remove keywords from a keyword list
management.deleteKeywordListKeywords
- Delete Keyword ListsDestructive
Delete Keywords Explorer keyword lists
management.deleteKeywordLists
- Delete Project CompetitorsDestructive
Remove competitors from a Rank Tracker project
management.deleteProjectCompetitors
- Delete Project Keyword TagsDestructive
Remove tags from tracked keywords
management.deleteProjectKeywordTags
- Delete Project KeywordsDestructive
Remove tracked keywords from a Rank Tracker project
management.deleteProjectKeywords
- Delete ProjectsDestructive
Delete Ahrefs projects
management.deleteProjects
- Keyword List KeywordsRead-only
List keywords in a saved keyword list
management.keywordListKeywords
- Keyword ListsRead-only
List saved Keywords Explorer keyword lists
management.keywordLists
- LocationsRead-only
Look up Rank Tracker location ids for a country
management.locations
- Project CompetitorsRead-only
List competitors of a Rank Tracker project
management.projectCompetitors
- Project KeywordsRead-only
List keywords tracked in a Rank Tracker project
management.projectKeywords
- ProjectsRead-only
List Ahrefs projects in the workspace
management.projects
- Update Brand Radar PromptsWrite
Change countries or tags of Brand Radar prompts
management.updateBrandRadarPrompts
- Update Brand Radar ReportWrite
Update a Brand Radar report's brands, countries or filters
management.updateBrandRadarReport
- Update ProjectWrite
Change a project's access or folder
management.updateProject
Brand Radar
- Ai ResponsesRead-only
Brand Radar: get AI assistant answers that mention the brand or competitors
brandRadar.aiResponses
- Ai Responses EntitiesRead-only
Brand Radar: get AI assistant answers that mention the brand or competitors, with brands and competitors given as names or URL groups
brandRadar.aiResponsesEntities
- Citations History EntitiesRead-only
Brand Radar: get citation counts over time, with brands and competitors given as names or URL groups
brandRadar.citationsHistoryEntities
- Citations Overview EntitiesRead-only
Brand Radar: get citation counts per brand, with brands and competitors given as names or URL groups
brandRadar.citationsOverviewEntities
- Cited DomainsRead-only
Brand Radar: get domains AI assistants cite in answers about the brand
brandRadar.citedDomains
- Cited Domains EntitiesRead-only
Brand Radar: get domains AI assistants cite in answers about the brand, with brands and competitors given as names or URL groups
brandRadar.citedDomainsEntities
- Cited PagesRead-only
Brand Radar: get pages AI assistants cite in answers about the brand
brandRadar.citedPages
- Cited Pages EntitiesRead-only
Brand Radar: get pages AI assistants cite in answers about the brand, with brands and competitors given as names or URL groups
brandRadar.citedPagesEntities
- Impressions HistoryRead-only
Brand Radar: get AI answer impressions over time
brandRadar.impressionsHistory
- Impressions History EntitiesRead-only
Brand Radar: get AI answer impressions over time, with brands and competitors given as names or URL groups
brandRadar.impressionsHistoryEntities
- Impressions OverviewRead-only
Brand Radar: get AI answer impressions per brand
brandRadar.impressionsOverview
- Impressions Overview EntitiesRead-only
Brand Radar: get AI answer impressions per brand, with brands and competitors given as names or URL groups
brandRadar.impressionsOverviewEntities
- Mentions HistoryRead-only
Brand Radar: get brand mentions in AI answers over time
brandRadar.mentionsHistory
- Mentions History EntitiesRead-only
Brand Radar: get brand mentions in AI answers over time, with brands and competitors given as names or URL groups
brandRadar.mentionsHistoryEntities
- Mentions OverviewRead-only
Brand Radar: get brand mentions in AI answers per brand
brandRadar.mentionsOverview
- Mentions Overview EntitiesRead-only
Brand Radar: get brand mentions in AI answers per brand, with brands and competitors given as names or URL groups
brandRadar.mentionsOverviewEntities
- Sov HistoryRead-only
Brand Radar: get AI share of voice over time
brandRadar.sovHistory
- Sov History EntitiesRead-only
Brand Radar: get AI share of voice over time, with brands and competitors given as names or URL groups
brandRadar.sovHistoryEntities
- Sov OverviewRead-only
Brand Radar: get AI share of voice per brand
brandRadar.sovOverview
- Sov Overview EntitiesRead-only
Brand Radar: get AI share of voice per brand, with brands and competitors given as names or URL groups
brandRadar.sovOverviewEntities
Gsc
- Anonymous QueriesRead-only
Estimate the queries Search Console hides as anonymous for a project
gsc.anonymousQueries
- Ctr By PositionRead-only
Get average Search Console CTR for each ranking position
gsc.ctrByPosition
- Keyword HistoryRead-only
Get Search Console history for specific queries
gsc.keywordHistory
- KeywordsRead-only
List Search Console queries for a project with clicks, impressions, CTR and average position
gsc.keywords
- Metrics By CountryRead-only
Get Search Console clicks by country
gsc.metricsByCountry
- Page HistoryRead-only
Get Search Console history for specific pages
gsc.pageHistory
- PagesRead-only
List Search Console pages for a project with clicks, impressions, CTR and average position
gsc.pages
- Pages HistoryRead-only
Get the number of pages with Search Console impressions over time
gsc.pagesHistory
- Performance By DeviceRead-only
Get Search Console performance split by device
gsc.performanceByDevice
- Performance By PositionRead-only
Get Search Console clicks and impressions split by position range
gsc.performanceByPosition
- Performance HistoryRead-only
Get Search Console clicks, impressions, CTR and position over time
gsc.performanceHistory
- Positions HistoryRead-only
Get how many queries rank in each position bucket over time in Search Console
gsc.positionsHistory
Social Media
- Activity HistoryRead-only
List the activity log of a social media post
socialMedia.activityHistory
- AuthorsRead-only
List social media post authors in the workspace
socialMedia.authors
- Channel MetricsRead-only
Get follower count history for a social media channel
socialMedia.channelMetrics
- ChannelsRead-only
List connected social media channels
socialMedia.channels
- Create PostWrite
Create a social media post: publish now, schedule it or save a draft
socialMedia.createPost
- Delete PostDestructive
Delete a social media post
socialMedia.deletePost
- Post MetricsRead-only
Get views, likes and platform metrics for a published post
socialMedia.postMetrics
- PostsRead-only
List social media posts by status, channel or author
socialMedia.posts
- Update PostWrite
Update a social media post's text, channels or timing
socialMedia.updatePost
Keywords Explorer
- Matching TermsRead-only
Find keyword ideas that contain the seed keywords
keywordsExplorer.matchingTerms
- OverviewRead-only
Get keyword metrics such as volume, difficulty, CPC, clicks, and traffic potential
keywordsExplorer.overview
- Related TermsRead-only
Find related keyword ideas that top pages also rank for or talk about
keywordsExplorer.relatedTerms
- Search SuggestionsRead-only
Get search autocomplete suggestions for seed keywords
keywordsExplorer.searchSuggestions
- Volume By CountryRead-only
Get search volume for keywords in each country
keywordsExplorer.volumeByCountry
- Volume HistoryRead-only
Get monthly search volume history for a keyword
keywordsExplorer.volumeHistory
Rank Tracker
- Competitors DomainsRead-only
Compare traffic and share of voice of competitor domains in a Rank Tracker project
rankTracker.competitorsDomains
- Competitors OverviewRead-only
Compare positions of tracked keywords against project competitors
rankTracker.competitorsOverview
- Competitors PagesRead-only
List competitor pages ranking for a Rank Tracker project's keywords
rankTracker.competitorsPages
- Competitors StatsRead-only
Get position distribution and SERP feature counts for project competitors
rankTracker.competitorsStats
- OverviewRead-only
Get Rank Tracker keyword overview data for a project and device
rankTracker.overview
- Serp OverviewRead-only
Get the latest search results for a tracked keyword in a Rank Tracker project
rankTracker.serpOverview
Public
- Crawler Ip RangesRead-only
List the IP ranges Ahrefs crawlers use
public.crawlerIpRanges
- Crawler IpsRead-only
List the IP addresses Ahrefs crawlers use
public.crawlerIps
- Domain Rating FreeRead-only
Get the free Domain Rating for one domain
public.domainRatingFree
- Domain Rating Free BatchRead-only
Get the free Domain Rating for several domains
public.domainRatingFreeBatch
- Domain Rating Top DomainsRead-only
List domains ranked by Domain Rating
public.domainRatingTopDomains
Site Audit
- IssuesRead-only
List Site Audit issues for a project with affected URL counts
siteAudit.issues
- Page ContentRead-only
Get the crawled content of one page from a Site Audit project
siteAudit.pageContent
- Page ExplorerRead-only
List crawled pages from a Site Audit project, optionally only those with a given issue
siteAudit.pageExplorer
- ProjectsRead-only
List Site Audit projects with health scores and issue counts
siteAudit.projects
Batch Analysis
- AnalyzeRead-only
Get SEO metrics for up to 200 targets in one request
batchAnalysis.analyze
Content Helper
- TopicsRead-only
Get the topics top-ranking pages cover for a keyword, with coverage scores
contentHelper.topics
Serp
- OverviewRead-only
Get SERP positions for a keyword and country, including ranking page metrics
serp.overview
Subscription Info
- Limits And UsageRead-only
Get Ahrefs subscription limits and API unit usage
subscriptionInfo.limitsAndUsage
Connect Ahrefs to Claude, ChatGPT or Cursor
- 1
Connect Ahrefs in Corsair
Add your Ahrefs API key once in Corsair. Corsair stores the credential encrypted and makes the Ahrefs API calls for your agent, so it never goes into a prompt or a config file. Connect Ahrefs
If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs Ahrefs. On a ChatGPT personal plan, connect Ahrefs here first.
- 2
Add Corsair's MCP server to your agent
Every client uses the same address:
https://mcp.corsair.dev/mcpOpen Plugins → Add → Add custom connector, name it Corsair, paste the address, select Continue, then Add.Install Corsair from ChatGPT's plugin directory, connect it and sign in. A custom MCP server with the address works too, but personal plans get its read tools only.Add to Cursor / Grok BuildOr add this to~/.cursor/mcp.json. It opens Corsair to sign in the first time it connects.{ "mcpServers": { "corsair": { "url": "https://mcp.corsair.dev/mcp" } } }Run this, then run/mcpin Claude Code to sign in.claude mcp add --transport http corsair https://mcp.corsair.dev/mcpCodex, Antigravity, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client
- 3
Sign in and choose what needs your approval
Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, Ahrefs's read and write operations run right away and its 8 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.
FAQ
Install corsair and @corsair-dev/ahrefs, add the Ahrefs plugin, and connect with an API key. Then call methods like corsair.ahrefs.api.batchAnalysis.analyze() from your app. Corsair syncs data per tenant.
Yes. Ahrefs requires an API key from your Ahrefs account or developer dashboard. Create credentials with access that matches what you automate, then paste them into Corsair or connect through managed auth in Hub.
Yes. One Corsair client can hit Ahrefs, GitHub, Notion, Stripe, and the rest. Trigger Ahrefs from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.
Teams use Corsair for SEO toolkit for keyword research, backlink analysis, and search ranking insights. Common builds include sync jobs, admin tooling, and agents that call Ahrefs APIs from your backend. Local DB entities let you query synced Ahrefs records without hitting the API on every read.
The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per Ahrefs API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.
We maintain @corsair-dev/ahrefs in the open repo. When Ahrefs ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.
No. Corsair does not read your Ahrefs data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store Ahrefs data on your behalf.
Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.
Yes. Put Ahrefs on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 8 destructive Ahrefs operations. You can change a link's mode at hub.corsair.dev/me.