- Home
- MCP servers
- Gemini Google Search
Gemini Google Search
- typescript
76
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": {
"yukukotani-mcp-gemini-google-search": {
"command": "npx",
"args": [
"mcp-gemini-google-search"
],
"env": {
"GEMINI_MODEL": "gemini-2.5-flash",
"GEMINI_API_KEY": "YOUR_API_KEY",
"GEMINI_PROVIDER": "vertex",
"VERTEX_LOCATION": "us-central1",
"VERTEX_PROJECT_ID": "YOUR_GCP_PROJECT_ID"
}
}
}
}You can run a dedicated MCP server that provides real-time Google Search results using Gemini’s Grounding with Google Search feature. It lets you query the web and receive up-to-date results with source citations through MCP clients, enabling seamless, context-aware web information retrieval in your applications.
How to use
You connect to this MCP server from your MCP client and ask for web information just like you would with any other tool. Use the google_search tool to search Google for information and return results with citations. Your MCP client can provide a natural language query, and you’ll receive a concise summary along with relevant sources.
How to install
Prerequisites: ensure you have Node.js 18 or later installed on your machine.
Install the MCP Gemini Google Search server globally with the following command:
npm install -g mcp-gemini-google-search
Set up authentication for Gemini depending on your chosen provider.
Option A: Google AI Studio (default) — set your API key and optional model:
export GEMINI_API_KEY="your-api-key-here"
export GEMINI_MODEL="gemini-2.5-flash" # Optional (default: gemini-2.5-flash)
Option B: Vertex AI — configure the provider and project details:
export GEMINI_PROVIDER="vertex"
export VERTEX_PROJECT_ID="your-gcp-project-id"
export VERTEX_LOCATION="us-central1" # Optional (default: us-central1)
export GEMINI_MODEL="gemini-2.5-flash" # Optional (default: gemini-2.5-flash)
Additional configuration and usage notes
You can also configure the server through client-side setup. For Google AI Studio, add the following environment variables to your client or deployment scope: GEMINI_API_KEY and GEMINI_MODEL. For Vertex AI, set GEMINI_PROVIDER, VERTEX_PROJECT_ID, VERTEX_LOCATION, and GEMINI_MODEL as needed.
To verify local development or debugging, you can run the server in development or start mode as described in your environment. The server exposes the google_search tool which accepts a query string and returns results with citations.
Security and best practices
Keep API keys and Vertex project details secure. Do not hard-code credentials in source files. Use environment variables or a secrets manager in production deployments.
Troubleshooting tips
If you encounter authentication errors, double-check your GEMINI_API_KEY or Vertex configuration and ensure the correct provider is set. If results are missing citations, verify that the grounding feature is enabled for your account and that you are using the proper model version.
Available tools
google_search
Search Google for information and return results with source citations. This tool takes a query string and yields relevant web results.