Logo vun Semrush MCP Server

Semrush MCP Server

Communautéit
mrkooblu

A Model Context Protocol (MCP) server implementation that provides tools for accessing Semrush API data.

Editeurmrkooblu
Repositorysemrush-mcp
SproochTypeScript
Forks
12
Stären
39
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Semrush MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    39 Stären an 12 Forks aus dem verlinkte Repository.

Semrush MCP

MCP Server & CLI for keyword research, domain analytics, backlinks, traffic analysis, and competitive intelligence.

A community-maintained, self-hosted tool that provides Semrush API data through two entry points: an MCP server for AI assistants like Claude Desktop and Cursor, and a semrush CLI for direct terminal use — ideal for developers and AI coding agents like Claude Code that can run shell commands on your behalf. One install gives you both.

Quick Start

bash
npm install -g github:mrkooblu/semrush-mcp
export SEMRUSH_API_KEY=your_api_key_here

After installing, you have two commands:

  • semrush — CLI for terminal and agent use
  • semrush-mcp — MCP server on stdio for AI clients

CLI:

bash
semrush domain semrush.com           # Domain overview
semrush kw "seo tools"               # Keyword overview
semrush backlinks semrush.com        # Backlink analysis

MCP server (add to your AI client config):

json
{
  "mcpServers": {
    "semrush-mcp": {
      "command": "npx",
      "args": ["-y", "github:mrkooblu/semrush-mcp"],
      "env": {
        "SEMRUSH_API_KEY": "your-api-key"
      }
    }
  }
}

Features

  • Domain Analytics — Overview, rank tracking, rank history, organic/paid keywords, competitors, ads history, shopping, unique pages
  • URL Analytics — Organic/paid keywords, rank, rank history per URL
  • Subdomain Analytics — Rank, rank history, organic keywords per subdomain
  • Subfolder Analytics — Organic/paid keywords, rank, rank history, unique pages per subfolder
  • Keyword Research — Overview, related keywords, broad match, questions, SERP organic/paid results, ads history, difficulty
  • Backlink Analysis — Backlinks, referring domains, overview, pages, anchors, TLD distribution, categories
  • Traffic Analytics — Summary, sources, destinations, geo, subdomains, subfolders, top pages, rank, social media (requires .Trends)
  • Audience Intelligence — Audience insights, demographics, purchase conversion, interests (requires .Trends)
  • Projects API — List, create, update, delete projects
  • Site Audit — Audit info, snapshots, issues, pages, history, launch crawls
  • Keyword Gap Analysis — Compare two domains' keyword profiles side by side (CLI only)
  • API Units Balance — Check remaining API credits

All capabilities are available through both the MCP server (77 tools) and the CLI.

Installation

Install globally from GitHub

bash
npm install -g github:mrkooblu/semrush-mcp

Or clone and link locally

bash
git clone https://github.com/mrkooblu/semrush-mcp.git
cd semrush-mcp
npm install && npm run build && npm link

Set your API key in the environment or a .env file:

bash
export SEMRUSH_API_KEY=your_api_key_here

