gemini-grounding-mcp
Provides web search via Google Gemini grounding, returning a concise answer with cited sources and optionally using additional context to guide the response.
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., "@gemini-grounding-mcp search the web for the latest Node.js LTS release and cite sources"
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.
gemini-grounding-mcp
Servidor MCP (Model Context Protocol) que dá ao Claude — e a qualquer cliente compatível com MCP — busca web com grounding do Google Gemini (Google Search), retornando a resposta acompanhada das fontes citadas.
Por que este servidor
Saída enxuta. Devolve só o texto + a lista de fontes. Implementações comuns anexam o bloco de HTML/CSS da "search box" do Google, que pode representar ~50% do payload e desperdiçar tokens do cliente. Aqui esse lixo é descartado.
Protocolo limpo. Todo log vai para
stderr. Ostdouté reservado ao protocolo MCP — escrever nele corromperia a conexão.Uma dependência de IA. Usa o SDK oficial
@google/genai.
Related MCP server: Deno Gemini Grounding MCP Server
Manual didático para iniciantes
Nunca usou o Terminal? Siga o passo a passo completo, com explicações aula por aula:
Requisitos
Node.js 18+
Uma chave de API do Gemini (gratuita): https://aistudio.google.com/apikey
Instalação
git clone https://github.com/wall-e-assessor/gemini-grounding-mcp.git
cd gemini-grounding-mcp
npm install
npm run buildIsso gera o executável em dist/index.js.
Configuração da chave
O servidor lê a chave da variável de ambiente GEMINI_API_KEY.
Em produção (via cliente MCP): passe a chave na configuração do cliente (veja abaixo) — você não precisa de arquivo
.env.Para testar localmente: copie
.env.examplepara.env, preencha a chave e rode:npm run dev(usa o
--env-filenativo do Node; nenhuma dependência extra.)
⚠️ Nunca faça commit do seu
.envnem exponha a chave. O.gitignorejá bloqueia o.env.
Variável | Obrigatória | Padrão | Descrição |
| sim | — | Chave do Google AI Studio |
| não |
| Modelo do Gemini |
Usar no Claude Code
Registre o servidor no escopo de usuário (vale para todas as sessões). Troque o caminho e a chave pelos seus:
As opções (
--scope,--env,--transport) vêm antes do nome do servidor. Se o nome vier logo depois de--env, o CLI o lê como mais uma variável e recusa o comando; por isso o--transport stdiofica entre os dois (documentação oficial).
claude mcp add --scope user \
--env GEMINI_API_KEY=SUA_CHAVE_AQUI \
--transport stdio \
gemini-grounding \
-- node /caminho/absoluto/para/gemini-grounding-mcp/dist/index.jsNo Windows (Prompt de Comando), use o caminho completo do node, com cada caminho entre aspas. No PowerShell, troque o ^ do fim das linhas por `. Exemplo:
claude mcp add --scope user ^
--env GEMINI_API_KEY=SUA_CHAVE_AQUI ^
--transport stdio ^
gemini-grounding ^
-- "C:\Program Files\nodejs\node.exe" "C:\caminho\gemini-grounding-mcp\dist\index.js"Reinicie o cliente para que a ferramenta apareça.
Configuração equivalente em JSON
{
"mcpServers": {
"gemini-grounding": {
"command": "node",
"args": ["/caminho/absoluto/para/gemini-grounding-mcp/dist/index.js"],
"env": {
"GEMINI_API_KEY": "SUA_CHAVE_AQUI"
}
}
}
}Ferramenta exposta
search_with_grounding
Parâmetro | Tipo | Obrigatório | Descrição |
| string | sim | A pergunta ou termo a pesquisar |
| string | não | Contexto adicional para orientar a resposta |
Retorno: texto da resposta seguido de uma seção Fontes: com título — URL de cada fonte.
Aviso
As respostas vêm de um modelo de linguagem com busca. Trate-as como dado a verificar, não como verdade absoluta — confirme fatos críticos na fonte oficial.
Autor
@pro.hudsontravassos
Licença
Available Tools
1 toolsearch_with_groundingBusca com grounding (Gemini)A
Busca informação atual na web usando o grounding (Google Search) do Google Gemini e retorna a resposta com a lista de fontes citadas. Saída enxuta: apenas texto + fontes.
Inputs: query (required), context.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusing it with another. Its purpose (grounded web search via Google Gemini with cited sources) is unambiguous.
The single name search_with_grounding follows a clear snake_case verb-plus-qualifier pattern that describes the operation precisely. There are no competing conventions to conflict with.
A single tool falls below the typical 3-15 range, but the server's stated scope is a single focused operation (grounded search), so one tool genuinely earns its place. A thin surface is defensible here rather than over-scoped.
For a grounding-search server, the core operation is covered end to end (query in, answer plus cited sources out). Minor gaps exist, such as a sources-only or raw-search mode and configurable result limits, but agents can work around them.
Maintenance
Related MCP Connectors
Google search, news, maps, webpages, cited answers, research and ChatGPT/Gemini answers for agents.
Web search, scraping, RAG answers with citations, and translation as MCP tools.
Web search, Google SERP, page extraction to markdown and cited answers for AI agents.
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables Large Language Models to perform real-time web searches using Google Custom Search API. Integrates with Claude Desktop to retrieve current information from the internet.21MIT
- 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
- FlicenseNot gradedqualityDmaintenanceProvides real-time web research and URL summarization capabilities using Gemini 2.5 Flash with native Google Search grounding. It enables users to perform factual searches and summarize web content directly within MCP-compatible clients like Claude Desktop.17-
- AlicenseAqualityCmaintenanceEnables Claude and other MCP clients to run Google Search, Google Shopping, Google Jobs, and YouTube Search queries, returning concise structured text optimized for LLM context instead of raw JSON.441 npmMIT