KosmoKrator

data

Ahrefs MCP, CLI, and Lua Integration for AI Agents

Ahrefs integration docs for AI agents: MCP gateway setup, Ahrefs CLI commands, Lua API reference, credentials, and function schemas.

Ahrefs for agents

Credentials can be configured manually in web or CLI hosts.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Agent Surfaces

Machine-Readable Metadata

Function Catalog

FunctionTypeParametersDescription
ahrefs.ahrefs_list_backlinks Read read 4 List backlinks pointing to a target website or URL. Use this to analyze a site's link profile, find linking pages, anchor texts, and backlink quality metrics.
ahrefs.ahrefs_list_referring_domains Read read 4 List referring domains that link to a target website. Shows domain-level metrics like domain rating (DR), the number of backlinks from each domain, and first/last seen dates.
ahrefs.ahrefs_list_organic_keywords Read read 4 List organic keywords that a target website or URL ranks for in search results. Returns keyword, position, search volume, traffic, keyword difficulty, and the ranking URL.
ahrefs.ahrefs_list_pages Read read 4 List top pages for a target website ranked by traffic or other metrics. Returns page URLs along with traffic data, keyword counts, and backlink information.
ahrefs.ahrefs_get_metrics Read read 1 Get Site Explorer overview metrics for a target using Ahrefs API v3.
ahrefs.ahrefs_get_domain_rating Read read 1 Get Domain Rating and Ahrefs Rank for a target and date.
ahrefs.ahrefs_get_backlinks_stats Read read 1 Get backlink statistics for a target using Ahrefs Site Explorer.
ahrefs.ahrefs_list_broken_backlinks Read read 1 List broken backlinks pointing to a target.
ahrefs.ahrefs_list_organic_competitors Read read 1 List organic search competitors for a target.
ahrefs.ahrefs_list_paid_pages Read read 1 List pages from a target ranking in paid search results.
ahrefs.ahrefs_list_linked_domains Read read 1 List domains linked from the target.
ahrefs.ahrefs_list_anchors Read read 3 List anchor texts used in backlinks pointing to a target website. Shows anchor text distribution, the number of referring pages using each anchor, and backlink counts.
ahrefs.ahrefs_get_limits_and_usage Read read 0 Get Ahrefs API subscription limits and usage for the authenticated API key.
ahrefs.ahrefs_api_get Read read 2 Call any Ahrefs API v3 GET endpoint.