
yukukotani/mcp-gemini-google-search
Developer toolsA Model Context Protocol (MCP) server that provides Google Search functionality using Gemini's built-in Grounding with Google Search feature.
Обзор
A Model Context Protocol (MCP) server that provides Google Search functionality using Gemini's built-in Grounding with Google Search feature.
README
MCP Gemini Google Search
A Model Context Protocol (MCP) server that provides Google Search functionality using Gemini’s built-in Grounding with Google Search feature.
This project is inspired by the GoogleSearch tool from gemini-cli.
Features
- Uses Gemini’s built-in Grounding with Google Search feature
- Provides real-time web search results with source citations
- Compliant with MCP standard protocol
- Supports stdio transport
- Supports both Google AI Studio and Vertex AI
Requirements
- Node.js 18 or later
- Google AI Studio API key (Get one here) or Google Cloud Project with Vertex AI enabled
Installation
npm install -g mcp-gemini-google-search
Usage
Environment Variables
# For Google AI Studio (default)
export GEMINI_API_KEY="your-api-key-here"
export GEMINI_MODEL="gemini-2.5-flash" # Optional (default: gemini-2.5-flash)
# For Vertex AI
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)
Claude Code Configuration
You can set up this MCP server in Claude Code using the CLI:
For Google AI Studio
# Add to user scope (available across all projects)
claude mcp add gemini-google-search \
-s user \
-e GEMINI_API_KEY="your-api-key-here" \
-e GEMINI_MODEL="gemini-2.5-flash" \
-- npx mcp-gemini-google-search
# Or add to project scope to share with your team
claude mcp add gemini-google-search \
-s project \
-e GEMINI_API_KEY="your-api-key-here" \
-e GEMINI_MODEL="gemini-2.5-flash" \
-- npx mcp-gemini-google-search
For Vertex AI
# Add to user scope (available across all projects)
claude mcp add gemini-google-search \
-s user \
-e GEMINI_PROVIDER="vertex" \
-e VERTEX_PROJECT_ID="your-gcp-project-id" \
-e VERTEX_LOCATION="us-central1" \
-e GEMINI_MODEL="gemini-2.5-flash" \
-- npx mcp-gemini-google-search
# Or add to project scope to share with your team
claude mcp add gemini-google-search \
-s project \
-e GEMINI_PROVIDER="vertex" \
-e VERTEX_PROJECT_ID="your-gcp-project-id" \
-e VERTEX_LOCATION="us-central1" \
-e GEMINI_MODEL="gemini-2.5-flash" \
-- npx mcp-gemini-google-search
Windows Users
On Windows, wrap the npx command with cmd /c:
claude mcp add gemini-google-search \
-e GEMINI_API_KEY="your-api-key-here" \
-- cmd /c npx mcp-gemini-google-search
Available Tools
google_search
Search Google for information.
Parameters:
query(string, required): Search query
Example:
latest TypeScript features
Development
To contribute to this project:
# Clone the repository
git clone https://github.com/yukukotani/mcp-gemini-google-search.git
cd mcp-gemini-google-search
# Install dependencies
npm install
# Development mode (watch for file changes)
npm run dev
# Build
npm run build
# Run locally
npm run start
# Debug with MCP Inspector
npm run inspect
Debugging with MCP Inspector
Running npm run inspect will open the MCP Inspector in your browser. This allows you to:
- View available tools
- Execute tools and see responses
- Debug in real-time
License
Apache License 2.0
Установка
This server does not publish a one-line install command.
Open the repository installation guide