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
@哥飞社群
.
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
Or use uv
:
Manual Installation
- Clone the repository:
- Install dependencies:
- Set the 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:
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:
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:
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:
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:
Development
For development:
How 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_KEY
environment variable - Rate 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
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A MCP server for retrieving backlink information for any domain(SEO).
Related MCP Servers
- AsecurityAlicenseAqualityA powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.Last updated -414612TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server for fetching and transforming web content into various formats.Last updated -44PythonMIT License
- -securityAlicense-qualityAn MCP server that enables fetching web content using the Node.js undici library, supporting various HTTP methods, content formats, and request configurations.Last updated -668TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that connects to Backlog API, providing functionality to search, retrieve, and update issues through natural language commands.Last updated -531JavaScript