Google Search Engine MCP Server

Google Search Engine MCP Server

Enables Google search queries and webpage content extraction through an MCP server deployed on Cloudflare Workers. Supports single and batch webpage content extraction with integrated OAuth authentication.

Category
Visit Server

README

Google Search Engine MCP Server

An MCP (Model Context Protocol) server based on Cloudflare Workers, providing Google search and webpage content extraction functionality with integrated OAuth login.

Local Development

# Clone the repository
git clone https://github.com/your-username/google-search-engine-mcp-server.git

# Install dependencies
cd google-search-engine-mcp-server
npm install

# Run locally
npm run dev

Visit http://localhost:8787/ to check the server status

Connect to MCP Inspector Testing Tool

Use the MCP Inspector to explore and test the API:

  • Run npm run inspector or npx @modelcontextprotocol/inspector
  • In the Inspector interface, set the transport type to SSE, URL to http://localhost:8787/sse, and click "Connect"
  • Enter any email and password in the mock login interface
  • After logging in, you can view and call all available tools

<div align="center"> <img src="img/mcp-inspector-sse-config.png" alt="MCP Inspector Configuration Interface" width="600"/> </div>

Available Tools

This server provides the following tools:

  1. google_search - Perform Google searches and return results
  2. extract_webpage_content - Extract webpage content and convert it to readable text
  3. batch_extract_webpage_content - Batch extract content from multiple webpages

Connect to Claude Desktop

To connect Claude to your local MCP server:

  1. Follow the Anthropic Quick Start Guide
  2. In Claude Desktop, go to Settings > Developer > Edit Config
  3. Replace the existing content with the following configuration:
{
  "mcpServers": {
    "google-search": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/sse"
      ]
    }
  }
}

After launching Claude, a browser window will open allowing you to log in. You can see available tools in the bottom right corner. With appropriate prompts, Claude will call the corresponding tools.

<div align="center"> <img src="img/available-tools.png" alt="Click the hammer icon to display the list of available tools" width="600"/> </div>

Deploy to Cloudflare

  1. Create a KV namespace: npx wrangler kv namespace create OAUTH_KV
  2. Follow the prompts to add the KV namespace ID to wrangler.jsonc
  3. Set environment variables:
    • GOOGLE_API_KEY - Your Google API key
    • GOOGLE_SEARCH_ENGINE_ID - Your Google Custom Search Engine ID
  4. Deploy: npm run deploy

Connect to Remote MCP Server

After deployment, you can use MCP Inspector to connect to the remote server:

npx @modelcontextprotocol/inspector@latest

Enter your Workers URL (e.g., your-worker-name.your-account.workers.dev/sse) as the MCP server address and click "Connect".

Connect Claude Desktop to Remote Server

Update the Claude configuration file to point to your Workers URL:

{
  "mcpServers": {
    "google-search": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://your-worker-name.your-account.workers.dev/sse"
      ]
    }
  }
}

Troubleshooting

If you encounter issues:

  1. Restart Claude
  2. Try connecting to the MCP server directly from the command line:
    npx mcp-remote http://localhost:8787/sse
    
  3. Clear the MCP authentication files:
    rm -rf ~/.mcp-auth
    
  4. Check console logs for detailed error information

Developer Notes

  • This project is developed using TypeScript
  • Based on Cloudflare Workers and Durable Objects
  • Integrates OAuth authentication
  • Uses Google Custom Search API for search functionality
  • Includes webpage content extraction and analysis features

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured