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

@lensscode/ohmygpt-serper-mcp

v1.0.0

Published

Serper MCP Server - Google Search via Serper API (powered by OhMyGPT)

Readme

OhMyGPT Serper MCP Server (Node.js/TypeScript)

Google Search via Serper API (powered by OhMyGPT) - MCP Server Implementation in TypeScript.

Features

  • ✅ Google search via Serper API
  • ✅ Configurable geolocation and language
  • ✅ Cache control
  • ✅ Pagination support
  • ✅ Formatted output (answer box, organic results, related searches)
  • ✅ Zero rate limits (uses your own API key)
  • ✅ Native Node.js implementation (no Python required)
  • ✅ TypeScript for type safety

Requirements

  • Node.js 18.0.0 or higher
  • Serper API key

Installation

Option 1: NPX (Recommended)

No installation needed! Just configure Claude Desktop and it will run via npx.

Option 2: Global Install

npm install -g @lensscode/ohmygpt-serper-mcp

Option 3: Local Development

cd serper-mcp-js
npm install
npm run build

Claude Desktop Configuration

Add to your Claude Desktop config file:

macOS

~/Library/Application\ Support/Claude/claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

NPX Configuration (Recommended)

{
  "mcpServers": {
    "ohmygpt-serper": {
      "command": "npx",
      "args": ["-y", "@lensscode/ohmygpt-serper-mcp"],
      "env": {
        "SERPER_API_KEY": "your_api_key_here"
      }
    }
  }
}

Local Development Configuration

{
  "mcpServers": {
    "ohmygpt-serper": {
      "command": "node",
      "args": ["/absolute/path/to/serper-mcp-js/build/index.js"],
      "env": {
        "SERPER_API_KEY": "your_api_key_here"
      }
    }
  }
}

Environment Variables

  • SERPER_API_KEY (required) - Your Serper API key
  • SERPAPI_BASE_URL (optional) - Custom API base URL (default: https://api.ohmygpt.com)

Usage

Once configured, you can use the search tool in Claude Code:

search with "How to build an MCP server"

Parameters

  • q (required): Search query
  • cache (optional): Cache control (default: 3)
  • gl (optional): Geolocation code (e.g., "us", "cn")
  • hl (optional): Language code (e.g., "en", "zh-CN")
  • page (optional): Page number (default: 1)
  • num (optional): Results per page, max 100 (default: 10, >10 costs double credits)

Examples

Basic search:

search with "quantum computing"

Search with language and location:

search with "quantum computing" and hl="zh-CN" and gl="cn"

Get more results:

search with "python tutorials" and num=20

Development

Install Dependencies

npm install

Build

npm run build

Development Mode

npm run dev

This uses tsx to run TypeScript directly without building.

Test Locally

# Set API key
export SERPER_API_KEY="your_api_key_here"

# Run server
npm run dev

Project Structure

serper-mcp-js/
├── src/
│   ├── index.ts       # MCP server entry point
│   └── search.ts      # Serper API client
├── build/             # Compiled JavaScript (generated)
├── package.json       # NPM configuration
├── tsconfig.json      # TypeScript configuration
└── README.md          # This file

API Credits

  • Non-cached successful queries: 500 tokens/query
  • Cached queries: FREE
  • Results >10 per page: DOUBLE cost

Troubleshooting

Error: "API key not configured"

Make sure SERPER_API_KEY is set:

echo $SERPER_API_KEY  # should show your key

Server not starting

Check Node.js version:

node --version  # should be >= 18.0.0

NPX not found

Make sure npm is installed and up to date:

npm --version
npm install -g npm@latest

Comparison with Python Version

| Feature | Python | Node.js | |---------|--------|---------| | Runtime | Python 3.10+ | Node.js 18+ | | Dependencies | mcp, httpx, pydantic | @modelcontextprotocol/sdk | | Installation | pip install | npm install or npx | | Type Safety | Optional (with mypy) | Built-in (TypeScript) | | SSE Mode | ✅ Supported | 🔄 Future | | Docker | ✅ Supported | ✅ Supported |

License

MIT

Links