MCP
Connect agents to the same research and project operations.
First complete semrush-cli setup and authentication. Add this to your MCP client's configuration:
{
"mcpServers": {
"semrush": {
"command": "semrush-cli",
"args": ["mcp"]
}
}
}If your client cannot find global npm executables, use the absolute path printed by command -v semrush-cli, or configure:
{
"mcpServers": {
"semrush": {
"command": "npx",
"args": ["-y", "semrush-cli@0.3.0", "mcp"]
}
}
}Tool names use underscores, such as domain_overview, keyword_magic and backlink_gap. Their inputs use the same schema keys as the CLI, with underscores instead of hyphens.
{
"name": "keyword_magic",
"arguments": {
"keyword": "email marketing",
"database": "us",
"page": 2,
"page_size": 20
}
}The server sends only MCP protocol messages to stdout. The 62 read tools have readOnlyHint:true. The 19 write tools have
readOnlyHint:false and require confirm:true. Delete and leave also have
destructiveHint:true. Use dry_run:true to validate and inspect a write without
connecting to Semrush. A write without confirmation fails before authentication.
Login, daemon management, arbitrary URLs and JavaScript execution are not exposed. Report calls can still consume normal account allowances.
Tool errors have isError: true. Reimport an expired session and restart or reconnect the MCP process. Each process owns and cleans up its transient browser.