How to integrate Semrush MCP with Grok Build

Connect Grok Build to Semrush MCP. Show top anchor texts for example.com, compare backlink profiles for three domains, and more from your terminal, with authentication handled for you.

Semrush logoSemrush
Api Key

Semrush is a leading SEO tool suite for keyword research, competitor analysis, and campaign tracking. It empowers marketers to improve search rankings and optimize online visibility.

74 Tools

How to integrate Semrush MCP with Grok Build

Grok Build is xAI's terminal coding agent. It runs on Grok 4.5, plans its work before it acts, and can run multiple sub-agents in parallel. It also reads Claude Code's MCP configuration, so any server you already have in a .mcp.json is picked up with no changes.

In this guide, I will show you how to connect your Semrush account to Grok Build through Composio, so it can show top anchor texts for example.com, compare backlink profiles for three domains, get keyword overview for 'organic coffee', and more without leaving the terminal. Composio holds the OAuth tokens for you, and Grok Build only calls the tools you approve.

Also integrate Semrush with

Why use Composio over a standalone MCP server?

  • Read and write access. Composio's Semrush integration lets Grok Build take real actions like creating drafts, sending updates, and labeling records, not just reading data.
  • 1,500+ SaaS toolkits out of the box. One endpoint gives you a full catalog of pre-built connectors, from Gmail and Slack to Notion, Linear, and Salesforce.
  • One MCP server for every app. Wire up a single Composio server instead of maintaining a separate MCP entry for each app.
  • Smart, context-aware tool loading. Grok Build caps how many tools it holds in a single request. Composio loads only the tools a task needs, so you do not spend that budget on tools you are not using.
  • Cross-app automation. Chain actions across apps in one run. Pull a thread, summarize it in Notion, and post the highlights to Slack from a single prompt.

Prerequisites

  • Grok Build installed and signed in. Install with curl -fsSL https://x.ai/cli/install.sh | bash on macOS or Linux, or irm https://x.ai/cli/install.ps1 | iex on Windows PowerShell. On first launch Grok opens a browser to authenticate; for headless or CI use, set an XAI_API_KEY environment variable instead (create the key at console.x.ai).
  • Access to the Semrush account you want to connect.
  • The Composio MCP endpoint. Composio's server is remote and hosted, so there is nothing to run locally and no tunnel to set up.

Step-by-step: Connect Semrush to Grok Build

1. Install and verify Grok Build

Install the CLI, then restart your shell so the grok binary lands on your PATH:

bash
curl -fsSL https://x.ai/cli/install.sh | bash
which grok

On Windows, install with PowerShell instead: irm https://x.ai/cli/install.ps1 | iex. If which grok returns a path, you are set. Grok Build runs on Grok 4.5 by default; you can switch models inside the session with /model <name>.

2. Add the Composio server

Add Composio as a remote HTTP MCP server with the grok mcp add command:

bash
grok mcp add --transport http composio https://connect.composio.dev/mcp

You can also add and manage servers from inside a session. Run /mcps to open the extensions modal on the MCP tab, then add a new server and paste the Composio URL. Added this way, Grok auto-detects the name from the URL and lists the server as connect:

bash
https://connect.composio.dev/mcp
Grok Build /mcps extensions modal listing MCP servers Grok Build adding the Composio MCP server with its URL

Grok also reads Claude Code-style config, so an entry in ~/.grok/config.toml or a project .mcp.json works the same way.

3. Authenticate

Composio uses OAuth. In the /mcps modal, select the Composio server and press i to authenticate (Grok also triggers this browser flow automatically the first time it uses a Composio tool). Click Allow to authorize access. Grok stores the tokens under ~/.grok/mcp_credentials.json, and /mcps shows Composio as connected.

Grok Build prompting to authenticate the Composio MCP server Composio authorization screen with the Allow button for Grok Build

4. Start building

Ask Grok to work with your Semrush account through Composio. On the first Semrush action, Composio prompts you to connect the account through OAuth. Approve the scopes once, and Composio handles token refresh from there.

What you can do after connecting Semrush

  • Show top anchor texts for example.com
  • Compare backlink profiles for three domains
  • Get keyword overview for 'organic coffee'
  • List ad copies seen for your competitor

