npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

serpstat-keyword-analysis

v0.1.0

Published

A comprehensive Model Context Protocol server for Serpstat Keyword Analysis API

Downloads

10

Readme

Serpstat Keyword Analysis MCP Server

A comprehensive Model Context Protocol (MCP) server for interacting with the Serpstat Keyword Analysis API. This server provides 12 different keyword analysis methods to help you with keyword research, competitor analysis, and content optimization.

Features

  • Keyword Research: Find keywords related to your target terms with volume, CPC, and competition data
  • Search Suggestions: Get keyword suggestions to expand your research
  • Keyword Information: Get detailed metrics for specific keywords including difficulty and intent
  • Related Keywords: Discover semantically related terms for topical authority
  • Competitor Analysis: Identify competitors for your target keywords
  • Top URLs: Analyze top-ranking pages for keyword variations
  • Ad Keywords: Analyze paid search competition and advertising opportunities
  • Export Capabilities: Export data in various formats for large-scale analysis

Installation

cd serpstat-keyword-analysis
npm install
npm run build
export SERPSTAT_API_KEY="your-api-key"

Usage

MCP Configuration

Configure in your MCP settings:

{
  "mcpServers": {
    "serpstat-keyword-analysis": {
      "command": "node",
      "args": ["/path/to/serpstat-keyword-analysis/build/index.js"],
      "env": {
        "SERPSTAT_API_KEY": "your-serpstat-api-key"
      }
    }
  }
}

Available Tools

Core Keyword Research

getKeywords Get keywords related to a specific keyword with volume, CPC, competition, and difficulty data.

{
  "name": "getKeywords",
  "arguments": {
    "keyword": "iphone",
    "se": "g_us",
    "withIntents": true,
    "filters": {
      "region_queries_count_from": 100000
    },
    "size": 10
  }
}

getSuggestions Get search suggestions for a keyword using full-text search.

{
  "name": "getSuggestions", 
  "arguments": {
    "keyword": "social security administration",
    "se": "g_us",
    "size": 5
  }
}

getKeywordsInfo Get detailed information about specific keywords including volume and difficulty.

{
  "name": "getKeywordsInfo",
  "arguments": {
    "keywords": ["iphone", "iphone 11"],
    "se": "g_us",
    "withIntents": true
  }
}

getRelatedKeywords Get related keywords for semantic analysis and content expansion.

{
  "name": "getRelatedKeywords",
  "arguments": {
    "keyword": "content marketing",
    "se": "g_us",
    "size": 15
  }
}

Analysis Tools

getTopUrls Get top URLs ranking for keyword variations.

{
  "name": "getTopUrls",
  "arguments": {
    "keyword": "best laptops",
    "se": "g_us",
    "size": 10
  }
}

getCompetitors Get competitors for specific keywords.

{
  "name": "getCompetitors",
  "arguments": {
    "keyword": "running shoes",
    "se": "g_us",
    "size": 20
  }
}

Paid Search Analysis

getAdKeywords Get ad keywords for specific keywords.

{
  "name": "getAdKeywords",
  "arguments": {
    "keyword": "insurance",
    "se": "g_us",
    "size": 15
  }
}

getAdsCompetitors Get ads competitors for specific keywords.

{
  "name": "getAdsCompetitors",
  "arguments": {
    "keyword": "mortgage rates",
    "se": "g_us",
    "size": 10
  }
}

Performance Analysis

getKeywordTop Get keyword performance in top positions.

{
  "name": "getKeywordTop",
  "arguments": {
    "keyword": "digital marketing",
    "se": "g_us",
    "size": 20
  }
}

getKeywordFullTop Get full keyword performance data.

{
  "name": "getKeywordFullTop",
  "arguments": {
    "keyword": "seo services",
    "se": "g_us",
    "size": 50
  }
}

Export Functions

exportKeywordsPhrase Export keywords data in various formats.

{
  "name": "exportKeywordsPhrase",
  "arguments": {
    "keyword": "content marketing",
    "se": "g_us",
    "size": 1000
  }
}

exportSuggestions Export suggestions data in various formats.

{
  "name": "exportSuggestions",
  "arguments": {
    "keyword": "social media marketing",
    "se": "g_us",
    "size": 500
  }
}

Common Parameters

