MCP Gemini Google Search
Provides Google Search functionality using Gemini's built-in Grounding with Google Search feature, delivering real-time web search results with source citations.
Supports Vertex AI integration for Google Cloud users as an alternative to Google AI Studio, allowing use of Google Cloud's Gemini models through Vertex AI.
Click on "Deploy 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., "@MCP Gemini Google Searchfind the latest TypeScript 5.8 release notes"
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.
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
Related MCP server: Google AI Mode MCP Server
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-searchUsage
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-searchFor 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-searchWindows 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-searchAvailable Tools
google_search
Search Google for information.
Parameters:
query(string, required): Search query
Example:
latest TypeScript featuresIt appears you're asking about the latest features in TypeScript. Here's a summary of recent updates and key features, based on the provided search results:
**Key Features in Recent TypeScript Updates:**
* **Satisfies Operator:** This operator lets you specify that a value conforms to a specific type without fully enforcing it.[1,2]
* **Const Type Parameters:** Using `const` with type parameters provides more precision with function generics, helping specify literal types and prevent unwanted transformations.[2] This ensures arrays are treated as immutable, maintaining their literal types.[2]
* **Improved Enum Types:** Enums are more robust, especially `const enum`, which optimizes enums by inlining their values at compile time.[2] From version 5.0, all enums are treated as a type union, even with calculated values.[1]
* **Template Literal Types:** Template literal types are more expressive, allowing you to create types that build on literals, similar to JavaScript template strings.[2]
* **Unions and Intersections with Discriminated Unions:** TypeScript offers better handling for union and intersection types, which are frequently used to build flexible types.[2] Discriminated unions allow you to create complex structures with ease and clear type guards.[2]
* **New ECMAScript Set Methods:** Support for new methods like `union`, `intersection`, and `difference` for more powerful set operations.[3]
**TypeScript 5.8 Highlights (March 2025):**
* **Module Node18 Flag:** Provides a stable reference point for users fixed on Node.js 18, without incorporating certain behaviors of `--module nodenext`.[4]
* **Optimizations:** Introduces optimizations that improve the time to build up a program and update it based on file changes, especially in `--watch` mode or editor scenarios.[4] This includes avoiding array allocations during path normalization.[4]
* **Import Assertions:** `--module nodenext` in TypeScript 5.8 will issue an error if it encounters an import assertion, as Node.js 22 no longer accepts them using the `assert` syntax, recommending `with` instead.[4]
**Other Notable Features & Improvements:**
* **Inferred Type Predicates:** Improved type inference, especially with arrays and filtering.[3]
* **Control Flow Narrowing for Constant Indexed Accesses:** Better type narrowing for accessing object properties.[3]
* **Regular Expression Syntax Checking:** Basic syntax checks are performed on regular expressions, flagging errors like unclosed parentheses.[3]
* **Array filter Fixes:** Properly filters the type of arrays when you use the filter function.
* **Object Key Inference Fixes:** Improves type inference.
**Performance Enhancements:**
* **Go Rewrite:** A full rewrite of TypeScript in Go has been promised for version 7.0, which has demonstrated significant speed improvements (up to 10x-15x in some cases).[5] This will affect the compiler (`tsc`) and IDE performance (loading, hovers, errors, etc.).[5] The team chose Go for its structural similarity to the current JavaScript implementation.[5]
* **TypeScript 5.0:** This update aimed to accelerate coding processes and simplify development by refining code, data structures, and streamlining import/export operations.[6]
In summary, TypeScript is continuously evolving with new features and improvements aimed at enhancing developer productivity, code quality, and performance.[6]
Sources:
[1] edicomgroup.com (https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFILdgh_4-Yh0OuwzDOqwCfvLGHdhm_PGhdAIzMK_DFwW38X9qK8b3Tj_ws2VZ2VLxWW_NJtuzot8B_wYYH4rOHBY_1HYZ7PyCHOCR3GzQpwQUi71ufAf6izU13O3W6GzjQAQnVjnheeRLLLf4mD7uueIS-g0yeivFo2XWZKJF4wtRtDfdTYjtHvRYmB7rY6Q==)
[2] dev.to (https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFFMJOcmJDu8TUJsc6cKjVMDTR7ggjQMUc1aMAIVKRhbTq7Zjzh5f_h-UpZn6LE6xB-nTqUmQwHCiUmhvAZ_uYmzXIzNmJvtoDUjDcB9hJDw_aPPvJjd411APwVfiNvd3yhlrB7MFsnxH25-hxNetmoZJrriZ0mGm6ZaYbm0yMeiruDqC5mnqXJwuyGLMdrg-M3LpRAGrxVAT9b1veE)
[3] dev.to (https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFfDcb-2QNwLZ0TpjSkNCWCvh-dvslYtllEMyyTXCSu-3jbOBD4vvq0j5Hqyuw8BcmEpKjBBeBZS83E-GCKax48hg5Oc1Fam6GQy296DxQkEQOfg7pvmnRhE3tdDbDCBqXKdYPonoR_AVLBAlGdKg==)
[4] microsoft.com (https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEWKA9uZsB7lcOGcnOLveyjImsqVwNItCj3n3QiCrCkyL6iY4rA16Wp37FecAoKgX58lcDcBOuXye97fgw5SAbLwDkl3M-vCUK0I0HxtCx8qMaBVM42sxyFEQjn1iz4Qgzud3P7pDlc4frHf6Wkgs8nNcoIlMriePVOb0l9vmY=)
[5] totaltypescript.com (https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFysE6zFlg_XiXfGqAiDapTIj2bsVWlkuq3Trpfacjd1a7gMDrUh35MKW-No9qdSKti68W3M2b1j6VqlnZ7v_yBOjE8hK_3d57U7UePyjMOUDdbBBGRK8CZeUug3hBOFsZjbnQoDdoL446oZL1R38gJrc9JvGmlWQno)
[6] rabitsolutions.com (https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEY1brKmgxI5YOA1HrB89SnHNPyhm3Dlz-zumJMoi-wBegLSOjto360JJrA29TwVB8A02qHWZBtwua0QHn8NxAjWUCCkLxD7lZa_xW4Mtp8diiAXl1ppIWEHq6T7B1Mm6_dMs3lWoOKOJSjCUrk6-P4ao40V-nYULfPtA==)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 inspectDebugging 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
Available Tools
1 toolgoogle_searchB
Performs a web search using Google Search (via the Gemini API) and returns the results. This tool is useful for finding information on the internet based on a query.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query to find information on the web. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool 'returns the results' but does not specify what those results include (e.g., links, snippets, pagination), potential rate limits, authentication requirements, or error handling. For a web search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior, though it at least confirms it performs a search and returns something.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with two sentences that directly state the tool's function and utility. It is front-loaded with the core purpose and avoids unnecessary details. However, it could be slightly more concise by merging ideas, and the second sentence adds value but isn't strictly essential, keeping it from a perfect score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (a web search with one parameter), no annotations, and no output schema, the description is minimally adequate. It explains the basic purpose and usage but lacks details on output format, limitations, or error cases. This leaves the agent with incomplete context for effective use, though it meets the minimum viable threshold.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'query' parameter documented as 'The search query to find information on the web.' The description adds no additional parameter semantics beyond this, such as query formatting tips or examples. According to the rules, with high schema coverage (>80%), the baseline is 3 even with no param info in the description, which applies here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Performs a web search using Google Search (via the Gemini API) and returns the results.' It specifies the verb ('performs a web search'), resource ('Google Search'), and mechanism ('via the Gemini API'), making it easy to understand what the tool does. However, with no sibling tools, there's no opportunity to distinguish from alternatives, so it cannot achieve a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides implied usage guidance: 'This tool is useful for finding information on the internet based on a query.' This suggests the tool should be used when the agent needs to search the web for information. However, it lacks explicit when-to-use or when-not-to-use scenarios, such as limitations on query types or alternatives for different search needs, which prevents a higher score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
google_search
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a single, clear purpose that cannot be confused with any other tool in the set.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The tool name 'google_search' follows a clear and descriptive verb_noun pattern.
A single tool for a search server is too minimal for typical agent workflows, as it lacks complementary tools like filtering, pagination, or advanced search options. This forces agents to rely solely on basic queries without refinement capabilities.
The tool surface is severely incomplete for a search domain, missing essential operations such as filtering results by date, site, or language, handling pagination, or providing search suggestions. This will limit agents to basic, one-off queries without follow-up capabilities.
Maintenance
Related MCP Connectors
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
Real-time web search for AI agents: ranked results, source URLs, and optional AI answers.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Google AI Overview answers and cited sources via the Apify Google AI Overview API, hosted MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides Google search grounding capabilities for Gemini AI models through MCP, enabling AI assistants to perform web searches with Gemini's grounding API for more accurate and up-to-date responses.MIT
- AlicenseAqualityFmaintenanceEnables any MCP-compatible LLM to perform AI-powered web research using Google's AI Mode, returning synthesized and cited answers instead of raw search results.137 npm152MIT
- AlicenseAqualityDmaintenanceProvides grounded web search and research capabilities using Google's Gemini models and Google Search, with features like normal and research modes, batch searches, and health checks.38 npm1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to perform Google searches with real, resolvable sources and transparent search terms.118 npm1MIT