Security + privacy notes (important)

  • Use least-privilege access. Grant only the Semrush scopes you actually need.
  • Review OAuth scopes before approving. Check that the requested scopes match what you expect Composio and Grok Build to do.
  • Keep write actions human-reviewed. Grok Build proposes a plan before it acts. Leave that approval step on for actions like sending messages or editing records.
  • Keep secrets out of version control. Your XAI_API_KEY and any tokens should never be committed. Use environment variables or a secrets manager.
TOOLS

Supported Tools

Every Semrush action and event your agent gets out of the box.

Check Semrush account units balance

Fetch remaining Semrush Standard API units for a legacy v3 connection.

Add Semrush review comment

Publish an owner comment to a review that supports replies.

Get ad copies

Retrieves unique ad copies Semrush has observed for a specified domain from a regional database, detailing ads seen in Google's paid search results.

Get competitors in organic search

Use to get a domain's organic search competitors from Semrush as a semicolon-separated string; `display_date` requires 'YYYYMM15' format if used.

Get competitors in paid search

Retrieves a list of a domain's competitors in paid search results from a specified regional database.

Create Semrush GBP post

Create a draft, scheduled, or ready-to-send GBP post.

Create Listing Management location

Create a Semrush Listing Management location.

Create location image

Add a base64-encoded JPEG or PNG image to a Semrush Listing Management location using a read-write v4 key and Local Pro or Business.

Manage Semrush GBP suggestion

Start accepting or rejecting an open GBP suggestion.

Delete Semrush GBP post

Permanently delete a DRAFT, SCHEDULED, or TO_SEND GBP post.

Delete Listing Management location

Permanently delete an eligible location using a read-write v4 key and Local plan.

Delete location image

Permanently delete an image using a read-write v4 key and Local plan.

Delete Semrush review comment

Permanently remove a public review comment.

Disable location listing

Stop distribution for a controllable listing; a parent may affect child listings.

Get domain ad history

Retrieves a domain's 12-month advertising history from Semrush (keywords bid on, ad positions, ad copy) for PPC strategy and competitor analysis; most effective when the domain has ad history in the selected database.

Get domain organic pages

Fetches a report on a domain's unique organic pages ranking in Google's top 100 search results, with options for specifying database, date, columns, sorting, and filtering.

Get domain organic search keywords

Retrieves organic search keywords for a domain from a specified Semrush regional database; `display_positions` must be set if `display_daily=1` for daily updates.

Get domain organic subdomains

Retrieves a report on subdomains of a given domain that rank in Google's top 100 organic search results for a specified regional database.

Get domain paid search keywords

Fetches keywords driving paid search traffic to a specified, existing domain using a supported Semrush regional database.

Get PLA search keywords for a domain

Retrieves Product Listing Ad (PLA) search keywords for a specified domain from a Semrush regional database.

Compare domains

Analyzes keyword rankings by comparing up to five domains to find common, unique, or gap keywords, using specified organic/paid types and comparison logic in the `domains` string.

Enable location listing

Resume distribution for a controllable disconnected listing.

Get Semrush GBP metrics

Return GBP metrics for up to five locations.

Get Listing Management location

Get one Listing Management location using a v4 key and Local Pro or Business.

Get Semrush review auto-reply config

Return review auto-reply settings for a location.

Get Semrush review overview

Return review counts, rating distribution, and reply statistics.

List Semrush GBP additional-hour types

Return additional business-hour types available for a GBP location.

List Semrush GBP attributes

Return GBP attributes and allowed values for a category and country.

List Semrush GBP categories

Return GBP categories supported in a country.

List Semrush GBP posts

Return filtered GBP posts for one or more Semrush locations.

List Semrush GBP suggestions

Return GBP data-change suggestions for one or more active locations.

List Listing Management locations

List locations using a v4 key and Local Pro or Business; uses no API units.

List location categories

List Semrush Local business categories supported for a country.

List location images

List location images using a v4 key and Local Pro or Business.

List location listings

Get directory listings using a v4 key and Local Pro or Business.

List location payment options

Get payment options using a v4 key and Local Pro or Business.

