SM

SEO MCP

Created 5 months ago

A MCP SEO tool service based on Ahrefs data for backlink analysis, keyword research, and traffic estimation.

development documentation public SEO API

What is SEO MCP?

A free SEO tool MCP (Model Control Protocol) service based on Ahrefs data. Includes features such as backlinks, keyword ideas, and more. by [claudemcp](https://www.claudemcp.com/servers/seo-mcp).

Documentation

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
  • 🎯 Keyword Research
  • 📊 Traffic Analysis
  • 🚀 Performance Optimization

Installation# Prerequisites

  • Python 3.10 or higher
  • CapSolver account and API key (register here)

Install from PyPI

pip install seo-mcp

Manual Installation

  1. Clone the repository:
git clone https://github.com/cnych/seo-mcp.git
cd seo-mcp
  1. Install dependencies:
pip install -e .
  1. 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:\n\n#### 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"}
    }
  }
}

API Reference

The service provides the following MCP tools:\n\n#### get_backlinks_list(domain: str) Get the backlinks of a domain.

keyword_generator(keyword: str, country: str = "us", search_engine: str = "Google")

Generate keyword ideas.

get_traffic(domain_or_url: str, country: str = "None", mode: str = "subdomains")

Get the traffic estimation.

keyword_difficulty(keyword: str, country: str = "us")

Get the keyword difficulty score.

Development

For development:

git clone https://github.com/cnych/seo-mcp.git
cd seo-mcp
uv sync

How it works

  1. The user sends a request through MCP
  2. The service uses CapSolver to solve the Cloudflare Turnstile CAPTCHA
  3. The service gets the authentication token from Ahrefs
  4. The service retrieves the requested SEO data
  5. 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

Server Config

{
  "mcpServers": {
    "seo-mcp-server": {
      "command": "npx",
      "args": [
        "seo-mcp"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: Yes
Official: No

Project Info

Hosted Featured
Created At: Jul 02, 2025
Updated At: Aug 07, 2025
Author: cnych
Category: community
License: MIT License
Tags:
development documentation public