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

pse-mcp

v0.1.3

Published

MCP server for Google search and webpage analysis

Readme

Version 2.0 is here

Google Search MCP Server

An MCP (Model Context Protocol) server that provides Google search capabilities. This server enables AI models to perform Google searches programmatically.

Features

  • Google Custom Search integration
  • Advanced search features (filters, sorting, pagination, categorization)
  • Optimized, human-readable responses
  • MCP-compliant interface

Prerequisites

  • Node.js (v16 or higher)
  • Google Cloud Platform account
  • Custom Search Engine ID
  • Google API Key

Configuration

  1. Set up environment variables for your Google API credentials:

You can either set these as system environment variables or configure them in your MCP settings file.

Required environment variables:

  • GOOGLE_API_KEY: Your Google API key
  • GOOGLE_SEARCH_ENGINE_ID: Your Custom Search Engine ID
  1. mcp settings:
{
  "mcpServers": {
    "google-search": {
      "command": "npx",
      "args": [
        "-y",
        "pse-mcp"
      ],
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key",
        "GOOGLE_SEARCH_ENGINE_ID": "your-custom-search-engine-id"
      }
    }
  }
}

Available Tools

1. google_search

Search Google and return relevant results from the web. This tool finds web pages, articles, and information on specific topics using Google's search engine.

{
  "name": "google_search",
  "arguments": {
    "query": "your search query",
    "num_results": 10, // optional, default: 10
    "site": "example.com", // optional, limit results to specific website
    "language": "en", // optional, filter by language (ISO 639-1 code)
    "dateRestrict": "m6", // optional, filter by date (e.g., "m6" for last 6 months)
    "exactTerms": "exact phrase", // optional, search for exact phrase
    "resultType": "news", // optional, specify type (news, images, videos)
    "page": 2, // optional, page number for pagination (starts at 1)
    "resultsPerPage": 10, // optional, default: 10, max: 10
    "sort": "date" // optional, sort by "date" or "relevance" (default)
  }
}

Response includes:

  • Search results with title, link, snippet in a readable format
  • Pagination information (current page, total results, etc.)
  • Categories of results (automatically detected)
  • Navigation hints for pagination

Getting Google API Credentials

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Custom Search API
  4. Create API credentials (API Key)
  5. Go to the Custom Search Engine page
  6. Create a new search engine and get your Search Engine ID
  7. Add these credentials to your MCP settings file or set them as environment variables

Error Handling

The server provides detailed error messages for:

  • Missing or invalid API credentials
  • Failed search requests
  • Invalid webpage URLs
  • Network connectivity issues

Architecture

The server is built with TypeScript and uses the MCP SDK to provide a standardized interface for AI models to interact with Google Search. It consists of the GoogleSearchService, which handles Google API interactions for search functionality.

The server uses caching mechanisms to improve performance and reduce API calls.

License

MIT