MCP Setup

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "semrush-mcp": {
      "command": "npx",
      "args": ["-y", "github:mrkooblu/semrush-mcp"],
      "env": {
        "SEMRUSH_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

  1. Go to Settings > MCP Servers > Add Server
  2. Configure:
    • Name: Semrush MCP
    • Type: command
    • Command: node
    • Arguments: /path/to/semrush-mcp/dist/index.js
    • Environment Variables: SEMRUSH_API_KEY=your_api_key

Other MCP Clients

Any MCP-compatible client can connect using stdio transport. Point it at semrush-mcp or node dist/index.js with the SEMRUSH_API_KEY environment variable set.

CLI Usage

The semrush CLI is built for both human use and AI coding agents like Claude Code that can invoke shell commands directly. All commands support -d, --database <db> (country code, default: us), -l, --limit <n>, and -f, --format <text|json>.

Quick Overview

Auto-detects keyword vs domain:

bash
semrush q "seo tools"              # Keyword overview
semrush q example.com              # Domain overview

Domain Analytics

bash
semrush domain semrush.com                    # Domain overview
semrush d example.com --organic -l 30         # Organic keywords
semrush d example.com --paid -l 20            # Paid keywords
semrush d example.com --competitors -l 10     # Competitors

Keyword Research

bash
semrush kw "content marketing"                # Basic overview
semrush kw "seo" --related -l 20              # Related keywords
semrush kw "marketing" --questions -l 10      # Question-based keywords
semrush kw "email marketing" --broad -l 15    # Broad match keywords
semrush kw "seo tools" --organic -l 10        # SERP organic results
semrush kw "ppc software" --paid -l 10        # SERP paid results

Keyword Difficulty

bash
semrush kd "seo" "content marketing" "link building"

Backlinks

bash
semrush bl example.com                        # Backlink overview
semrush bl example.com --domains -l 20        # Referring domains

Traffic Analytics

Requires .Trends API subscription.

bash
semrush traffic example.com                   # Traffic summary
semrush traffic example.com --sources         # Traffic sources

Keyword Gap Analysis

bash
semrush gaps mysite.com competitor.com -l 50

API Units Balance

bash
semrush units

Available MCP Tools

Domain Analytics (13 tools)

ToolDescription
semrush_domain_overviewDomain overview — traffic, keywords, rankings across all databases
semrush_domain_rankDomain rank in a specific database
semrush_domain_rank_historyHistorical rank data for a domain
semrush_rank_differenceDomains with biggest rank changes
semrush_domain_organic_keywordsOrganic keywords for a domain
semrush_domain_paid_keywordsPaid keywords for a domain
semrush_competitorsOrganic search competitors
semrush_paid_competitorsPaid search competitors
semrush_domain_ads_historyDomain's ad history over time
semrush_domain_organic_uniqueUnique organic pages for a domain
semrush_domain_adwords_uniqueUnique paid ad pages for a domain
semrush_domain_shoppingShopping/PLA keywords for a domain
semrush_domain_shopping_uniqueUnique shopping ad pages

URL Analytics (5 tools)

ToolDescription
semrush_url_organicOrganic keywords for a specific URL
semrush_url_adwordsPaid keywords for a specific URL
semrush_url_rankRank data for a specific URL
semrush_url_rank_historyHistorical rank data for a URL
semrush_url_ranksRank across all databases for a URL

Subdomain Analytics (4 tools)

ToolDescription
semrush_subdomain_rankRank data for a subdomain
semrush_subdomain_ranksRank across all databases for a subdomain
semrush_subdomain_rank_historyHistorical rank data for a subdomain
semrush_subdomain_organicOrganic keywords for a subdomain

Subfolder Analytics (7 tools)

ToolDescription
semrush_subfolder_organicOrganic keywords for a subfolder
semrush_subfolder_adwordsPaid keywords for a subfolder
semrush_subfolder_rankRank data for a subfolder
semrush_subfolder_ranksRank across all databases for a subfolder
semrush_subfolder_rank_historyHistorical rank data for a subfolder
semrush_subfolder_organic_uniqueUnique organic pages in a subfolder
semrush_subfolder_adwords_uniqueUnique paid ad pages in a subfolder

Backlinks (7 tools)

ToolDescription
semrush_backlinksBacklinks for a domain/URL
semrush_backlinks_domainsReferring domains
semrush_backlinks_overviewBacklinks summary stats
semrush_backlinks_pagesPages with most backlinks
semrush_backlinks_anchorsAnchor text distribution
semrush_backlinks_tldTLD distribution of backlinks
semrush_backlinks_categoriesCategory distribution of backlinks

Keyword Research (10 tools)

ToolDescription
semrush_keyword_overviewKeyword overview across all databases
semrush_keyword_overview_single_dbDetailed keyword data for specific database
semrush_batch_keyword_overviewAnalyze up to 100 keywords at once
semrush_related_keywordsRelated keyword discovery
semrush_broad_match_keywordsBroad match / alternate queries
semrush_phrase_questionsQuestion-based keywords
semrush_keyword_organic_resultsDomains ranking in organic results
semrush_keyword_paid_resultsDomains in paid search results
semrush_keyword_ads_history12-month history of domains bidding on a keyword
semrush_keyword_difficultyDifficulty index for ranking in top 10

Traffic & Audience (17 tools, requires .Trends subscription)

ToolDescription
semrush_traffic_summaryTraffic summary for domains
semrush_traffic_sourcesTraffic sources breakdown
semrush_traffic_destinationsWhere traffic goes after visiting
semrush_traffic_geoGeographic distribution of traffic
semrush_traffic_subdomainsTraffic by subdomain
semrush_traffic_subfoldersTraffic by subfolder
semrush_traffic_top_pagesHighest-traffic pages
semrush_traffic_rankTraffic rank over time
semrush_traffic_social_mediaSocial media traffic breakdown
semrush_audience_insightsAudience overlap between domains
semrush_purchase_conversionPurchase conversion metrics
semrush_household_distributionHousehold size demographics
semrush_income_distributionIncome demographics
semrush_education_distributionEducation level demographics
semrush_occupation_distributionOccupation demographics
semrush_audience_interestsAudience interest categories
semrush_traffic_accuracyTraffic data accuracy estimates

Projects & Site Audit (13 tools)

ToolDescription
semrush_list_projectsList all projects
semrush_get_projectGet project details
semrush_create_projectCreate a new project
semrush_update_projectUpdate project settings
semrush_delete_projectDelete a project
semrush_site_audit_infoSite audit configuration and status
semrush_site_audit_snapshotsList audit snapshots
semrush_site_audit_snapshot_detailGet snapshot details
semrush_site_audit_issuesAudit issue metadata
semrush_site_audit_pagesList audited pages
semrush_site_audit_page_detailPage-level audit details
semrush_site_audit_historyAudit history
semrush_site_audit_launchLaunch a new audit crawl

Utility (1 tool)

ToolDescription
semrush_api_units_balanceCheck API units balance

CLI-Only Commands

CLI CommandDescription
semrush gaps <d1> <d2>Keyword gap analysis between two domains

Configuration

Requires SEMRUSH_API_KEY in environment or .env file.

VariableDefaultDescription
SEMRUSH_API_KEY(required)Your Semrush API key
API_CACHE_TTL_SECONDS300Cache TTL for API responses
API_RATE_LIMIT_PER_SECOND10Maximum API requests per second
NODE_ENVdevelopmentEnvironment mode
LOG_LEVELinfoLogging level

API Units Consumption

API requests consume units from your Semrush account. Different reports have different costs:

ToolAPI Units per Line
semrush_keyword_overview10
semrush_keyword_overview_single_db10
semrush_batch_keyword_overview10
semrush_keyword_organic_results10
semrush_keyword_paid_results20
semrush_broad_match_keywords20
semrush_related_keywords40
semrush_phrase_questions40
semrush_keyword_difficulty50
semrush_keyword_ads_history100

Check your balance anytime with semrush units or the semrush_api_units_balance MCP tool.

Development

bash
git clone https://github.com/mrkooblu/semrush-mcp.git
cd semrush-mcp
npm install
cp .env.example .env   # add your SEMRUSH_API_KEY
bash
npm run dev              # MCP server in dev mode (tsx, hot reload)
npm run build            # Compile TypeScript to dist/
npm test                 # Run all tests
npm run test:unit        # Unit tests only (no API key needed)
npm run test:integration # Integration tests (requires SEMRUSH_API_KEY)
npm run lint             # ESLint
npm run format           # Prettier

Git Hooks

This project uses Husky for git hooks:

  • Pre-commit: lint-staged, ESLint, TypeScript type-check, unit tests, secret detection
  • Pre-push: uncommitted changes check, full build, integration tests (requires SEMRUSH_API_KEY)

Why Self-Host?

This self-hosted tool is for users who need more control:

  • Full control over API calls and caching — configure TTL, inspect raw responses
  • Custom rate limiting — set your own requests-per-second limits
  • Self-hosted / air-gapped — runs entirely on your machine, no external MCP endpoint
  • CLI for agents — AI coding agents can invoke semrush directly without MCP
  • Open source — MIT licensed, fork and customize to your needs

Security

  • Never share your Semrush API key publicly
  • API key provides access to your API units balance
  • Exposing credentials can lead to unauthorized API usage and unexpected charges

Hosted Alternative

Semrush also offers an official hosted MCP connector at https://mcp.semrush.com/v1/mcp — no setup required, authenticate with your Semrush account. See Getting Started with MCP for details.

This is a personal project and not an official Semrush product.

License

MIT

Installatioun

TypingMind
{
  "mcpServers": {
    "semrush-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "github:mrkooblu/semrush-mcp"
      ],
      "env": {
        "SEMRUSH_API_KEY": "<SEMRUSH_API_KEY>"
      }
    }
  }
}

Semrush MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Semrush MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Semrush MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Semrush MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "semrush-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "semrush-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Semrush MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Semrush MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Semrush MCP Server?
Semrush MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat Semrush MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Semrush MCP Server benotzt?

Semrush MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Semrush MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Semrush MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Semrush MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Semrush MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Semrush MCP Server MCP mat TypingMind?

Semrush MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Semrush MCP Server MCP an TypingMind zur Verfügung?

Semrush MCP Server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Semrush MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Semrush MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