List Semrush location reviews

Return a filtered, paginated list of reviews for a Semrush location.

Collect Map Rank Tracker campaign data (consumes credits)

Start a data-collection mutation that creates a new campaign report.

Create Map Rank Tracker campaign

Create persistent Map Rank Tracker campaign data.

Delete Map Rank Tracker campaign

Permanently delete a campaign and all its collected data.

Get Map Rank Tracker campaign

Get one Map Rank Tracker campaign without consuming API units.

Get Map Rank Tracker heatmap

Get a campaign heatmap for one keyword and report timestamp.

Get Map Rank Tracker keyword statuses

Get campaign keyword statuses for the latest or a specified report.

Get Map Rank Tracker metrics

Get average-position and share-of-voice history for one keyword.

Get Map Rank Tracker user limits

Get campaign-slot and monthly Map Rank Tracker credit limits.

List Map Rank Tracker campaigns

List and filter Map Rank Tracker campaigns without consuming API units.

List Map Rank Tracker top competitors

Get a paginated competitor ranking for one keyword and report.

Update Map Rank Tracker campaign

Mutate selected settings of an existing Map Rank Tracker campaign.

Get PLA competitors

Retrieves domains competing with a specified domain in Google's Product Listing Ads (PLA) from a given Semrush regional database.

Get PLA copies

Fetches Product Listing Ad (PLA) copies that Semrush observed for a domain in Google's paid search results.

Update Semrush GBP post

Update a DRAFT, SCHEDULED, or TO_SEND GBP post.

Update Listing Management location

Patch selected fields on a Semrush Listing Management location.

Update location image

Replace a location image caption using a read-write v4 key and Local Pro or Business.

Replace Semrush review auto-reply config

Replace all review auto-reply settings for a location.

Update Semrush review comment

Replace the public text of an editable review comment.

List v4 backlink anchors

List v4 backlink anchors for a URL or domain.

Get v4 authority score profile

Get the v4 referring-domain authority-score distribution.

List v4 backlink competitors

List v4 backlink competitors based on referring-domain overlap.

List v4 backlinks

List v4 backlinks with field selection, filtering, sorting, and pagination.

Compare v4 backlink summaries

Compare v4 backlink summaries for up to ten targets.

Get v4 backlinks historical summary

Get monthly v4 backlink history for a URL or domain.

Get v4 backlinks matrix

Compare shared referring domains and backlinks for up to six targets.

Get v4 backlinks overview

Get aggregated v4 backlink metrics for a URL or domain.

Create v4 project

Create a Semrush v4 project for a domain.

Delete v4 project

Permanently delete a Semrush v4 project and all associated data.

Get v4 project

Get the full details of one accessible Semrush v4 project.

List v4 indexed pages

List v4 indexed backlink pages for a URL or domain.

Get v4 keyword metrics

Get Semrush v4 SEO and PPC metrics for one keyword and country.

List v4 projects

List Semrush v4 projects by ownership or sharing scope.

List v4 referring domains

List v4 referring domains for a URL or domain.

List v4 referring IPs

List v4 referring IP addresses for a URL or domain.

Update v4 project

Rename a Semrush v4 project.

Validate Listing Management location creation

Validate a Listing Management location payload without creating it or consuming a Local Pro location limit.

Validate Listing Management location update

Validate selected changes to a Listing Management location without applying them.

FAQ

Frequently asked questions

A standalone Semrush MCP server gives Grok Build a fixed set of Semrush tools tied to that one server. The Composio Tool Router lets Grok Build load tools from Semrush and many other apps on demand, based on the task, all through a single endpoint.

Yes. Grok Build ships with native MCP support. Add a server with the grok mcp add command, from the in-session /mcps modal, or by editing ~/.grok/config.toml. It also reads Claude Code-style .mcp.json files, so Grok Build discovers the tools automatically.

Yes. Grok Build has zero-migration compatibility with Claude Code's configuration, so the same Composio server entry works in both without edits.

Tokens, keys, and configuration are encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant, so your Semrush data and credentials are handled to that standard.

Start with Semrush.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Semrush tool your agent needs.Free to start.

Start building