Connector guide5-minute read11 MCP tools7 languages

How to Connect SerpApi to Gemini via MCP

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

HCBy HelpCode teamUpdated 5 min read Open-source on GitHub

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

SerpApi

SerpApi

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

tools

11

Region

INTL

Category

Public Data

Authentication

Query Param Auth

Required env vars

SERPAPI_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 SerpApi 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 live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

Try asking

Example prompts for SerpApi

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

SerpApi · 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 → SerpApi, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

SerpApi + Gemini

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

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:

SERPAPI_API_KEY

Step 1 — Get credentials

  1. Sign up at https://serpapi.com (the free plan needs no card) and confirm your email address.
  2. Open https://serpapi.com/manage-api-key and copy your private API key.
  3. Paste it into SERPAPI_API_KEY and install the connector. The key is stored encrypted, added to each request by the connector and sent only to serpapi.com.
  4. Start with serpapi_get_account: it is free and shows your plan, the searches used and left this month, and the hourly limit.

Billed to your own SerpApi plan: every successful search spends one search from your SerpApi plan; the free plan has 250 a month. An identical search repeated within an hour comes from SerpApi's cache for free, failed searches are free, and checking the account or looking up locations costs nothing.

What it does: Google web search with the answer box, knowledge graph, AI overview, People also ask, top stories and local results when Google shows them; Google News, Images, Maps (places with rating, address, phone, website and opening hours), Shopping (offers with seller and price), Scholar (papers with citation counts) and Trends (interest over time, by region, related topics and queries); plus YouTube and Bing. Results come back as structured data, trimmed to the useful parts.

Localising: a search can come from a specific city and use the Google edition of a country and language. serpapi_search_locations finds the exact location names SerpApi accepts.

Untrusted content: titles and snippets come from the open web. The AI treats instructions found inside them as data, not as orders.

Common errors: 401 means the key is wrong or was regenerated. 429: the plan's searches for the month are used up, or the hourly limit is reached; serpapi_get_account shows which. 400: a required parameter is missing or a value is invalid, such as an unknown country or location. 403: the account may not run the request, for example because it is suspended.

The connector does not cover SerpApi's other engines (such as flights, hotels, jobs or product reviews), asynchronous searches, the search archive or raw HTML.

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 SerpApi tools.

Available tools

ToolWhat it does
serpapi_google_searchSearch Google through SerpApi and get the organic results plus the answer box, knowledge graph, AI overview, People also ask questions, top…
serpapi_google_newsSearch Google News through SerpApi, or open a news topic, publisher, section or full-coverage story by its token
serpapi_google_imagesSearch Google Images through SerpApi and get up to 20 images with title, source page, full-size URL, size and thumbnail
serpapi_google_mapsSearch Google Maps through SerpApi for places and businesses: name, place_id, rating and review count, type, address, phone, website…
serpapi_google_shoppingSearch Google Shopping through SerpApi and get up to 20 offers with title, seller, price, previous price, rating, review count and product…
serpapi_google_scholarSearch Google Scholar through SerpApi for papers, with authors, publication, snippet, PDF links and citation counts; also lists the papers…
serpapi_google_trendsGet Google Trends data through SerpApi: interest over time for up to 5 comma-separated terms, interest by region, or related topics and…
serpapi_youtube_searchSearch YouTube through SerpApi and get videos with title, link, video id, channel, publish date, views, length and description
serpapi_bing_searchSearch Bing through SerpApi and get the organic results plus the answer box, knowledge graph and related questions when Bing shows them
serpapi_get_accountShow the SerpApi plan of this API key: plan name, searches per month, searches used this month and left, extra credits, and the hourly rate…
serpapi_search_locationsFind the exact location names SerpApi accepts in the location parameter of the search tools, e.g. Munich, Bavaria, Germany, with country…

Example prompts

  • "Where does our website rank on google.de for 'custom claude connector', and what does the AI overview say?"
  • "Find coffee roasters in Hamburg on Google Maps with a rating above 4.5, with phone and website."
  • "Compare Google Trends interest in 'heat pump' and 'solar panels' in Germany over the last 12 months."
  • "How many searches are left on our SerpApi plan this month?"

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 SerpApi 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 SerpApi to ChatGPT via MCP

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

Connectors

How to Connect SerpApi to Claude via MCP

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

Connectors

How to Connect SerpApi to Cursor via MCP

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

Connectors

How to Connect SerpApi to Meta Muse via MCP

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

Connectors

SerpApi to MCP: Live Search Engine Results for any AI Agent

Give your AI live search engine results with SerpApi: Google web search, News, Images, Maps, Shopping, Scholar and Trends, plus YouTube and Bing, as clean structured results, and check your plan's remaining searches.

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.