# @brobertoblanko/gemini-grounding-mcp [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/brobertoblanko/gemini-grounding-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 632  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brobertoblanko-gemini-grounding-mcp

## Description
Minimal MCP server for Google web search via the Gemini API with grounding, inline citation markers and a token footer.

## Tools
Capabilities this server exposes over MCP:

- **gemini-search** — Run a web search / research query through the Gemini API. Combines Google Search, URL context, and code execution in a single call. Uses the saved default model and thinking level unless the user explicitly requests a different one for this call - the default can be changed anytime via gemini-set-config. The response includes a source list and a token-usage footer.
- **gemini-list-models** — List the Gemini models available for the current API key with their token limits. By default a hand-picked shortlist of those suited to research here; all: true shows every model with a status column. The shortlist decides what is shown, not what is allowed - gemini-set-config and gemini-search accept any model id. Before proposing a shorter selection to the user, name the models the call returned, mark the selection as a suggestion, and say that any other model id can be set too.
- **gemini-set-config** — Persist the default model ID, thinking level, backup model and/or search deadline to the user config file. Used by gemini-search from the next call on, unless the call specifies otherwise. Check availability with gemini-list-models first. Only use when the user explicitly asks for the change. At least one parameter is required.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gemini-grounding-mcp": {
    "command": "npx",
    "args": ["-y","@brobertoblanko/gemini-grounding-mcp"],
    "env": {
      "GEMINI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `GEMINI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What @brobertoblanko/gemini-grounding-mcp does

@brobertoblanko/gemini-grounding-mcp exposes Gemini-based web research to MCP clients. The main `gemini-search` tool sends a question to the Gemini API with Google Search grounding enabled, then formats the response with citation markers and a numbered list of sources.

Each response includes the searches Gemini performed and a token footer divided into input, output, and thinking tokens. This makes the search scope and per-request consumption visible. If Gemini uses URL Context or Code Execution, the resulting page-derived information, code, and output are included in the response.

The package is intended for research queries. It is not designed for production workloads or connections to sensitive systems.

## How it works

The server runs as an MCP process and uses the official Google GenAI and Model Context Protocol packages. An MCP client starts it through `npx`, or the package can be installed for access to its command-line utility.

`gemini-search` accepts a query and can override the model or thinking level for that request. Without those overrides, it uses the saved configuration. Model and thinking settings are read when a call is made, so configuration changes apply to subsequent requests without restarting the client.

The response identifies incomplete generation, filtering, or other non-normal completion states. Citation markers are only inserted where the API supplies supporting information, and missing markers are counted. A configured backup model can be used after retries are exhausted; the response identifies when that fallback handled the request.

## Setup and configuration

Node.js 22 or newer and a Gemini API key are required. Store the key in `GEMINI_API_KEY` before the MCP client starts the process. The key is not placed in source code or in the server's saved configuration.

Claude Code can register the package with `npx -y @brobertoblanko/gemini-grounding-mcp`, passing `GEMINI_API_KEY` through the client environment configuration. The package is fetched and cached on first use. A command-line invocation is also available through `npx -p @brobertoblanko/gemini-grounding-mcp gemini-grounding "your query"`.

`gemini-set-config` saves the default model, thinking level, backup model, and search deadline. It never saves the API key. `gemini-list-models` reports models available to the configured API key and their token limits; an `all` option includes models outside the research shortlist.

## Tools and capabilities

- `gemini-search` performs research with Google Search, URL Context, and Code Execution in one request.
- `gemini-list-models` lists available models and token limits, with an option to show the full model set and status information.
- `gemini-set-config` persists model, thinking, fallback, and deadline settings.
- Inline citations connect answer text to a numbered source list.
- Response footers show searched queries, source counts, token usage, and model details.

## Limitations and notes

Gemini API usage can be subject to free-tier limits, token charges, and separate Google Search grounding charges depending on the model and plan. The token footer helps inspect consumption, but pricing and limits are determined by Google.

Busy Gemini services may cause retries and longer response times. The server retries some unavailable requests before returning an error, and requests have a deadline. The command-line tool can print Google's status and message, with `--debug` enabling detailed diagnostics.

A manually selected model for a request disables the configured backup for that request. Claude Code asks for confirmation when `gemini-set-config` is called and does not allow that tool in `claude -p` mode.

_Full upstream README: https://allmcps.com/mcp/brobertoblanko-gemini-grounding-mcp/readme_

