npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jxspam/google-ai-search-mcp

v1.0.23

Published

Using the Gemini API Key to access Google Search results (just like Perplexity, Brave, Tavily)

Readme

Google AI Search MCP Server

A Model Context Protocol (MCP) server that provides Google Search capabilities using the Gemini API with Google Search grounding. This allows AI assistants to search Google and get real-time information.

Features

  • 🔍 Google Search integration via Gemini API
  • 🤖 Full MCP protocol support
  • 🌐 Real-time search results
  • 📝 Structured responses
  • ⚡ Fast and reliable

Installation

Global Installation

npm install -g @jxspam/google-ai-search-mcp

Usage in MCP Settings

Add this to your MCP settings configuration:

{
  "mcp": {
    "servers": {
      "google-search": {
        "command": "npx",
        "args": [
          "-y",
          "@jxspam/google-ai-search-mcp@latest",
          "--apiKey",
          "YOUR_GEMINI_API_KEY"
        ]
      }
    }
  }
}

API Key Setup

Get your Gemini API key from Google AI Studio.

You can provide the API key in two ways:

  1. Command line argument (recommended for MCP):

    npx @jxspam/google-ai-search-mcp --apiKey YOUR_API_KEY
  2. Environment variable:

    export GEMINI_API_KEY=your_api_key_here
    npx @jxspam/google-ai-search-mcp

Gemini Models & Google Search Grounding

This MCP server defaults to Gemini 1.5 Flash Latest for optimal performance and grounding access. You can specify different models using the model parameter.

Official Free Tier Google Search Grounding Support

According to Google's official documentation:

| Model | Free Tier Grounding with Google Search | | ----------------------- | ----------------------------------------- | | Gemini 2.5 Flash | ✅ Up to 500 RPD (shared with Flash-Lite) | | Gemini 2.5 Flash-Lite | ✅ Up to 500 RPD (shared with Flash) | | Gemini 2.0 Flash | ✅ Up to 500 RPD | | Gemini 1.5 family (all) | ❌ Not available in free tier | | Gemini 2.5 Pro | ❌ Not available in free tier | | Gemini 2.0 Flash-Lite | ❌ No support for grounding |

RPD: Requests Per Day

Actual Test Results (June 24, 2025)

| Model | Test Results | Notes | | ----------------------------- | -------------- | ---------------------------------- | | Gemini 1.5 Flash Latest | ✅ Working | Recommended default model | | Gemini 2.5 Flash Experimental | ✅ Working | Latest experimental model | | Gemini 2.0 Flash Experimental | ✅ Working | Good performance | | Gemini 2.0 Flash Lite | ✅ Working | Works despite official docs | | Gemini 1.5 Pro | ✅ Working | May depend on API key access level | | Gemini 2.5 Pro | ✅ Working | May depend on API key access level |

Note: Test results may vary based on your API key's access level, billing status, or Google's current free tier policies.

Recommended Models

  • Gemini 1.5 Flash Latest (default) - Most reliable and well-tested
  • Gemini 2.5 Flash Experimental - Latest features with grounding
  • Gemini 2.0 Flash Experimental - Good balance of performance
  • Gemini 1.5 Flash - Stable alternative
  • Gemini 1.5 Pro Latest - Higher quality responses

Search Parameters

The search tool supports the following parameters:

  • query (required): The search query string
  • language (optional): Language code for results (default: "en-US")
  • limit (optional): Max results to process, 1-20 (default: 10)
  • model (optional): Gemini model to use (default: "gemini-1.5-flash-latest")

Example with parameters:

{
  "query": "latest AI developments",
  "language": "en-US",
  "limit": 15,
  "model": "gemini-1.5-flash-latest"
}

Usage

Once configured, you can use the search tool through your MCP-compatible client:

search for "latest AI news"
search for "weather today in New York"
search for "stock market updates"

MCP Protocol Support

This server implements the full MCP protocol with:

  • initialize - Protocol initialization
  • tools/list - List available tools
  • tools/call - Execute search queries

Tool Schema

{
  "name": "search",
  "description": "Search Google for relevant information and answers using Gemini AI",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "description": "The search query string"
      },
      "language": {
        "type": "string",
        "description": "Language for search results (e.g., en-US, zh-CN, es-ES, fr-FR, de-DE, ja-JP, ko-KR, pt-BR, it-IT, ru-RU, ar-SA, hi-IN, th-TH, vi-VN, nl-NL, sv-SE, no-NO, da-DK, fi-FI, pl-PL, tr-TR, he-IL, fa-IR, uk-UA, cs-CZ, sk-SK, hu-HU, ro-RO, bg-BG, hr-HR, sl-SI, et-EE, lv-LV, lt-LT, mt-MT, ga-IE, cy-GB, is-IS, mk-MK, sq-AL, sr-RS, bs-BA, me-ME, az-AZ, kk-KZ, ky-KG, uz-UZ, tg-TJ, mn-MN, my-MM, km-KH, lo-LA, si-LK, ne-NP, bn-BD, ta-LK, ml-IN, te-IN, kn-IN, gu-IN, pa-IN, or-IN, as-IN, mr-IN, sa-IN, kok-IN, mni-IN, sd-IN, mai-IN, bho-IN, ks-IN, ur-PK, ps-AF, fa-AF, uz-AF, tk-TM, ky-CN, ug-CN, bo-CN, ii-CN, za-CN, yo-NG, ig-NG, ha-NG, ff-SN, wo-SN, sw-KE, so-SO, am-ET, ti-ET, om-ET, rw-RW, rn-BI, lg-UG, ak-GH, tw-GH, ee-GH, bm-ML, dyo-SN, ses-ML, sg-CF, ln-CD, kg-CD, lua-CD, zu-ZA, xh-ZA, af-ZA, nso-ZA, tn-ZA, st-ZA, ts-ZA, ss-ZA, ve-ZA, nr-ZA)",
        "default": "en-US"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of search results to process (1-20)",
        "minimum": 1,
        "maximum": 20,
        "default": 10
      },
      "model": {
        "type": "string",
        "description": "Gemini model to use for search and response generation",
        "enum": [
          "gemini-2.5-flash",
          "gemini-2.5-flash-lite",
          "gemini-2.0-flash",
          "gemini-1.5-pro",
          "gemini-1.5-flash",
          "gemini-1.5-pro-latest",
          "gemini-1.5-flash-latest"
        ],
        "default": "gemini-1.5-flash-latest"
      }
    },
    "required": ["query"]
  }
}

Version History

v1.0.23

  • Only started from this version works (from 24 June 2025)

License

ISC

Contributing

Pull requests welcome! Please ensure tests pass and follow existing code style.