Google Search

A Google Search MCP server that connects with LLMs or any MCP client to enable realtime search.
  • typescript

2

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "hunter-arton-google_search_mcp_server": {
      "command": "node",
      "args": [
        "/absolute/path/to/google-search-mcp/dist/index.js"
      ],
      "env": {
        "GOOGLE_CSE_ID": "your_search_engine_id_here",
        "GOOGLE_API_KEY": "your_api_key_here"
      }
    }
  }
}

You have a specialized MCP server that enables web and image search via Google's Custom Search API. It connects with MCP-compatible clients to provide two tools for your AI assistants: google_web_search and google_image_search. Use this server to give your AI collaborators up-to-date web information and image results on demand.

How to use

Connect this MCP server to your MCP client (for example Claude, Cursor, or VSCode with Claude integration) so your AI can perform web and image searches during conversations. After connection, ask questions that rely on current information or visuals, such as “Search the latest renewable energy news” or “Show images of electric vehicles.” The tools will be invoked automatically when relevant, and the results will be incorporated into natural language responses.

Before you start, ensure your environment is prepared with API credentials and a running MCP client. You will use the google_web_search tool for web queries and google_image_search for image queries.

How to install

Prerequisites you need to install and run this MCP server:

  • Node.js v18 or higher with npm
  • A Google Cloud Platform account
  • Google Custom Search API key and Search Engine ID
  • An MCP-compatible client (Claude for Desktop, Cursor, or VSCode with Claude)

Step-by-step install flow if you are starting from scratch:

# Clone the server repository
# git clone https://github.com/yourusername/google-search-mcp-server.git
# cd into the project
# cd google-search-mcp-server

# Install dependencies
npm install

# Create environment file with credentials
# macOS/Linux
# touch .env

# Windows
# New-Item .env

# Edit .env to add credentials
# GOOGLE_API_KEY=your_api_key_here
# GOOGLE_CSE_ID=your_search_engine_id_here

# Build the server
npm run build

# Optional test: run the server to ensure it starts on stdio
# echo '{"jsonrpc":"2.0","method":"listTools","id":1}' | node dist/index.js

Additional setup and configuration

Environment variables you must provide in one place for the server to function are GOOGLE_API_KEY and GOOGLE_CSE_ID. These credentials are used by both tools to query Google Custom Search.

{
  "mcpServers": {
    "google_search": {
      "type": "stdio",
      "name": "google_search",
      "command": "node",
      "args": ["/absolute/path/to/google-search-mcp/dist/index.js"],
      "env": {
        "GOOGLE_API_KEY": "your_api_key_here",
        "GOOGLE_CSE_ID": "your_search_engine_id_here"
      }
    }
  }
}

Testing your server

Test connectivity and the available tools by starting the server in stdio mode and issuing tool list or call tool requests via your MCP client.

# Example to list tools, if your client supports direct tool listing via MCP protocol
# You would issue a request from your MCP client to list tools or call a specific tool

Troubleshooting

Common issues include missing API credentials, misconfigured environment variables, or the MCP client failing to connect. Verify that GOOGLE_API_KEY and GOOGLE_CSE_ID are present in your runtime environment and that you are starting the server with the correct node command and path to dist/index.js.

If you encounter API errors, double-check your Google Cloud project settings and ensure the Custom Search API is enabled for the project, and that your API key is unrestricted or correctly scoped.

Available tools

google_web_search

Performs a web search using Google's Custom Search API and returns results to the MCP client.

google_image_search

Performs an image search using Google's Custom Search API and returns image results to the MCP client.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Google Search MCP Server - hunter-arton/google_search_mcp_server | VeilStrat