Search Engine Codes

  • g_us - Google United States
  • g_uk - Google United Kingdom
  • g_de - Google Germany
  • g_ca - Google Canada
  • g_au - Google Australia
  • bing_us - Bing United States
  • 200+ Google variants supported

Filtering

All tools support advanced filtering:

{
  "filters": {
    "cost_from": 1,
    "cost_to": 10,
    "concurrency_from": 50,
    "region_queries_count_from": 10000,
    "difficulty_from": 30,
    "difficulty_to": 70,
    "minus_keywords": ["free", "cheap"]
  }
}

Sorting

Sort results by any field:

{
  "sort": {
    "region_queries_count": "desc",
    "cost": "asc"
  }
}

API Credits

  • Cost: 1 credit per result row for most methods
  • Maximum results: 60,000 rows per request
  • Rate limits: 1 request per second (standard), 10 requests per second (top-tier)

Response Format

All responses follow this structure:

{
  "result": {
    "data": [
      {
        "keyword": "example keyword",
        "cost": 1.25,
        "concurrency": 85,
        "found_results": 4500000,
        "region_queries_count": 12000,
        "difficulty": 45,
        "types": ["also_asks", "related_search"],
        "intents": ["informational"]
      }
    ],
    "summary_info": {
      "page": 1,
      "total": 150,
      "left_lines": 999850
    }
  }
}

Development

# Development with watch mode
npm run dev

# Type checking
npm run build:ts

# Run MCP inspector for testing
npm run inspector

Requirements

  • Node.js 18 or higher
  • Valid Serpstat API key
  • Model Context Protocol compatible client

Examples

Keyword Research Workflow

  1. Start with broad keywords:

    {
      "name": "getKeywords",
      "arguments": {
        "keyword": "digital marketing",
        "se": "g_us",
        "withIntents": true,
        "size": 50
      }
    }
  2. Get detailed metrics:

    {
      "name": "getKeywordsInfo", 
      "arguments": {
        "keywords": ["content marketing", "seo services", "social media marketing"],
        "se": "g_us",
        "withIntents": true
      }
    }
  3. Find related terms:

    {
      "name": "getRelatedKeywords",
      "arguments": {
        "keyword": "content marketing",
        "se": "g_us",
        "size": 30
      }
    }
  4. Analyze competitors:

    {
      "name": "getCompetitors",
      "arguments": {
        "keyword": "content marketing strategy",
        "se": "g_us",
        "size": 20
      }
    }

Content Strategy Development

  1. Find top-performing content:

    {
      "name": "getTopUrls",
      "arguments": {
        "keyword": "beginner guitar lessons",
        "se": "g_us",
        "size": 15
      }
    }
  2. Get content suggestions:

    {
      "name": "getSuggestions",
      "arguments": {
        "keyword": "how to play guitar",
        "se": "g_us",
        "size": 25
      }
    }

Error Handling

The server provides comprehensive error handling:

{
  "success": false,
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The provided API key is invalid or expired"
  }
}

Common error codes:

  • INVALID_API_KEY - Invalid or expired API key
  • RATE_LIMIT_EXCEEDED - Too many requests
  • INVALID_PARAMETERS - Missing or invalid parameters
  • INSUFFICIENT_CREDITS - Not enough API credits

Credit Management

Monitor your credit usage:

{
  "result": {
    "summary_info": {
      "left_lines": 999850
    }
  }
}

Each result row consumes 1 credit. Plan your requests accordingly to stay within your plan limits.

Tips for Effective Usage

  1. Start broad, then narrow down: Begin with general keywords, then use filters to refine
  2. Use intent analysis: Enable withIntents for US and UK databases to understand user intent
  3. Leverage filters: Use cost, difficulty, and volume filters to find valuable keywords
  4. Combine with domain analysis: Use keyword insights to inform your domain analysis strategy
  5. Export for large datasets: Use export functions for comprehensive analysis
  6. Monitor credit usage: Keep track of remaining credits to avoid interruptions

Integration with Other Serpstat MCP Servers

This keyword analysis server works seamlessly with:

  • serpstat-domain-analysis: Use keyword insights to analyze domain performance
  • serpstat-team-management: Manage team access to keyword research tools

Support

For API documentation and support:


Author: Benjamin Oldenburg
Date: 2025-09-03