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-mcpsearch 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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A pergunta ou termo a pesquisar. | |
| context | No | Contexto adicional opcional para orientar a resposta. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full behavioral burden. It usefully discloses the output format ('Saída enxuta: apenas texto + fontes') and that sources are cited, but says nothing about latency, cost/quota, whether grounding always triggers a web search, or freshness guarantees. Some transparency, clearly incomplete for a web-facing tool.
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?
Two tightly packed sentences: the first gives purpose and mechanism, the second front-loads the output contract. No filler or redundancy.
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?
For a two-parameter search tool with full schema coverage and an explicit return-shape statement, the description is essentially complete. It lacks only operational context (quota, freshness, grounding behavior) that would matter for a tool with no annotations, preventing a 5.
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?
Schema description coverage is 100% — both 'query' and 'context' are documented in the schema. The description adds no parameter-level meaning beyond what the schema already says, so baseline 3 applies.
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 states a specific verb (search), resource (current web information), and mechanism (Google Gemini grounding via Google Search), plus the return shape (answer + cited sources). An agent knows exactly what the tool produces. No siblings exist to differentiate, but the purpose is unambiguous.
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 phrase 'Busca informação atual na web' implies usage for fresh/current information, but there is no explicit when-to-use/when-not guidance, no mention of alternatives, and no prerequisites. Adequate but leaves selection reasoning implicit.
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
search_with_grounding
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-
- AlicenseAqualityBmaintenanceEnables 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.443 npmMIT