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

@iflow-mcp/semrush-mcp

v1.0.0

Published

MCP server for Semrush API integration

Downloads

100

Readme

Semrush MCP Server

An MCP (Model Context Protocol) server that provides access to Semrush API functionality for AI assistants.

Features

  • Domain Overview: Get comprehensive domain analytics including organic traffic, keywords, and authority score
  • Keyword Research: Analyze keyword metrics including search volume, difficulty, and CPC
  • Organic Search Analysis: Retrieve organic search keywords and rankings for any domain
  • Paid Search Analysis: Get Google Ads keywords and PPC data for domains
  • Backlinks Overview: Get backlink metrics and analysis for domains or specific URLs
  • Competitor Research: Identify and analyze organic competitors
  • Related Keywords: Discover related keywords and search suggestions

Prerequisites

  • Node.js 18+
  • A Semrush API key (get one at https://www.semrush.com/api/)

Installation

  1. Clone this repository or create a new directory:
mkdir semrush-mcp
cd semrush-mcp
  1. Create the following directory structure:
semrush-mcp/
├── src/
│   └── index.ts
├── package.json
├── tsconfig.json
├── .env.example
├── .gitignore
└── README.md
  1. Save the provided files in their respective locations

Then manually:

npm install
npm run build

Configuration

Set your Semrush API key as an environment variable:

export SEMRUSH_API_KEY="your-api-key-here"

Or create a .env file:

SEMRUSH_API_KEY=your-api-key-here

Usage with Claude Desktop

Add the server to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "semrush": {
      "command": "node",
      "args": ["/path/to/semrush-mcp-server/dist/index.js"],
      "env": {
        "SEMRUSH_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available Tools

1. domain_overview

Get comprehensive domain analytics.

Parameters:

  • domain (required): Domain to analyze (e.g., "example.com")
  • database (optional): Database code (default: "us")

2. keyword_overview

Get keyword metrics and data.

Parameters:

  • phrase (required): Keyword phrase to analyze
  • database (optional): Database code (default: "us")

3. domain_organic_search

Get organic search keywords for a domain.

Parameters:

  • domain (required): Domain to analyze
  • database (optional): Database code (default: "us")
  • limit (optional): Number of results (default: 10)
  • offset (optional): Offset for pagination (default: 0)

4. backlinks_overview

Get backlinks overview for a domain or URL.

Parameters:

  • target (required): Domain or URL to analyze
  • target_type (optional): "domain" or "url" (default: "domain")

5. competitor_research

Find organic competitors for a domain.

Parameters:

  • domain (required): Domain to analyze
  • database (optional): Database code (default: "us")
  • limit (optional): Number of competitors (default: 10)

6. domain_adwords

Get paid search (Google Ads) keywords for a domain.

Parameters:

  • domain (required): Domain to analyze
  • database (optional): Database code (default: "us")
  • limit (optional): Number of results (default: 10)

7. related_keywords

Get related keywords and suggestions for a seed keyword.

Parameters:

  • phrase (required): Seed keyword phrase
  • database (optional): Database code (default: "us")
  • limit (optional): Number of results (default: 10)

Database Codes

Common database codes for different regions:

  • us - United States
  • uk - United Kingdom
  • ca - Canada
  • au - Australia
  • de - Germany
  • fr - France
  • es - Spain
  • it - Italy
  • br - Brazil
  • in - India

Development

To run the server in development mode:

npm run dev

Example Usage in Claude

Once configured, you can use natural language to access Semrush data:

  • "Analyze the domain example.com using Semrush"
  • "What's the search volume for 'digital marketing' keyword?"
  • "Show me the top organic keywords for techcrunch.com"
  • "Find competitors for shopify.com"
  • "Get backlink data for https://metehan.ai/blog/semrush-mcp/"
  • "What related keywords can you find for 'content marketing'?"
  • "Show me the Google Ads keywords that amazon.com is bidding on"

Troubleshooting

  1. API Key Issues: Ensure your SEMRUSH_API_KEY environment variable is set correctly
  2. Rate Limits: Semrush API has rate limits. Check your plan's limits
  3. Database Codes: Make sure you're using valid database codes for your target regions

License

MIT