Connector guide7-minute read21 MCP tools7 languages

How to Connect Semrush to Gemini via MCP

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Semrush

Semrush

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

tools

21

Region

INTL

Category

Analytics

Authentication

Query Param Auth

Required env vars

SEMRUSH_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Semrush in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Try asking

Example prompts for Semrush

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Semrush · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Semrush, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Semrush + Gemini

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

SEMRUSH_API_KEY

Step 1 — Get credentials

  1. API access needs a Semrush SEO Business subscription plus an API units package, bought under Subscription info → API units (https://www.semrush.com/accounts/subscription-info/api-units/). A new Business plan starts with zero units.
  2. Open https://www.semrush.com/accounts/api-keys/active and copy an active v3 API key.
  3. Paste it into SEMRUSH_API_KEY and install the connector. The key is stored encrypted, added to each request by the connector and sent only to semrush.com.
  4. Start with semrush_get_api_units: it is free and shows how many API units the key has left.

Paid from your own Semrush API units: every report spends API units from your Semrush account, per line returned. It costs 10 units per line for the domain overview and its history, organic keywords, ranking pages, the keywords of a URL and the Google top 100 of a keyword (10 per keyword in a batch overview); 20 per line for paid keywords and broad-match ideas; 40 per line for organic competitors, related keywords, question keywords, backlinks and referring domains (40 per request for the backlinks overview); 50 per keyword for Keyword Difficulty; and 80 per line for Keyword Gap. Historical data with display_date costs five times as much. Reports return 10 lines unless you ask for more, and the AI raises that only when you need it. Fewer columns make a shorter answer but do not lower the price. When units run short, Semrush returns only the lines that were paid for.

Watch the all-country keyword report: semrush_keyword_overview_all_databases returns one line per country and cannot be limited: about 140 lines, up to 1,400 units. For one market, semrush_keyword_overview costs 10.

What it does: Domain Overview and its monthly history, in one country or in all of them; Organic and Advertising Research (the keywords a domain ranks for or buys Google Ads on); organic competitors and the pages that rank; Keyword Gap across up to five domains (shared, missing, unique and untapped keywords); volume, CPC, competition, intent, trend and Keyword Difficulty of one keyword or up to 100 at once; related, broad-match and question keywords; the Google top 100 Semrush recorded for a keyword; the keywords of a single URL; and Backlink Analytics with Authority Score, backlinks and referring domains. Every tool only reads.

Databases and filters: database is a two-letter country code (us, uk, de, it, fr, es and more). Mobile (mobile-us) and extended (us-ext) databases exist for domain reports only. Filters such as "volume above 1,000" or "positions 1 to 10" are sent in Semrush's own filter syntax, encoded by the connector.

Reading the answers: Semrush answers in semicolon-separated CSV with a header line and its column codes (Ph keyword, Po position, Nq search volume, Cp CPC in USD, Kd Keyword Difficulty, In intent and so on). The AI reads the codes for you.

Common errors: ERROR 50 :: NOTHING FOUND means Semrush has no data for this domain, keyword or database; check the spelling and the database rather than retrying. ERROR 120, 122 or 402: the API key is wrong; copy it again. ERROR 130 :: API DISABLED: the subscription has no API access. ERROR 132: no API units left (the backlinks reports also answer it for a key Semrush does not know). ERROR 133: the plan does not include this database. ERROR 429: too many requests at once; wait a moment.

The connector does not cover Projects, Position Tracking or Site Audit, the Trends (traffic) API, the Local and Listing Management APIs, or subdomain and subfolder reports.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell): anythingmcp should show as connected.
  4. Start prompting: Gemini CLI can now call the Semrush tools.

Available tools

ToolWhat it does
semrush_get_api_unitsShow how many Semrush API units this key has left
semrush_domain_overviewDomain overview in one Semrush database: Semrush rank, organic keywords, organic traffic and traffic cost, paid keywords, paid traffic and…
semrush_domain_overview_all_databasesThe same overview for every Semrush regional database at once (one line per country)
semrush_domain_historyMonthly history of a domain's organic and paid metrics in one database (rank, keywords, traffic, cost, date), newest first
semrush_domain_organic_keywordsKeywords a domain ranks for in Google's top 100 (Organic Research): position, previous position, volume, CPC, URL, traffic share, intent
semrush_domain_paid_keywordsKeywords a domain buys Google Ads for (Advertising Research): ad position, volume, CPC, visible URL, traffic share
semrush_domain_organic_competitorsOrganic search competitors of a domain: competitor relevance, common keywords, their organic keywords, traffic and cost
semrush_domain_organic_pagesA domain's pages that rank in Google's top 100, with the number of ranking keywords and traffic per page
semrush_keyword_gapCompare the keywords of up to five domains (Keyword Gap): shared, all, unique, missing or untapped keywords with each domain's position
semrush_keyword_overviewVolume, CPC, competition, number of results, trend, intent and difficulty of one keyword in one database
semrush_keyword_overview_all_databasesVolume, CPC and competition of one keyword in every regional database at once (one line per country), to compare markets
semrush_batch_keyword_overviewOverview of up to 100 keywords in one database in a single call: volume, CPC, competition, results, trend, intent, difficulty
semrush_keyword_organic_resultsThe organic Google results (SERP) Semrush recorded for a keyword: position, domain, URL and SERP features
semrush_related_keywordsRelated keywords, synonyms and variations of a keyword with volume, CPC, competition, difficulty, intent and relevance
semrush_broad_match_keywordsBroad-match keyword ideas that contain the given keyword, with volume, CPC, competition, difficulty and intent
semrush_keyword_questionsQuestion keywords (how, what, why...) that contain the given keyword, with volume, CPC, competition and difficulty
semrush_keyword_difficultyKeyword Difficulty (0 to 100) of up to 100 keywords: how hard it is to reach Google's top 10
semrush_url_organic_keywordsKeywords one URL ranks for in Google's top 100: position, volume, CPC, traffic share, intent
semrush_backlinks_overviewBacklink summary of a domain or URL: Authority Score, total backlinks, referring domains, URLs and IPs, follow and nofollow links, text and…
semrush_backlinksBacklinks of a domain or URL: Authority Score of the linking page, source title and URL, target URL, anchor, nofollow, first and last seen…
semrush_referring_domainsDomains that link to a domain or URL: Authority Score, number of backlinks, IP, country, first and last seen (Unix time)

Example prompts

  • "Give me the Semrush domain overview of example.com in the German database and how its organic traffic changed month by month this year."
  • "Run a keyword gap between example.com, competitor-a.com and competitor-b.com in the US database: which keywords do they rank for in the top 10 that we miss? 20 lines."
  • "Find question keywords around 'heat pump' with more than 500 searches a month, then check their keyword difficulty."
  • "Show the backlinks overview and Authority Score of competitor-a.com and its 20 strongest referring domains."
  • "How many Semrush API units do we have left?"

FAQ

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Your Semrush agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Semrush to ChatGPT via MCP

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Connectors

How to Connect Semrush to Claude via MCP

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Connectors

How to Connect Semrush to Cursor via MCP

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Connectors

How to Connect Semrush to Meta Muse via MCP

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Connectors

Semrush to MCP: SEO and Keyword Data for any AI Agent

Give your AI Semrush SEO data: domain overview and history, organic and paid keywords, competitors, keyword gap, keyword volume, difficulty and ideas, URL rankings and backlinks, with the API unit cost of every report.

Connectors

How to Connect Avito to Gemini via MCP

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.