by cnych
Provides SEO data retrieval via Ahrefs, exposing MCP tools for backlink analysis, keyword generation, traffic estimation, and keyword difficulty, with automated CAPTCHA solving and response caching.
Seo Mcp delivers an MCP‑based API that queries Ahrefs for SEO metrics such as backlinks, keyword ideas, traffic estimates, and keyword difficulty. It handles Cloudflare Turnstile CAPTCHA automatically via CapSolver and caches results to reduce cost and latency.
pip install seo-mcp
or uv pip install seo-mcp
).export CAPSOLVER_API_KEY="your-capsolver-api-key"
uvx --python 3.10 seo-mcp
).get_backlinks_list
, keyword_generator
, get_traffic
, keyword_difficulty
) from your client.uvx
.A MCP (Model Control Protocol) SEO tool service based on Ahrefs data. Includes features such as backlink analysis, keyword research, traffic estimation, and more.
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
@哥飞社群
.
🔍 Backlink Analysis
🎯 Keyword Research
📊 Traffic Analysis
🚀 Performance Optimization
pip install seo-mcp
Or use uv
:
uv pip install seo-mcp
Clone the repository:
git clone https://github.com/cnych/seo-mcp.git
cd seo-mcp
Install dependencies:
pip install -e .
# Or
uv pip install -e .
Set the CapSolver API key:
export CAPSOLVER_API_KEY="your-capsolver-api-key"
You can run the service in the following ways:
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.
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": [...]
}
For development:
git clone https://github.com/cnych/seo-mcp.git
cd seo-mcp
uv sync
CAPSOLVER_API_KEY
environment variableMIT License - See LICENSE file
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "Seo Mcp": { "command": "uvx", "args": [ "--python", "3.10", "seo-mcp" ], "env": { "CAPSOLVER_API_KEY": "<YOUR_CAPSOLVER_API_KEY>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by exa-labs
Provides real-time web search capabilities to AI assistants via a Model Context Protocol server, enabling safe and controlled access to the Exa AI Search API.
by elastic
Enables natural‑language interaction with Elasticsearch indices via the Model Context Protocol, exposing tools for listing indices, fetching mappings, performing searches, running ES|QL queries, and retrieving shard information.
by graphlit
Enables integration between MCP clients and the Graphlit platform, providing ingestion, extraction, retrieval, and RAG capabilities across a wide range of data sources and connectors.
by mamertofabian
Fast cross‑platform file searching leveraging the Everything SDK on Windows, Spotlight on macOS, and locate/plocate on Linux.
by cr7258
Provides Elasticsearch and OpenSearch interaction via Model Context Protocol, enabling document search, index management, cluster monitoring, and alias operations.
by liuyoshio
Provides natural‑language search and recommendation for Model Context Protocol servers, delivering rich metadata and real‑time updates.
by ihor-sokoliuk
Provides web search capabilities via the SearXNG API, exposing them through an MCP server for seamless integration with AI agents and tools.
by fatwang2
Provides web and news search, URL crawling, sitemap extraction, deep‑reasoning, and trending topic retrieval via Search1API, exposed as an MCP server for integration with AI clients.
by nacos-group
Provides search, installation, and proxy functionalities for MCP servers, combining Nacos service discovery with optional Compass API support and offering both router and proxy operating modes.