{"_id":"@brobertoblanko/gemini-grounding-mcp","_rev":"3-15f376c5e79413c0f493f81583deedd7","name":"@brobertoblanko/gemini-grounding-mcp","dist-tags":{"latest":"1.3.0"},"versions":{"1.1.0":{"name":"@brobertoblanko/gemini-grounding-mcp","version":"1.1.0","keywords":["mcp","mcp-server","model-context-protocol","claude","claude-code","anthropic","gemini","gemini-api","google-gemini","grounding","web-search","google-search","citations","research","llm","nodejs"],"author":{"name":"Broberto Blanko","email":"246734967+srzsn22q6d-sys@users.noreply.github.com"},"license":"MIT","_id":"@brobertoblanko/gemini-grounding-mcp@1.1.0","maintainers":[{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"}],"homepage":"https://github.com/srzsn22q6d-sys/gemini-grounding-mcp#readme","bugs":{"url":"https://github.com/srzsn22q6d-sys/gemini-grounding-mcp/issues"},"bin":{"gemini-grounding":"cli.js","gemini-grounding-mcp":"index.js"},"dist":{"shasum":"5ab0ada499e7494d9e473243a7476fbfb6ec5abb","tarball":"https://registry.npmjs.org/@brobertoblanko/gemini-grounding-mcp/-/gemini-grounding-mcp-1.1.0.tgz","fileCount":8,"integrity":"sha512-/um31cAASr7p/B8RpyFatWkVi24LB51c/4UwyjylR0t6Uiqy1t/nC5YXv8WmUcvtDlTJS5oeHiEokdmQ5RH2TQ==","signatures":[{"sig":"MEQCIEzBO6Kxb1ibNKRgnYOjoH4q9qCMwxO5o8uFLz9qT8JxAiAYQmhsSxpZfIoaA2Qvy8hsbmOyKmzrwdrLlRifLDewPA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52474},"type":"module","engines":{"node":">=20"},"gitHead":"3d26a9a2318c35a587b18ead395d1a040492c2f4","scripts":{"test":"node --test","start":"node index.js"},"_npmUser":{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"},"repository":{"url":"git+https://github.com/srzsn22q6d-sys/gemini-grounding-mcp.git","type":"git"},"_npmVersion":"11.12.1","description":"Minimal MCP server for Google web search via the Gemini API with grounding, inline citation markers and a token footer.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"4.4.3","@google/genai":"2.13.0","@modelcontextprotocol/sdk":"1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/gemini-grounding-mcp_1.1.0_1785585912062_0.7529770203268817","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@brobertoblanko/gemini-grounding-mcp","version":"1.2.0","keywords":["mcp","mcp-server","model-context-protocol","claude","claude-code","anthropic","gemini","gemini-api","google-gemini","grounding","web-search","google-search","citations","research","llm","nodejs"],"author":{"name":"Broberto Blanko","email":"246734967+brobertoblanko@users.noreply.github.com"},"license":"MIT","_id":"@brobertoblanko/gemini-grounding-mcp@1.2.0","maintainers":[{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"}],"homepage":"https://github.com/brobertoblanko/gemini-grounding-mcp#readme","bugs":{"url":"https://github.com/brobertoblanko/gemini-grounding-mcp/issues"},"bin":{"gemini-grounding":"cli.js","gemini-grounding-mcp":"index.js"},"dist":{"shasum":"9356ab3c7009fa25e3f55933272cbf2e9d591969","tarball":"https://registry.npmjs.org/@brobertoblanko/gemini-grounding-mcp/-/gemini-grounding-mcp-1.2.0.tgz","fileCount":8,"integrity":"sha512-d5NTBCwVpOxh4e1yCsO9nHdrO4Js3YfTbuL2YaNU5MIl+Z5M9IJSxSzygtNZAtaI5K7cT2JZbY+WzwNbJCObYQ==","signatures":[{"sig":"MEUCIFzrLEPDyppa66cpg3jn49RaEdd1rz6B91IE6HnbbNdqAiEA5tZbpzA3f/i+3AgzYl/bO7VOU5VDvMRWfamqlVbmnm4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70497},"type":"module","engines":{"node":">=22"},"gitHead":"b618a522e090887607344b6f8d9e90adb2444e9f","scripts":{"test":"node --test \"test/*.test.js\"","start":"node index.js"},"_npmUser":{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"},"repository":{"url":"git+https://github.com/brobertoblanko/gemini-grounding-mcp.git","type":"git"},"_npmVersion":"11.12.1","description":"Minimal MCP server for Google web search via the Gemini API with grounding, inline citation markers and a token footer.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"4.4.3","@google/genai":"2.15.0","@modelcontextprotocol/sdk":"1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/gemini-grounding-mcp_1.2.0_1785699848140_0.6796478085402036","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@brobertoblanko/gemini-grounding-mcp","version":"1.3.0","type":"module","description":"Minimal MCP server for Google web search via the Gemini API with grounding, inline citation markers and a token footer.","keywords":["mcp","mcp-server","model-context-protocol","claude","claude-code","anthropic","gemini","gemini-api","google-gemini","grounding","web-search","google-search","citations","research","llm","nodejs"],"homepage":"https://github.com/brobertoblanko/gemini-grounding-mcp#readme","bugs":{"url":"https://github.com/brobertoblanko/gemini-grounding-mcp/issues"},"repository":{"type":"git","url":"git+https://github.com/brobertoblanko/gemini-grounding-mcp.git"},"author":{"name":"Broberto Blanko","email":"246734967+brobertoblanko@users.noreply.github.com"},"license":"MIT","bin":{"gemini-grounding-mcp":"index.js","gemini-grounding":"cli.js"},"publishConfig":{"access":"public"},"scripts":{"start":"node index.js","test":"node --test \"test/*.test.js\""},"engines":{"node":">=22"},"dependencies":{"@google/genai":"2.15.0","@modelcontextprotocol/sdk":"1.30.0","zod":"4.4.3"},"gitHead":"b38c557c3505a757ad4e5d7223039762013ca6f5","_id":"@brobertoblanko/gemini-grounding-mcp@1.3.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-yuy6DrT5whn2WuLtqydAXWBXZE2FEUoSkkpWj/SNE1x2qQrcGJT2opGR1T51Le+pBI6xeI90titNsLHN1xobiw==","shasum":"1b23ac689995a495aca96e78ce73f2806865b8f6","tarball":"https://registry.npmjs.org/@brobertoblanko/gemini-grounding-mcp/-/gemini-grounding-mcp-1.3.0.tgz","fileCount":9,"unpackedSize":110738,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFwKwyq6u8nURra6CNfRZ+QnkhS4Gq0Cls8wVG6kEHtUAiEA6f2bYnNVa/0TPUJ2cTAFXHE4c/VDxUv52F1JHIzSr2w="}]},"_npmUser":{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"},"directories":{},"maintainers":[{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gemini-grounding-mcp_1.3.0_1786670676909_0.11173230996600747"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-01T12:05:11.845Z","modified":"2026-08-14T01:24:37.213Z","1.1.0":"2026-08-01T12:05:12.335Z","1.2.0":"2026-08-02T19:44:08.267Z","1.3.0":"2026-08-14T01:24:37.072Z"},"bugs":{"url":"https://github.com/brobertoblanko/gemini-grounding-mcp/issues"},"author":{"name":"Broberto Blanko","email":"246734967+brobertoblanko@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/brobertoblanko/gemini-grounding-mcp#readme","keywords":["mcp","mcp-server","model-context-protocol","claude","claude-code","anthropic","gemini","gemini-api","google-gemini","grounding","web-search","google-search","citations","research","llm","nodejs"],"repository":{"type":"git","url":"git+https://github.com/brobertoblanko/gemini-grounding-mcp.git"},"description":"Minimal MCP server for Google web search via the Gemini API with grounding, inline citation markers and a token footer.","maintainers":[{"name":"brobertoblanko","email":"atome_55_orbital@icloud.com"}],"readme":"# Gemini Grounding MCP\n\n[![npm version](https://img.shields.io/npm/v/@brobertoblanko/gemini-grounding-mcp)](https://www.npmjs.com/package/@brobertoblanko/gemini-grounding-mcp)\n[![Tests](https://github.com/brobertoblanko/gemini-grounding-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/brobertoblanko/gemini-grounding-mcp/actions/workflows/test.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\n\nGive Claude Code and other MCP clients current Google Search results through the\nGemini API - with inline citation markers and a numbered source list under every\nanswer.\n\nUse it when an assistant needs web-grounded research instead of relying on\ntraining data alone. It builds on nothing but the official `@google/genai` and\n`@modelcontextprotocol/sdk` packages, pinned to exact versions.\n\n> **Scope of use:** research queries only. Not intended for production workloads\n> or for connecting to sensitive systems.\n\n## What it offers\n\n- **Citations you can check.** Markers such as `[1]` sit in the answer text,\n  numbered to match the source list below it. A marker can be missing, but it is\n  never placed where the API does not support it - so an unmarked sentence is a\n  reason to look closer.\n- **The queries Gemini actually ran.** The footer lists what was typed into\n  Google, which answers what no source list can: whether the search covered your\n  question at all.\n- **Token usage for every call**, split into input, output and thinking tokens.\n  What they cost is on Google's\n  [pricing page](https://ai.google.dev/gemini-api/docs/pricing).\n- **Model and thinking level are yours to set.** Both persist, both can be\n  overridden for a single request, and both are read at call time, so a change\n  applies to the next answer rather than after a client restart. The thinking\n  level is the main lever on how many tokens a query consumes.\n- **An optional backup model.** Gemini's overload is model-dependent, so you can\n  name a second model that the same request goes to once the retries are used\n  up. Off unless you set it, never a model of the server's choosing, and the\n  footer says whenever it stood in.\n- **Failures stay visible.** An answer cut off at the token limit or stopped by a\n  filter is marked as such, dropped citation markers are counted, and a failing\n  model returns an error rather than quietly switching to something you did not\n  choose.\n- **Search, URL Context and Code Execution in one call.** Gemini can read a page\n  you name and run code; if it did, the code and its output are part of the\n  answer. The only instruction the server adds is today's date - what gets\n  researched follows from your question.\n- **A command line tool on the same core.** Verify your API key and model choice\n  before registering the server, and read the full error text when a call fails.\n\n## What an answer looks like\n\n**Question:** `\"Which Node.js version is currently LTS?\"`\n\n```text\nThe current Node.js release versions are as follows [1]:\n\n* Latest LTS: v24.18.1 (recommended for most users)\n* Latest Current release: v26.5.1\n\nSources:\n[1] nodejs.org - https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQG52u...\n\n---\n🔢 30 input / 86 output / 0 thinking tokens | 🔍 1 sources | 🤖 gemini-flash-latest (thinking: minimal)\n🔎 Searched: Node js latest LTS version\n```\n\nThe redirect URL is abbreviated here for readability; the real output carries it\nin full.\n\n## Quick start\n\nNothing to install up front: the client starts the server through `npx`, which\nfetches the package on first use and caches it - only that first call takes a\nfew seconds longer. A permanent install is optional and mainly of interest for\nthe [command line tool](#command-line-tool) (see\n[Installing globally](#installing-globally)).\n\n### 1. Set your API key\n\nThe key is passed exclusively through the `GEMINI_API_KEY` environment variable,\nnever in code and never in the config file. It has to be set **persistently**,\nbefore the client starts the server.\n\n**Windows (PowerShell, user scope, once):**\n\n```powershell\n[Environment]::SetEnvironmentVariable('GEMINI_API_KEY', '<your-api-key>', 'User')\n```\n\nReopen the shell afterwards so the variable is available.\n\n**macOS / Linux** - add to `~/.zshrc`, `~/.bashrc` or equivalent:\n\n```bash\nexport GEMINI_API_KEY='<your-api-key>'\n```\n\n### 2. Register the server\n\n**Windows (PowerShell):**\n\n```powershell\nclaude mcp add gemini-grounding -s user `\n  -e 'GEMINI_API_KEY=${GEMINI_API_KEY}' `\n  -- npx -y @brobertoblanko/gemini-grounding-mcp\n```\n\n**macOS / Linux (bash / zsh):**\n\n```bash\nclaude mcp add gemini-grounding -s user \\\n  -e 'GEMINI_API_KEY=${GEMINI_API_KEY}' \\\n  -- npx -y @brobertoblanko/gemini-grounding-mcp\n```\n\nWrite `${GEMINI_API_KEY}` in **single** quotes so your shell does not expand it\nitself. Claude Code resolves it later, when it loads its configuration - that\nway only the placeholder ends up in `~/.claude.json`, not the key in plain text.\n\n### 3. Verify\n\n```bash\nclaude mcp list\n```\n\nThen start a new conversation and ask `\"Which Node.js version is currently\nLTS?\"`. The reply should look like the\n[example above](#what-an-answer-looks-like): citation markers in the text, a\nsource list, and the footer. The server appends that footer to every answer it\nproduces, so if there is none, the tool was not called at all and you are\nreading the model's own memory.\n\n<details>\n<summary>If no answer arrives at all</summary>\n\nRun the same query through the [command line tool](#command-line-tool), which\nneeds no installation of its own:\n\n```bash\nnpx -p @brobertoblanko/gemini-grounding-mcp gemini-grounding \"your query\"\n```\n\nIt prints the full error including the original Google API message, which the\nMCP server has to condense into a single line for the client. An\n`ApiError: {\"error\":{\"code\":503, ...}}` means the request did not get through to\nGoogle, which is a different problem from a broken installation. That one is\nworth simply retrying: 503 is temporary overload on Google's side, and the\nserver already tries such a request up to four times on its own before reporting\nit - which is also why an answer can take some ten seconds longer than usual\nwhen the service is busy. A call that is still running after 290 seconds is\nended on purpose: the server gives Google that deadline, so an overlong run\ncomes back as a `504` naming a reason instead of a connection that drops without\none.\n\n</details>\n\n## Requirements\n\n- **Node.js 22 or newer** - the oldest release still receiving security updates.\n  Check with `node -v`. The dependencies would technically still run on Node 20,\n  but it reached end-of-life in April 2026, so it is not supported here.\n- **A Gemini API key**, available for free at\n  [Google AI Studio](https://aistudio.google.com/apikey).\n- **Claude Code** or any other MCP-capable client\n  ([Model Context Protocol](https://modelcontextprotocol.io)).\n\n**A note on cost:** Gemini API calls are not free in every case. There is a free\ntier with rate limits; beyond that you are billed per token, and Google Search\ngrounding may be charged separately depending on model and plan. The official\n[pricing](https://ai.google.dev/gemini-api/docs/pricing) and\n[rate limit](https://ai.google.dev/gemini-api/docs/rate-limits) pages are\nauthoritative - both change regularly, which is why no concrete figures appear\nhere. The token footer under every answer makes the consumption of each\nindividual call visible.\n\n## Tools\n\n- **`gemini-search`** - research via Google Search, URL Context and Code\n  Execution in one call. Besides the query it accepts an optional `model` and\n  `thinkingLevel` that apply to this one call; left out, the saved defaults are\n  used, and naming a `model` also disables the backup for that call. The answer\n  contains inline citation markers, a source\n  list and a token footer. If Gemini executed code, the code and its result\n  appear under `Code execution:` after the answer text - the calculation is\n  evidence, so it belongs where the sources are. If the answer did not finish\n  normally, a line marked ⚠️ says so along with the reason.\n- **`gemini-list-models`** - lists the models available for your API key with\n  their token limits. By default a hand-picked shortlist of those suited to\n  research here; `all: true` shows every model with a status column saying why\n  it is off the list.\n- **`gemini-set-model`** - persists the default model, the default thinking\n  level and/or the backup model (only those values, never the API key). The\n  answer names what was written and the resulting configuration in full, so\n  which models are in force is never something to be guessed at.\n\n<details>\n<summary>Why the model list is shorter than your key allows</summary>\n\nTwo filters narrow it. The first keeps what generates text and accepts a\nthinking level, going by what the API reports about each model rather than by\nits name. The second is `models-excluded.js`, a hand-maintained list of models\nthat pass the first and still make no sense here: image generation,\ntext-to-speech, robotics, the Deep Research pipeline, models that answer without\na single source, and retired ones that reply `404 ... is no longer available`.\nNot one of them would answer a research question better than what is left.\n\nNothing is lost, only moved. `all: true` shows every model with a status column\nnaming why it is off the list, and any model id can still be set - the shortlist\ndecides what is shown, not what is allowed.\n\nHow the list is maintained and what keeps it honest:\n[specs.md](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/specs.md#gemini-list-models).\n\n</details>\n\n## Citations and searches\n\n### Citation markers\n\nMarkers appear in groups such as `[1][3]` when several sources support the same\npassage. A sentence carrying none may well come from the model's own memory\nrather than from the search - precisely the kind of sentence you would not want\nto write code against unchecked.\n\n<details>\n<summary>How the verification works, and why markers get dropped</summary>\n\nMarkers are verified against the text segment the API supplies. If the computed\nspan does not match what the API names as the supported passage, the marker is\ndropped rather than guessed. Whenever that happens, the footer says so - a\nmissing marker would otherwise be misread as \"not backed by a source\".\n\nThey are never placed inside code spans or fenced blocks. A `[3]` in the middle\nof `copy.replace(obj, x=1)` would produce syntactically valid, factually wrong\ncode.\n\nSources are deduplicated and renumbered accordingly. The API returns search\nhits, not sources: one measured answer had 17 hits for 14 unique URLs, and naive\nnumbering would have produced markers pointing nowhere.\n\nFull details in [specs.md](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/specs.md).\n\n</details>\n\n### Why the source URLs are long\n\nGoogle hands out its sources as redirect URLs, and the server passes them on\nunchanged. Shortening or resolving them is not permitted under the\n[terms for Google Search grounding](https://ai.google.dev/gemini-api/terms#grounding-with-google-search),\nso it does not happen: the length is deliberate rather than missing polish.\n\n### Which searches were actually run\n\nVery broad questions produce a lot of searches, so the footer's last line is\ncapped at roughly 300 characters and ends with `(+n more)` when there were more.\nIf the line is missing entirely, no search was run.\n\n<details>\n<summary>The case that made this necessary</summary>\n\nAsked to compare six web frameworks by version _and_ bundle size, Gemini\nsearched six times for `<framework> current version` and once for bundle sizes.\nRendering strategy and learning curve were answered from its own knowledge.\nNothing in the answer itself gave that away - the source list was long and every\nsentence looked equally well supported.\n\n</details>\n\n## Command line tool\n\nThe server can also be driven without an MCP client - useful for checking that\nyour API key and model choice work before registering it, and for testing a\nchange during development without restarting the client.\n\nThe short command `gemini-grounding` exists once the package is\n[installed globally](#installing-globally). If you registered the server through\n`npx`, nothing was installed and the same commands run like this instead:\n\n```bash\nnpx -p @brobertoblanko/gemini-grounding-mcp gemini-grounding config\n```\n\n`-p` names the package, the argument after it the command. Without it,\n`npx @brobertoblanko/gemini-grounding-mcp` starts the MCP server rather than the\nCLI - it then waits silently on stdio, which looks like a hang.\n\n| Command                                 | Effect                                                                                                                                                     |\n| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `gemini-grounding \"<query>\"`            | Search using the saved defaults; `--model <id>` and `--thinking <level>` apply to this call only                                                           |\n| `gemini-grounding config`               | Shows the saved default and backup model with their thinking levels, whether an API key is present, where the config file lives, and the installed version |\n| `gemini-grounding models [--all]`       | Lists the models suggested for use here with their token limits; `--all` lists every one with a status column                                              |\n| `gemini-grounding set-model <id>`       | Persists the default model; add `--thinking <level>` to save both in one call                                                                              |\n| `gemini-grounding set-thinking <level>` | Persists the default thinking level (`minimal`, `low`, `medium`, `high`); `--model <id>` saves both                                                        |\n| `gemini-grounding set-backup <id\\|off>` | Persists a model to retry a failed request with; `--thinking <level>` gives it its own level, on its own it changes only that level                        |\n| `gemini-grounding help`                 | Short help                                                                                                                                                 |\n| `gemini-grounding version`              | Prints the installed version                                                                                                                               |\n\nWhich model and thinking level a call actually used is shown in the footer under\nevery answer. Every save prints the resulting configuration, so a change never\nhas to be followed by `config`:\n\n```console\n$ gemini-grounding set-backup gemini-3.5-flash\nSaved - Backup: gemini-3.5-flash, Backup thinking level: inherited from the call\n\nPrimary: gemini-flash-latest · high\nBackup:  gemini-3.5-flash · high (inherited)\n```\n\nThe MCP server's `gemini-set-model` answers with the same two lines.\n\n**Shared configuration.** The CLI and the MCP server read and write the same\nconfig file. A `set-model` in the terminal therefore also changes what the MCP\nserver uses on its next call - intentionally so, because it makes a model switch\npossible without having to ask the client to do it.\n\nArgument handling, error output, `npm link`, and migrating from an older clone:\nsee the [CLI documentation](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/cli.md),\nalso available [in German](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/cli.de.md).\n\n## Client configuration\n\nThe commands in the quick start cover Claude Code. Other clients that support\nlocal `stdio` servers need the equivalent entry in their own configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"gemini-grounding\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@brobertoblanko/gemini-grounding-mcp\"],\n      \"env\": {\n        \"GEMINI_API_KEY\": \"${GEMINI_API_KEY}\"\n      }\n    }\n  }\n}\n```\n\n**One caveat:** expanding `${GEMINI_API_KEY}` from the surrounding environment\nis a Claude Code feature, not part of the MCP standard. A client without\nvariable expansion will send the placeholder to the API verbatim and the request\nwill fail. If yours does not expand variables, consult its documentation for how\nit handles secrets rather than pasting the key here.\n\n## Installing globally\n\nTo install the package permanently instead of fetching it via `npx`:\n\n```bash\nnpm install -g @brobertoblanko/gemini-grounding-mcp\n```\n\nThis puts two commands on your `PATH`: `gemini-grounding-mcp` starts the MCP\nserver over stdio, and `gemini-grounding` is the\n[command line tool](#command-line-tool).\n\nThe trade-off is the usual one: the version stays put until you run\n`npm update -g`, which is an advantage when you want a known state and a chore\notherwise.\n\nRegistration then names that command directly, without `npx`.\n\n<details>\n<summary>Registering the installed command</summary>\n\n**Windows (PowerShell):**\n\n```powershell\nclaude mcp add gemini-grounding -s user `\n  -e 'GEMINI_API_KEY=${GEMINI_API_KEY}' `\n  -- gemini-grounding-mcp\n```\n\n**macOS / Linux (bash / zsh):**\n\n```bash\nclaude mcp add gemini-grounding -s user \\\n  -e 'GEMINI_API_KEY=${GEMINI_API_KEY}' \\\n  -- gemini-grounding-mcp\n```\n\nFor another client, `command` becomes the installed command and `args` can be\ndropped:\n\n```json\n{\n  \"mcpServers\": {\n    \"gemini-grounding\": {\n      \"command\": \"gemini-grounding-mcp\",\n      \"env\": {\n        \"GEMINI_API_KEY\": \"${GEMINI_API_KEY}\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary>Running from a clone</summary>\n\nTo work from the source:\n\n```bash\ngit clone https://github.com/brobertoblanko/gemini-grounding-mcp.git\ncd gemini-grounding-mcp\nnpm install\n```\n\nThen use `node <path-to-repo>/index.js` as the command. `claude mcp add` needs a\nconcrete absolute path that resolves on the machine in question.\n\n</details>\n\n## Removing it\n\n```bash\nclaude mcp remove gemini-grounding\n```\n\nThat unregisters the server; with `npx` nothing else was installed. A global\ninstall is removed with\n`npm uninstall -g @brobertoblanko/gemini-grounding-mcp`. If you ever saved a\ndefault, its file stays behind - see\n[Where settings are stored](#where-settings-are-stored).\n\n## Data and privacy\n\nSearch queries, and anything included in a request, are sent to the Gemini API\nand processed under Google's applicable terms and data handling policies.\n\nThis server adds no anonymization and no enterprise data isolation. Do not use\nit with confidential, personal or regulated data unless you have verified that\nthe service terms and your configuration are appropriate for it.\n\n## Where settings are stored\n\n`gemini-set-model` and the CLI's `set-*` commands write the default model,\nthinking level and backup model to:\n\n| Platform                         | Location                                            |\n| -------------------------------- | --------------------------------------------------- |\n| Linux, macOS                     | `~/.config/gemini-grounding-mcp/config.json`        |\n| Windows                          | `%APPDATA%\\gemini-grounding-mcp\\config.json`        |\n| Any, if `XDG_CONFIG_HOME` is set | `$XDG_CONFIG_HOME/gemini-grounding-mcp/config.json` |\n\nNeither the file nor its directory is created until you save a setting for the\nfirst time. Delete the file to return to the built-in defaults\n(`gemini-flash-latest`, thinking level `medium`, no backup model). It holds\nnothing but model names and thinking levels - **never the API key**. Run\n`gemini-grounding config` to see the exact path on your machine.\n\n## Documentation\n\n- [specs.md](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/specs.md) - architecture and design decisions, also [in German](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/specs.de.md)\n- [cli.md](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/cli.md) - the command line tool in detail, also [in German](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/cli.de.md)\n- [google_errors.md](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/google_errors.md) - what each Gemini API error code means, whether it is retried and what it costs, also [in German](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/docs/google_errors.de.md)\n- [CLAUDE.md](https://github.com/brobertoblanko/gemini-grounding-mcp/blob/main/CLAUDE.md) - working rules for Claude Code in this repository (German)\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}