Skip to main content
Glama
mcp-serp-clustering

mcp-serp-clustering

by dredozubov

mcp-serp-clustering

An MCP (Model Context Protocol) server for clustering keywords by SERP overlap. Groups keywords that share URLs in Google's top 10 results, indicating they should target the same page.

What is SERP Clustering?

SERP (Search Engine Results Page) clustering is an SEO technique that groups keywords based on shared search results. If two keywords have 3+ URLs in common in their top 10 results, Google considers them the same search intent - they should be targeted on a single page rather than separate pages.

This approach is more accurate than semantic clustering because it uses Google's actual ranking signals rather than keyword similarity.

Related MCP server: Fan Out Query MCP

Installation

First, authenticate with GitHub Packages (one-time setup):

npm login --registry=https://npm.pkg.github.com --scope=@dredozubov

Then run via npx:

npx @dredozubov/mcp-serp-clustering

Or install globally:

npm install -g @dredozubov/mcp-serp-clustering

Requirements

  • Node.js 18+

  • Python 3.8+ (for the clustering algorithm)

Claude Desktop Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "serp-clustering": {
      "command": "npx",
      "args": ["-y", "@dredozubov/mcp-serp-clustering"]
    }
  }
}

Note: You need to be authenticated with GitHub Packages for npx to work. Run this once:

npm login --registry=https://npm.pkg.github.com --scope=@dredozubov

Tool: cluster_keywords

Clusters keywords by analyzing URL overlap in SERP data.

Input

Parameter

Type

Required

Description

input_file

string

Yes

Path to CSV file with SERP data

output_clusters

string

Yes

Path where cluster results will be saved

output_overlap

string

Yes

Path where URL overlap matrix will be saved

Input CSV Format

keyword,position,url
best crm software,1,https://example.com/crm
best crm software,2,https://another.com/crm-guide
enterprise crm,1,https://example.com/crm
enterprise crm,2,https://different.com/enterprise

Output

Clusters CSV (output_clusters):

cluster_id,primary_keyword,cluster_keywords,keyword_count,shared_urls,shared_url_count,recommended_slug
1,best crm software,"best crm software, enterprise crm",2,"https://example.com/crm",1,best-crm-software

Overlap Matrix CSV (output_overlap):

keyword1,keyword2,shared_urls,overlap_count,overlap_score
best crm software,enterprise crm,https://example.com/crm,3,0.3

Algorithm

  1. Load SERP data (top 10 URLs for each keyword)

  2. Calculate URL intersection for all keyword pairs

  3. Build clusters greedily (highest overlap first)

  4. Keywords with 3+ shared URLs join the same cluster

  5. Unmatched keywords become single-keyword clusters

Example Usage

Given a file with SERP data from 100 keywords, the tool might produce:

  • 35 clusters (some with multiple keywords targeting same intent)

  • 65 single-keyword clusters (unique search intents)

This tells you: instead of 100 pages, you may only need 35 to cover all search intents.

Integration with SEO Workflows

This tool is designed to work with keyword research pipelines:

  1. Discovery: Generate keyword list with volumes

  2. SERP Fetch: Get top 10 URLs for each keyword (via Serper, DataForSEO, etc.)

  3. Clustering: Use this tool to group by intent

  4. Content Planning: One page per cluster, targeting all cluster keywords

License

MIT

Available Tools

1 tool
cluster_keywordsB

Cluster keywords by SERP overlap. Groups keywords that share 3+ URLs in top 10 results, indicating they should target the same page. Input must be a CSV file with columns: keyword, position, url

Inputs: input_file (required), output_overlap (required), output_clusters (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 1 tool

    Disambiguation5/5

    With a single tool there is no possible confusion about which tool to select. The tool's purpose—grouping keywords by SERP URL overlap—is stated explicitly and leaves no room for misselection.

    Naming Consistency5/5

    The lone name `cluster_keywords` follows the standard snake_case verb_noun convention. There are no competing conventions to clash with, so consistency is trivially satisfied.

    Tool Count3/5

    The server is genuinely single-purpose, so one tool is defensible, but it sits at the thin borderline where no auxiliary operations exist. There is no companion tool for validating inputs, previewing results, or exporting clusters.

    Completeness3/5

    The core clustering operation is covered, but the tool requires a pre-built CSV with a fixed schema and offers no way to inspect, filter, or format the resulting clusters. Minor gaps—input validation, output shape options, or fetching SERP data—force the agent to do extra workarounds.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Provides comprehensive SEO analysis by crawling websites and generating AI-powered keyword insights, search volume data, and competitor strategies. It delivers detailed reports on keyword clusters and commercial intent to help optimize digital marketing workflows.
      1
      1
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Advanced content gap analysis using Query Decomposition and Keyword Fan-Out (Google's patented methodology). Tells you exactly what user queries your content covers - and what it misses. Built on academic research because I needed to understand how AI search engines actually evaluate content.
      1
      163 npm
      15
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables semantic keyword clustering, search intent classification, cannibalization detection, and topical authority mapping for SEO workflows.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables SEO audits, keyword research, rank tracking, and Core Web Vitals reporting through an MCP interface using only free services.
      Apache 2.0