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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@elchika-inc/open-custom-search-api-mcp-server

v0.1.0

Published

MCP server for Google Custom Search API

Readme

Open Custom Search API MCP Server

license npm version npm downloads GitHub stars

A Model Context Protocol (MCP) server that provides access to Google's Custom Search API for web search functionality.

Features

  • Google Custom Search Integration: Leverage Google's powerful search capabilities
  • Configurable Result Limits: Customize the number of results (1-10) per search
  • Environment Variable Configuration: Secure API credential management
  • Comprehensive Error Handling: Robust error management for API failures
  • Structured Response Format: Well-formatted search results with metadata
  • Rate Limiting: Built-in protection against API quota exhaustion

MCP Client Configuration

Add this server to your MCP client configuration:

{
  "mcpServers": {
    "custom-search": {
      "command": "npx",
      "args": ["@elchika-inc/open-custom-search-api-mcp-server"],
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key",
        "GOOGLE_SEARCH_ENGINE_ID": "your-custom-search-engine-id"
      }
    }
  }
}

Available Tools

google_search

Searches the web using Google Custom Search API with configurable result limits.

Parameters:

  • query (required): The search query string
  • limit (optional): Maximum number of results to return (1-10, default: 10)

Examples:

Basic search:

{
  "name": "google_search",
  "arguments": {
    "query": "MCP server development"
  }
}

Limited results search:

{
  "name": "google_search",
  "arguments": {
    "query": "TypeScript best practices",
    "limit": 5
  }
}

Response Format:

{
  "query": "MCP server development",
  "totalResults": "1000000",
  "searchTime": 0.123,
  "results": [
    {
      "title": "Example Result",
      "link": "https://example.com",
      "snippet": "This is an example search result...",
      "displayLink": "example.com"
    }
  ]
}

Prerequisites

  1. Google API Key: Obtain from Google Cloud Console

    • Enable the Custom Search API in your Google Cloud project
    • Create credentials (API key) for your application
  2. Custom Search Engine ID: Create at Google Custom Search

    • Set up a custom search engine
    • Configure search settings and domains
    • Copy the Search Engine ID

Environment Variables

The server requires the following environment variables:

  • GOOGLE_API_KEY: Your Google API key from Google Cloud Console
  • GOOGLE_SEARCH_ENGINE_ID: Your Custom Search Engine ID from Google Custom Search

Error Handling

Common error scenarios:

  • Invalid or missing API credentials
  • API quota exceeded or rate limits
  • Network connection issues
  • Invalid search parameters
  • Custom Search Engine configuration errors

License

MIT