semrush-mcp
Provides tools for domain analytics (overview, organic/paid keywords, competitors), keyword analytics (overview, related keywords, difficulty), backlink analysis, and traffic analytics using the Semrush API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@semrush-mcp what are the top organic keywords for openai.com?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Semrush MCP Server
A Model Context Protocol (MCP) server implementation that provides tools for accessing Semrush API data.
Features
The Semrush MCP server provides tools for:
Domain Analytics
Domain overview information
Organic and paid keywords analysis
Competitor analysis
Keyword Analytics
Keyword overview data
Related keyword discovery
Backlink Analysis
Backlink data
Referring domains analysis
Traffic Analytics
Traffic summary for domains
Traffic sources analysis
(Note: Requires .Trends API subscription)
Related MCP server: Majestic MCP Server
Setup
Clone the repository
Install dependencies:
npm installCreate a
.envfile with your Semrush API key:SEMRUSH_API_KEY=your_api_key_hereBuild the project:
npm run buildStart the server:
npm run start
Environment Variables
Variable | Description | Default |
| Your Semrush API key | (Required) |
| Time to cache API responses | 300 |
| Maximum API requests per second | 10 |
| Environment (development/production) | development |
| Server port | 3000 |
| Logging level | info |
Available Tools
Tool Name | Description | Required Parameters |
| Get domain overview data | domain, [database] |
| Get organic keywords for domain | domain, [database], [limit] |
| Get paid keywords for domain | domain, [database], [limit] |
| Get organic search competitors | domain, [database], [limit] |
| Get backlinks for a domain/URL | target, [limit] |
| Get referring domains | target, [limit] |
| Get keyword overview data | keyword, [database] |
| Find related keywords | keyword, [database], [limit] |
| Get detailed keyword data for specific database | keyword, database |
| Analyze up to 100 keywords at once | keywords, database |
| Get domains ranking in organic results | keyword, database, [limit] |
| Get domains in paid search results | keyword, database, [limit] |
| Get 12-month history of domains bidding on keyword | keyword, database, [limit] |
| Get broad matches and alternate search queries | keyword, database, [limit] |
| Get question-based keywords | keyword, database, [limit] |
| Get difficulty index for ranking in top 10 | keywords, database |
| Get traffic summary data for domains | domains, [country] |
| Get traffic sources data | domain, [country] |
| Check API units balance | check: true |
Parameters in [brackets] are optional.
API Units Consumption
API requests to Semrush consume API units from your account. Different types of requests have different costs. You can check your API units balance using the semrush_api_units_balance tool.
Keyword Reports API Units Consumption
Tool | API Units per Line |
| 10 |
| 10 |
| 10 |
| 10 |
| 20 |
| 40 |
| 100 |
| 20 |
| 40 |
| 50 |
Adding to Cursor, Claude, or Cline
You can add this MCP server to various AI coding assistants:
Installation Options
Option 1: Install Globally (Recommended)
Install the package globally to use it with any AI assistant:
npm install -g semrush-mcpOption 2: Install from Source
Clone and build the repository:
git clone https://github.com/thomaswawra/semrush-mcp.git
cd semrush-mcp
npm install
npm run buildCursor Configuration
In Cursor, go to Settings > MCP Servers
Click "Add Server"
Configure the server with the following settings:
Name:
Semrush MCP(or any name you prefer)Type:
commandCommand:
semrush-mcp(if installed globally) ornodeArguments: Leave empty if using global installation, or
/path/to/semrush-mcp/dist/index.jsif using local installationEnvironment Variables:
SEMRUSH_API_KEY: Your Semrush API keyOther optional variables as needed
Click "Save"
Claude Desktop Configuration
Open Claude Desktop
Go to Settings > MCP Servers
Click "Add Server"
Configure with these settings:
Name:
Semrush MCP(or any name you prefer)Command:
semrush-mcp(if installed globally) ornode /path/to/semrush-mcp/dist/index.js(for local installation)Environment Variables:
SEMRUSH_API_KEY=your_api_key_hereAdd other optional variables as needed
Click "Save"
Cline Configuration
Create or edit your Cline configuration file (usually at
~/.config/cline/config.json)Add the Semrush MCP server to the
mcpServerssection:
{
"mcpServers": {
"semrush-mcp": {
"command": "npx",
"args": ["-y", "semrush-mcp"],
"env": {
"SEMRUSH_API_KEY": "your_api_key_here"
},
"transportType": "stdio"
}
}
}For a specific version, use:
{
"mcpServers": {
"semrush-mcp": {
"command": "npx",
"args": ["-y", "semrush-mcp@0.1.1"],
"env": {
"SEMRUSH_API_KEY": "your_api_key_here"
},
"transportType": "stdio"
}
}
}For local installation, use:
{
"mcpServers": {
"semrush-mcp": {
"command": "node",
"args": ["/path/to/semrush-mcp/dist/index.js"],
"env": {
"SEMRUSH_API_KEY": "your_api_key_here"
},
"transportType": "stdio"
}
}
}Development
To run the server in development mode:
npm run devSecurity Notes
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
License
Available Tools
19 toolssemrush_api_units_balanceB
Check the remaining API units balance
Inputs: check (required).
semrush_backlinksB
Get backlinks for a specific domain or URL
Inputs: target (required), limit.
semrush_backlinks_domainsB
Get referring domains for a specific domain or URL
Inputs: target (required), limit.
semrush_batch_keyword_overviewB
Analyze up to 100 keywords at once in a specific database (10 API units per line)
Inputs: keywords (required), database (required).
semrush_broad_match_keywordsB
Get broad matches and alternate search queries for a keyword (20 API units per line)
Inputs: keyword (required), database (required), limit.
semrush_competitorsC
Get competitors for a specific domain in organic search
Inputs: domain (required), database, limit.
semrush_domain_organic_keywordsB
Get organic keywords for a specific domain
Inputs: domain (required), database, limit.
semrush_domain_overviewC
Get domain overview data including organic/paid search traffic, keywords, and rankings
Inputs: domain (required), database.
semrush_domain_paid_keywordsB
Get paid keywords for a specific domain
Inputs: domain (required), database, limit.
semrush_keyword_ads_historyB
Get domains that bid on a keyword in the last 12 months (100 API units per line)
Inputs: keyword (required), database (required), limit.
semrush_keyword_difficultyB
Get difficulty index for ranking in Google's top 10 (50 API units per line)
Inputs: keywords (required), database (required).
semrush_keyword_organic_resultsB
Get domains ranking in Google's top 100 for a keyword (10 API units per line)
Inputs: keyword (required), database (required), limit.
semrush_keyword_overviewC
Get overview data for a specific keyword
Inputs: keyword (required), database.
semrush_keyword_overview_single_dbB
Get detailed overview data for a keyword from a specific database (10 API units per line)
Inputs: keyword (required), database (required).
semrush_keyword_paid_resultsA
Get domains in Google's paid search results for a keyword (20 API units per line)
Inputs: keyword (required), database (required), limit.
semrush_phrase_questionsB
Get question-based keywords related to a term (40 API units per line)
Inputs: keyword (required), database (required), limit.
semrush_traffic_sourcesB
Get traffic sources data for a domain (requires .Trends API access)
Inputs: domain (required), country.
semrush_traffic_summaryC
Get traffic summary data for domains (requires .Trends API access)
Inputs: domains (required), country.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have distinct purposes, but keyword-related tools (e.g., keyword_overview, keyword_overview_single_db, batch_keyword_overview, related_keywords, broad_match_keywords) could be confused by an agent despite detailed descriptions.
All tools follow the consistent pattern 'semrush_<object>_<action>' or 'semrush_<action>_<object>', using snake_case throughout, making naming predictable.
19 tools cover a comprehensive range of SEO functionalities (keywords, backlinks, competitors, traffic) without being excessive or sparse for the API's scope.
Core SEO workflows are well-covered, including keyword research, domain analysis, backlinks, and traffic. Minor gaps exist, like rank tracking or site audit, but overall surface is solid.
Maintenance
Related MCP Connectors
Semrush MCP Pack — SEO analytics via the Semrush Analytics API.
SEO MCP server for keyword research, SERP analysis, audits, and Search Console workflows.
SEO MCP server for keyword research, live SERPs, backlinks, site audits and AI visibility.
SEO MCP server — backlinks, domain authority, tech stack, and 18+ tools via Common Crawl.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that integrates with the Haloscan SEO API to provide tools for keyword research, SERP analysis, and domain performance tracking. It enables users to perform comprehensive SEO tasks, including competitor analysis and visibility monitoring, within MCP-compatible clients.33113 npm1MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides access to the Majestic SEO API, allowing users to retrieve metrics like Trust Flow, Citation Flow, and backlink data. It enables domain comparisons, anchor text analysis, and tracking of new or lost backlinks through nine specialized tools.97 npmMIT
- AlicenseBqualityCmaintenanceMCP server & CLI for keyword research, domain analytics, backlinks, traffic analysis, and competitive intelligence using Semrush API data.7773 npm40MIT
- AlicenseCqualityDmaintenanceMCP server for Keys.so SEO API, enabling domain and keyword analysis, competitor research, and SEO metrics retrieval through natural language.1514ISC