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

@srigi/mcp-google-images-search

v0.3.0

Published

MCP server for searching images with Google

Readme

🖼️ Google Images Search MCP

Search. See. Save. – The only MCP that shows Google Images results directly in your chat as actual images, not just links!

Unlike other tools that return text descriptions or links, this MCP displays search results as actual images in your conversation. Works with Cline and Windsurf.

Perfect for getting visual inspiration, finding assets for projects, or quickly browsing images without leaving your IDE.

Demo

Demo

Usage & Requirements

Requirements

  • Node.js v20+
  • Google Cloud Platform account (free tier sufficient)
  • Compatible IDE: Cline or Windsurf

Setup Guide

Follow these steps to set up this MCP:

Step 1: create Google Custom search engine

  1. Go to Google Programmable Search Engine
  2. Click "Add" to create a new search engine
  3. In "Sites to search", enter * (asterisk) to search the entire web
  4. Give your search engine a name (e.g., "My Image Search")
  5. In the search engine settings, enable "Image search" option
  6. Click "Create"
  7. Copy the Search engine ID - you'll need this for configuration

Step 2: Get Google API Key

  1. Go to Google Cloud Console API Credentials
  2. If you don't have a project, create one
  3. Click "+ CREATE CREDENTIALS""API key"
  4. Copy the generated API key
  5. (Optional) Restrict the API key to "Custom Search API" for security

Step 3: Configure MCP in Your IDE

Add the following configuration to your MCP settings:

{
  "mcpServers": {
    "googleImagesSearch": {
      "command": "npx",
      "args": ["-y", "@srigi/mcp-google-images-search"],
      "env": {
        "API_KEY": "your-google-api-key-here",
        "SEARCH_ENGINE_ID": "your-search-engine-id-here"
      },
      "autoApprove": ["search_image", "persist_image"]
    }
  }
}

Replace your-google-api-key-here and your-search-engine-id-here with the values from steps 1 and 2.

Usage Example

Here's how to use the MCP once configured:

  1. Search for images: Ask your AI assistant to search for images

    Find 5 images of F-22
  2. Get more results: Request additional search results

    Find 5 more images
  3. Save an image: Ask to save a specific result to your project

    Save the 3rd image to the "assets" folder

The MCP will display the search results as actual images in your chat history, and you can easily save any of them to your local project directory.

🚀 Development

Want to contribute? Great! Quality contributions are welcomed.

Requirements: Node.js v20+, direnv, PNPM v10

Quick start:

  1. Copy .envrc (example) to .envrc and add your Google API credentials
  2. Run pnpm install && pnpm dev
  3. Update your MCP configuration for development:
{
  "mcpServers": {
    "googleImagesSearch": {
      "command": "node",
      "args": ["/absolute/path/to/project/src/index.js", "--debug", "--pretty-print"],
      "env": {
        "API_KEY": "your-google-api-key-here",
        "SEARCH_ENGINE_ID": "your-search-engine-id-here"
      },
      "autoApprove": ["search_image", "persist_image"]
    }
  }
}

Debug and logging options:

  • No --debug flag provided - logging is disabled
  • --debug without argument - enable logging into debug.log in current working directory the running MCP
  • --debug /absolute/path/to/debug.log - enable logging and write logs to the specified absolute path
  • --pretty-print - Format logs for better readability (formatted JSON output)

note: only absolute path is allowed when providing a path to --debug. Relative paths will cause the server to exit with an error!

Writing TypeScript code:

The pnpm dev auto-recompile all changes to .ts files. But you must reload your MCP server manually for changes to be reflected in your IDE.

Use pnpm dev:inspector for interactive testing in the browser.

🛠️ Available Tools

🔍 search_image - Find images using Google's vast database

  • query (required) - What you're looking for
  • count (1-10, default: 2) - How many results
  • safe ('off'/'medium'/'high') - Filter level
  • startIndex - For pagination

💾 persist_image - Download and save images to your project

  • url (required) - Image URL to download
  • targetPath (required) - Where to save it (folder or full path)

Security features: Path validation, MIME type checking, 10MB size limit, supports all major image formats (JPEG, PNG, GIF, WebP, SVG, etc.)


🔗 Links: GitHubNPMIssues