Google Search MCP
Enables web search capabilities using Google Custom Search API, allowing queries to retrieve real-time information from the internet with configurable result counts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Search MCPsearch for latest AI developments in 2024"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
google-search-mcp
A Model Context Protocol (MCP) server that utilizes Google Custom Search (CSE) to retrieve information from the internet. By leveraging this MCP, the Large Language Model (LLM) is enabled to perform real-time Web searches.
Prerequisites
A Google Custom Search API key and Custom Search Engine ID are required:
Get a Google API Key from the Google Cloud Console
Create a Custom Search Engine at Programmable Search Engine
Related MCP server: Google Search MCP Server
Installation
pip install google-search-mcpOr install from source:
pip install .Configuration
Create a .env file in the project root directory:
cp .env.example .envThen edit the .env file and add your credentials:
GOOGLE_API_KEY=your-api-key
GOOGLE_CSE_ID=your-custom-search-engine-idAlternatively, you can set environment variables directly:
export GOOGLE_API_KEY="your-api-key"
export GOOGLE_CSE_ID="your-custom-search-engine-id"Usage
As a CLI
google-search-mcpWith Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
For macOS/Linux:
{
"mcpServers": {
"google-search": {
"command": "python",
"args": ["-m", "google_search_mcp"],
"env": {
"GOOGLE_API_KEY": "your-api-key",
"GOOGLE_CSE_ID": "your-custom-search-engine-id"
}
}
}
}For Windows:
If python is in your PATH (check with where python), you can use the same configuration as macOS/Linux:
{
"mcpServers": {
"google-search": {
"command": "python",
"args": ["-m", "google_search_mcp"],
"env": {
"GOOGLE_API_KEY": "your-api-key",
"GOOGLE_CSE_ID": "your-custom-search-engine-id"
}
}
}
}If you need to use a specific Python installation, find the full path with:
python -c "import sys; print(sys.executable)"Then use the full path in the configuration:
{
"mcpServers": {
"google-search": {
"command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\\python.exe",
"args": ["-m", "google_search_mcp"],
"env": {
"GOOGLE_API_KEY": "your-api-key",
"GOOGLE_CSE_ID": "your-custom-search-engine-id"
}
}
}
}Note: Environment variables must be set in the Claude Desktop config env section for the server to access them.
Tools
search
Search the web using Google Custom Search.
Parameters:
query(string, required): The search query stringnum_results(integer, optional): Number of results to return (1-10, default 10)
Development
Running Tests
Install development dependencies:
pip install -e ".[dev]"Run the test suite:
pytestRun tests with verbose output:
pytest -vRun tests with coverage:
pytest --cov=google_search_mcp --cov-report=htmlTest Coverage
The test suite includes comprehensive tests for:
Successful search requests
Environment variable validation
API error handling
JSON parsing errors
Empty search results
Input parameter validation (num_results clamping)
Result formatting
Request parameter verification
License
MIT License - see LICENSE for details.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseBqualityDmaintenanceFacilitates web search capabilities using Perplexity's API, allowing users to retrieve search results through Claude's interface.Last updated17MIT
- Alicense-qualityDmaintenanceA Model Context Protocol server that enables Claude to perform Google Custom Search operations by connecting to Google's search API.Last updated2MIT
- FlicenseAqualityDmaintenanceProvides web search capabilities to Claude AI using the Anthropic API, allowing LLMs to access up-to-date information from the web with customizable domain filtering.Last updated148
- FlicenseBqualityDmaintenanceEnables web searching and content scraping through Google Custom Search API. Provides tools to search the internet, extract webpage content, and automatically scrape search results for comprehensive information gathering.Last updated3
Related MCP Connectors
The best web search for your AI Agent
Web search, news, page retrieval, sitemaps, and trending topics through Search1API.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ShogoOkamoto/google-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server