home / mcp / google search mcp server

Google Search MCP Server

Provides web search via Google Custom Search API and webpage content extraction to feed into MCP workflows.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "adenot-mcp-google-search": {
      "command": "npx",
      "args": [
        "-y",
        "@adenot/mcp-google-search"
      ],
      "env": {
        "GOOGLE_API_KEY": "your-api-key-here",
        "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id-here"
      }
    }
  }
}

This MCP server lets you perform web searches using Google Custom Search API and read content from webpages. It combines search capabilities with a webpage reader to provide structured results you can feed into your AI workflows or client applications.

How to use

Use this server with an MCP client to perform two main actions: search the web and read webpage content. The search tool queries Google Custom Search API and returns a list of results with title, link, and snippet. The webpage reader tool fetches a URL, extracts the page title and main text, cleans out scripts and styles, and returns structured data with the page title, cleaned text, and URL.

How to install

Prerequisites you need before installing include Node.js and npm. Ensure you have a basic runtime environment to execute JavaScript packages.

Install dependencies and build the project locally to prepare the MCP server for use.

npm install
```
```bash
npm run build
```
```bash
npm run watch

Explicit MCP server configuration

{
  "mcpServers": {
    "google_search": {
      "command": "npx",
      "args": [
        "-y",
        "@adenot/mcp-google-search"
      ],
      "env": {
        "GOOGLE_API_KEY": "your-api-key-here",
        "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id-here"
      }
    }
  }
}

Usage with an MCP client

To start using the server from your MCP client, load the configured server and issue actions to either search the web or read a webpage. The search action accepts a query and an optional number of results (default is 5, maximum is 10). The read_webpage action accepts a URL and returns the page title, main text, and the original URL.

Additional notes

The server configuration shown above includes environment variables you must provide: GOOGLE_API_KEY and GOOGLE_SEARCH_ENGINE_ID. Keep these values secure and avoid sharing them publicly. If you are using Claude Desktop, place the config in the appropriate application directory on your OS as described in the installation snippet.

Troubleshooting

If the MCP server does not start, verify that Node and npm are installed and that the environment variables are set correctly. Check that the Google API key has access to the Custom Search API and that the associated Search Engine ID is valid. For debugging, you can run the inspector tooling to access debugging utilities in your browser.

Available tools

search

Performs web searches using Google Custom Search API and returns structured results with title, link, and snippet.

read_webpage

Fetches a webpage, extracts the title and main text, cleans scripts and styles, and returns structured data with title, text, and url.