Google AI Search MCP — Claude Code MCP server: search and setup
This MCP server gives AI coding clients Google AI web search and documentation tools. Use it when answers need current technical sources.
claude mcp add --env AI_PROVIDER=<AI_PROVIDER> --env GOOGLE_CLOUD_PROJECT=<GOOGLE_CLOUD_PROJECT> --env GOOGLE_CLOUD_LOCATION=<GOOGLE_CLOUD_LOCATION> --env GEMINI_API_KEY=<GEMINI_API_KEY> --transport stdio google-ai-search-mcp -- npx -y google-ai-search-mcpWhat Google AI Search MCP does
Google AI Search MCP connects MCP clients to tools backed by Vertex AI or the Gemini API. It can retrieve current web information, explain technical subjects from official documentation, find code snippets, and draft project guidance.
The server also offers code review against documented practices, technology comparisons, and architecture options for a described use case. Environment variables control the provider, model, temperature, streaming, output-token limit, and retry behavior. Treat generated comparisons and architecture advice as material to verify against primary sources.
You need Node.js v18+, Bun, and credentials for a provider. Vertex AI requires a billed Google Cloud Project, the Vertex AI API, and Google Cloud authentication; Gemini requires GEMINI_API_KEY. Without a configured provider, the server cannot call the model.
What it helps with
- retrieve current answers about a library
- explain a topic from official documentation
- find a version-specific code snippet
- compare technologies using chosen criteria
- review code against documented practices
Example prompts for the agent
- Use
answer_query_websearchto find the current authentication setup for this library. - Use
explain_topic_with_docsto explain this error from official documentation. - Use
technical_comparisonto comparetechnology-aandtechnology-bby cost and constraints.
How to install Google AI Search MCP
Platform CLI
claude mcp add --env AI_PROVIDER=<AI_PROVIDER> --env GOOGLE_CLOUD_PROJECT=<GOOGLE_CLOUD_PROJECT> --env GOOGLE_CLOUD_LOCATION=<GOOGLE_CLOUD_LOCATION> --env GEMINI_API_KEY=<GEMINI_API_KEY> --transport stdio google-ai-search-mcp -- npx -y google-ai-search-mcpReplace <…> with your own values
Platform CLI
codex mcp add google-ai-search-mcp --env AI_PROVIDER=<AI_PROVIDER> --env GOOGLE_CLOUD_PROJECT=<GOOGLE_CLOUD_PROJECT> --env GOOGLE_CLOUD_LOCATION=<GOOGLE_CLOUD_LOCATION> --env GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y google-ai-search-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"google-ai-search-mcp": {
"command": "npx",
"args": [
"-y",
"google-ai-search-mcp"
],
"env": {
"AI_PROVIDER": "<AI_PROVIDER>",
"GOOGLE_CLOUD_PROJECT": "<GOOGLE_CLOUD_PROJECT>",
"GOOGLE_CLOUD_LOCATION": "<GOOGLE_CLOUD_LOCATION>",
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"google-ai-search-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"google-ai-search-mcp"
],
"env": {
"AI_PROVIDER": "<AI_PROVIDER>",
"GOOGLE_CLOUD_PROJECT": "<GOOGLE_CLOUD_PROJECT>",
"GOOGLE_CLOUD_LOCATION": "<GOOGLE_CLOUD_LOCATION>",
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e AI_PROVIDER=<AI_PROVIDER> -e GOOGLE_CLOUD_PROJECT=<GOOGLE_CLOUD_PROJECT> -e GOOGLE_CLOUD_LOCATION=<GOOGLE_CLOUD_LOCATION> -e GEMINI_API_KEY=<GEMINI_API_KEY> google-ai-search-mcp npx -y google-ai-search-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Google AI Search MCP
How do I install Google AI Search MCP in Claude Code?
Run claude mcp add google-ai-search-mcp -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y google-ai-search-mcp.
What does Google AI Search MCP do?
It exposes Google AI tools for web search, official documentation lookup, code analysis, technology comparisons, and architecture guidance to MCP clients.
What credentials does the server need?
Set AI_PROVIDER to vertex or gemini. Vertex AI needs GOOGLE_CLOUD_PROJECT and Google Cloud authentication; Gemini needs GEMINI_API_KEY.