Backlinks MCP
Handles solving Cloudflare Turnstile CAPTCHA automatically to access protected SEO data services.
Provides access to Google's search engine for keyword research, analysis, and SEO optimization through the MCP service.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Backlinks MCPget backlinks for example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SEO MCP
A MCP (Model Control Protocol) SEO tool service based on Ahrefs data. Includes features such as backlink analysis, keyword research, traffic estimation, and more.
Overview
This service provides an API to retrieve SEO data from Ahrefs. It handles the entire process, including solving the CAPTCHA, authentication, and data retrieval. The results are cached to improve performance and reduce API costs.
This MCP service is for educational purposes only. Please do not misuse it. This project is inspired by
@哥飞社群.
Related MCP server: Sitemap MCP Server
Features
🔍 Backlink Analysis
Get detailed backlink data for any domain
View domain rating, anchor text, and link attributes
Filter educational and government domains
🎯 Keyword Research
Generate keyword ideas from a seed keyword
Get keyword difficulty score
View search volume and trends
📊 Traffic Analysis
Estimate website traffic
View traffic history and trends
Analyze popular pages and country distribution
Track keyword rankings
🚀 Performance Optimization
Use CapSolver to automatically solve CAPTCHA
Response caching
Installation
Prerequisites
Python 3.10 or higher
CapSolver account and API key (register here)
Install from PyPI
pip install seo-mcpOr use uv:
uv pip install seo-mcpManual Installation
Clone the repository:
git clone https://github.com/cnych/seo-mcp.git cd seo-mcpInstall dependencies:
pip install -e . # Or uv pip install -e .Set the CapSolver API key:
export CAPSOLVER_API_KEY="your-capsolver-api-key"
Usage
Run the service
You can run the service in the following ways:
Use in Cursor IDE
In the Cursor settings, switch to the MCP tab, click the +Add new global MCP server button, and then input:
{
"mcpServers": {
"SEO MCP": {
"command": "uvx",
"args": ["--python", "3.10", "seo-mcp"],
"env": {
"CAPSOLVER_API_KEY": "CAP-xxxxxx"
}
}
}
}You can also create a .cursor/mcp.json file in the project root directory, with the same content.
API Reference
The service provides the following MCP tools:
get_backlinks_list(domain: str)
Get the backlinks of a domain.
Parameters:
domain(string): The domain to analyze (e.g. "example.com")
Returns:
{
"overview": {
"domainRating": 76,
"backlinks": 1500,
"refDomains": 300
},
"backlinks": [
{
"anchor": "Example link",
"domainRating": 76,
"title": "Page title",
"urlFrom": "https://referringsite.com/page",
"urlTo": "https://example.com/page",
"edu": false,
"gov": false
}
]
}keyword_generator(keyword: str, country: str = "us", search_engine: str = "Google")
Generate keyword ideas.
Parameters:
keyword(string): The seed keywordcountry(string): Country code (default: "us")search_engine(string): Search engine (default: "Google")
Returns:
[
{
"keyword": "Example keyword",
"volume": 1000,
"difficulty": 45,
"cpc": 2.5
}
]get_traffic(domain_or_url: str, country: str = "None", mode: str = "subdomains")
Get the traffic estimation.
Parameters:
domain_or_url(string): The domain or URL to analyzecountry(string): Country filter (default: "None")mode(string): Analysis mode ("subdomains" or "exact")
Returns:
{
"traffic_history": [...],
"traffic": {
"trafficMonthlyAvg": 50000,
"costMontlyAvg": 25000
},
"top_pages": [...],
"top_countries": [...],
"top_keywords": [...]
}keyword_difficulty(keyword: str, country: str = "us")
Get the keyword difficulty score.
Parameters:
keyword(string): The keyword to analyzecountry(string): Country code (default: "us")
Returns:
{
"difficulty": 45,
"serp": [...],
"related": [...]
}Development
For development:
git clone https://github.com/cnych/seo-mcp.git
cd seo-mcp
uv syncHow it works
The user sends a request through MCP
The service uses CapSolver to solve the Cloudflare Turnstile CAPTCHA
The service gets the authentication token from Ahrefs
The service retrieves the requested SEO data
The service processes and returns the formatted results
Troubleshooting
CapSolver API key error:Check the
CAPSOLVER_API_KEYenvironment variableRate limiting:Reduce request frequency
No results:The domain may not be indexed by Ahrefs
Other issues:See GitHub repository
License
MIT License - See LICENSE file
Available Tools
4 toolsget_backlinks_listA
Get backlinks list for the specified domain
Args:
domain (str): The domain to query
Returns:
List of backlinks for the domain, containing title, URL, domain rating, etc.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes return type and fields (title, URL, domain rating). No annotations provided, so description carries burden; it is transparent about the output.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very concise, all sentences contribute value. Front-loaded purpose with immediate clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter, the description covers purpose, input, and output sufficiently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage 0%; description adds 'The domain to query' which is minimal. Provides no additional context like format or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb and resource: 'Get backlinks list for the specified domain'. Distinguishes from sibling tools like get_traffic and keyword_difficulty.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use. Implied usage for domain backlinks, but no guidance on alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_trafficC
Check the estimated search traffic for any website.
Args:
domain_or_url (str): The domain or URL to query
country (str): The country to query, default is "None"
mode (["subdomains", "exact"]): The mode to use for the query
Returns:
Traffic data for the specified domain or URL
| Name | Required | Description | Default |
|---|---|---|---|
| domain_or_url | Yes | ||
| country | No | None | |
| mode | No | subdomains |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It does not disclose whether the tool is read-only, destructive, requires authentication, or has rate limits. For a data query tool, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at two sentences plus an Args/Returns list. It is front-loaded with the purpose and structured for easy scanning. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description only vaguely states 'Traffic data' without specifying structure. Combined with missing behavioral context, the description is incomplete for a 3-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description includes an Args section that lists parameters and their types, adding some meaning beyond the schema (e.g., domain_or_url is 'The domain or URL to query'). However, it does not explain the difference between 'subdomains' and 'exact' modes, nor the effect of the country parameter, beyond default values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Check the estimated search traffic for any website', which clearly identifies the verb and resource. It distinguishes from sibling tools like get_backlinks_list and keyword_difficulty by focusing on traffic estimation, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it specify prerequisites or exclusions. It simply states the tool's function without context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
keyword_difficultyC
Get keyword difficulty for the specified keyword
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| country | No | us |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry full burden. It does not disclose how difficulty is calculated, what unit/scale is used, or any side effects. Bare minimum.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence of 8 words is concise but lacks substance. Appropriate length for the content, but more detail would improve informativeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and 2 params requiring explanation, the description is inadequate. Leaves agent guessing about return values, scope, and usage nuances.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage. Description only mentions 'specified keyword' without explaining its meaning or format. Country parameter and default are not explained. Adds minimal value to schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get keyword difficulty for the specified keyword' clearly states the action and resource. It is distinct from sibling tools like get_backlinks_list and get_traffic, though sibling differentiation is implicit rather than explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool compared to alternatives. Lacks context about prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
keyword_generatorC
Get keyword ideas for the specified keyword
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| country | No | us | |
| search_engine | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description only says 'get ideas' with no disclosure of behavior (e.g., return format, rate limits, data source).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely short, no fluff, but lacks essential details. Conciseness is achieved at the expense of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 parameters, no output schema, and no annotations, the description is severely incomplete. No information on return values or side effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and description only mentions the keyword parameter, ignoring country and search_engine. Fails to compensate for missing parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns keyword ideas for a given keyword. It distinguishes from sibling tools (backlinks, traffic, difficulty) but lacks specificity about the output format or scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs. alternatives, no prerequisites, no context about typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- First observed
get_backlinks_list - First observed
get_traffic - First observed
keyword_difficulty - First observed
keyword_generator
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap. get_backlinks_list retrieves backlink data for domains, get_traffic provides traffic estimates, keyword_difficulty assesses keyword competitiveness, and keyword_generator suggests related keywords. The four tools cover separate aspects of SEO analysis without ambiguity.
All tool names follow a consistent verb_noun pattern with snake_case formatting. Each name clearly indicates its function: get_backlinks_list, get_traffic, keyword_difficulty, and keyword_generator maintain perfect naming consistency throughout the set.
Four tools is reasonable for an SEO/backlink analysis server, though slightly minimal. The tools cover core SEO functions (backlinks, traffic, keyword difficulty, keyword generation), but additional tools like domain authority checking or competitor analysis could enhance completeness. The count is appropriate but leaves room for expansion.
The tool set covers key SEO analysis areas but has notable gaps. While it provides backlink data, traffic estimates, and keyword tools, it lacks domain authority metrics, competitor backlink analysis, and link-building tools. Agents can perform basic SEO analysis but may encounter dead ends for more advanced workflows requiring these missing operations.
Maintenance
Related MCP Connectors
SEO MCP server — backlinks, domain authority, tech stack, and 18+ tools via Common Crawl.
SEO Backlinks MCP — backlink intelligence via DataForSEO Backlinks API
MCP server for Hostinger API
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP Server for Web scraping and Crawling, built using Crawl4AI224-
- AlicenseBqualityDmaintenanceMCP server for fetching, parsing and crawling sitemaps of a given website426 PyPI7MIT
- AlicenseBqualityCmaintenanceMCP server & CLI for keyword research, domain analytics, backlinks, traffic analysis, and competitive intelligence using Semrush API data.7746 npm39MIT
- FlicenseAqualityDmaintenanceMCP server for Common Crawl CDX that enables backlink discovery, expired domain finding, and competitor gap analysis without requiring API keys.4-