Sponsored by Deepsite.site

Google Search MCP Server

Created By
ayush-rudani8 months ago
An MCP server implementation that integrates with Google's Custom Search JSON API, providing web search capabilities.
Content

Google Search MCP Server

An MCP server implementation that integrates with Google's Custom Search JSON API, providing web search capabilities.

Features

  • Web Search: Search Google with comprehensive query options
  • Advanced Filtering: Control results by date, language, country, and safe search level
  • Rate Limited: Built-in rate limiting to prevent API quota exhaustion
  • Structured Results: Returns formatted search results with titles, URLs, and snippets

Tools

  • google_search
    • Execute Google searches with advanced filtering options
    • Inputs:
      • query (string): Search terms (required)
      • num_results (number, optional): Number of results (1-10, default: 5)
      • date_restrict (string, optional): Filter by date (e.g., "d1" for last day)
      • language (string, optional): 2-letter language code (e.g., "en")
      • country (string, optional): 2-letter country code (e.g., "us")
      • safe_search (string, optional): Safety level ("off", "medium", "high")

Configuration

Getting API Keys

  1. Create a Google Cloud project at Google Cloud Console
  2. Activate the Custom Search JSON API for your project via the API dashboard
  3. Generate an API key either through the Credentials section or following the Custom Search API guide
  4. Obtain a Search Engine ID by setting up a custom search engine in Google's Programmable Search

Environment Variables

Set these before running the server:

export GOOGLE_API_KEY="your-api-key"
export GOOGLE_SEARCH_ENGINE_ID="your-search-engine-id"

Running from Local Repository

To run the server directly from source:

  1. Clone the repository

     git clone https://github.com/ayush-rudani/google-search-mcp-server.git
     cd google-search-mcp-server
    
  2. Install dependencies

     pnpm install
     # or
     npm install
    
  3. Build the project

     pnpm run build
     # or
     npm run build
    
  4. Configure Claude Desktop Update your claude_desktop_config.json:

    {
      "mcpServers": {
        "google-search": {
          "command": "/path/to/node", // <--- Important to add the following, run in your terminal `echo "$(which node)"` to get the path
          "args": ["/full/path/to/google-search-mcp/index.js"],
          "env": {
            "GOOGLE_API_KEY": "your-api-key",
            "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id"
          }
        }
      }
    }
    
    • Replace /path/to/node with the complete path to your Node.js executable (you can locate this by running the command which node in your terminal)
  5. Test the server

     export GOOGLE_API_KEY=your_api_key_here
     export GOOGLE_SEARCH_ENGINE_ID=your_engine_id_here
     node dist/index.js
    

Rate Limits

The server enforces a rate limit of 10 requests per minute by default to prevent exceeding Google's API quotas. You can adjust this in the code if needed.

License

This MCP server is licensed under the MIT License. See the LICENSE file for details.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
Tavily Mcp
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
ChatWiseThe second fastest AI chatbot™