semrush-mcp
MCP server providing tools to access Semrush API data for domain analytics, keyword research, backlink analysis, and traffic analytics.
README
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)
Setup
- Clone the repository
- Install dependencies:
npm install - Create a
.envfile with your Semrush API key:SEMRUSH_API_KEY=your_api_key_here - Build the project:
npm run build - Start the server:
npm run start
Environment Variables
| Variable | Description | Default |
|---|---|---|
SEMRUSH_API_KEY |
Your Semrush API key | (Required) |
API_CACHE_TTL_SECONDS |
Time to cache API responses | 300 |
API_RATE_LIMIT_PER_SECOND |
Maximum API requests per second | 10 |
NODE_ENV |
Environment (development/production) | development |
PORT |
Server port | 3000 |
LOG_LEVEL |
Logging level | info |
Available Tools
| Tool Name | Description | Required Parameters |
|---|---|---|
semrush_domain_overview |
Get domain overview data | domain, [database] |
semrush_domain_organic_keywords |
Get organic keywords for domain | domain, [database], [limit] |
semrush_domain_paid_keywords |
Get paid keywords for domain | domain, [database], [limit] |
semrush_competitors |
Get organic search competitors | domain, [database], [limit] |
semrush_backlinks |
Get backlinks for a domain/URL | target, [limit] |
semrush_backlinks_domains |
Get referring domains | target, [limit] |
semrush_keyword_overview |
Get keyword overview data | keyword, [database] |
semrush_related_keywords |
Find related keywords | keyword, [database], [limit] |
semrush_keyword_overview_single_db |
Get detailed keyword data for specific database | keyword, database |
semrush_batch_keyword_overview |
Analyze up to 100 keywords at once | keywords, database |
semrush_keyword_organic_results |
Get domains ranking in organic results | keyword, database, [limit] |
semrush_keyword_paid_results |
Get domains in paid search results | keyword, database, [limit] |
semrush_keyword_ads_history |
Get 12-month history of domains bidding on keyword | keyword, database, [limit] |
semrush_broad_match_keywords |
Get broad matches and alternate search queries | keyword, database, [limit] |
semrush_phrase_questions |
Get question-based keywords | keyword, database, [limit] |
semrush_keyword_difficulty |
Get difficulty index for ranking in top 10 | keywords, database |
semrush_traffic_summary |
Get traffic summary data for domains | domains, [country] |
semrush_traffic_sources |
Get traffic sources data | domain, [country] |
semrush_api_units_balance |
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 |
|---|---|
semrush_keyword_overview |
10 |
semrush_keyword_overview_single_db |
10 |
semrush_batch_keyword_overview |
10 |
semrush_keyword_organic_results |
10 |
semrush_keyword_paid_results |
20 |
semrush_related_keywords |
40 |
semrush_keyword_ads_history |
100 |
semrush_broad_match_keywords |
20 |
semrush_phrase_questions |
40 |
semrush_keyword_difficulty |
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-mcp
Option 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 build
Cursor 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:
command - Command:
semrush-mcp(if installed globally) ornode - Arguments: Leave empty if using global installation, or
/path/to/semrush-mcp/dist/index.jsif using local installation - Environment Variables:
SEMRUSH_API_KEY: Your Semrush API key- Other optional variables as needed
- Name:
- 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_here- Add other optional variables as needed
- Name:
- 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 dev
Security 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。