How to integrate Semrush MCP with OpenCode

Connect OpenCode to Semrush MCP. Show top anchor texts for example.com, compare backlink profiles for three domains, and more using natural language, 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 OpenCode

This guide explains how to connect Semrush MCP to OpenCode using Composio Connect, which simplifies OAuth, API changes, and reliability concerns.

There are two ways to set this up:

Also integrate Semrush with

Why use Composio?

Composio provides a single MCP server or CLI tool that exposes a set of meta-tools, allowing you to:

  • Connect to 1,500+ apps with on-demand tool loading, so you do not fill your LLM context window with unnecessary tool definitions.
  • Use programmatic tool calling through a remote Bash tool, letting LLMs write their own code to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
  • Handle large tool responses outside the LLM context to keep conversations lean.

Connect Semrush with OpenCode

Option 1: Using Composio CLI

1. Install Composio CLI

Install the Composio CLI, authenticate, and initialize your project:

bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login

During login, you will be redirected to the sign-in page. Finish the flow and you are all set.

Composio CLI authorization screen

2. Authorize Semrush

Once the CLI is installed, it is essentially done. Give OpenCode access to your apps with these steps:

  1. Launch OpenCode.
  2. Prompt it to "Authenticate with Semrush Composio".
  3. Complete the authentication and authorization flow, and your Semrush integration is all set.
  4. Start asking anything you want.

Option 2: Using Composio MCP

You can also connect Semrush to OpenCode by adding Composio as an MCP server through the OpenCode CLI.

1. Add the Composio MCP server

bash
opencode mcp add

This launches an interactive prompt.

2. Fill in the fields

FieldValue
Namecomposio
Typeremote
URLhttps://connect.composio.dev/mcp
Require OAuthYes
Have client IDNo
OpenCode MCP server interactive prompt for Composio

Alternatively, you can skip the interactive prompt and paste the configuration directly into your OpenCode config file.

Open your global OpenCode config:

bash
open ~/.config/opencode/opencode.json

Add this under the mcp key and save the file.

bash
{
  "mcp": {
    "composio": {
      "type": "remote",
      "url": "https://connect.composio.dev/mcp",
      "enabled": true
    }
  }
}

3. Authenticate

Authenticate the Composio MCP server you just added:

bash
opencode mcp auth composio

This opens a browser session. Authorize Composio and you are done.

Composio browser authorization for OpenCode MCP

4. Verify installation

bash
opencode mcp list

5. Connect Semrush with OpenCode

Now, in the chat, ask the agent to connect to Semrush or give it any Semrush-related task.

For example, ask it to:

  • "Show top anchor texts for example.com"
  • "Compare backlink profiles for three domains"
  • "Get keyword overview for 'organic coffee'"

It will prompt you to authenticate and authorize access to Semrush.

That is it. Composio tools are now available in OpenCode, and your Semrush account is ready to use.

Way Forward

Now that Semrush is connected, extend your setup by connecting the other apps you already use every day, so your agent can run true cross-app workflows end to end.

  • Connect Calendar to turn threads into scheduled meetings automatically.
  • Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
  • Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
  • Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.

Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single MCP endpoint, your agent can coordinate multiple tools safely and reliably in one conversation.

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

With a standalone Semrush MCP server, the agents and LLMs can only access a fixed set of Semrush tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Semrush and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. OpenCode fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Semrush tools.

Yes, absolutely. You can configure which Semrush scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Semrush data and credentials are handled as safely as possible.

Start with Semrush.It takes 30 seconds.

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

Start building