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

@fukayatti0/googlesearch-mcp

v1.1.1

Published

Google Web Search MCP Server - Perfect recreation of gemini-cli's google_web_search tool

Readme

Google Web Search MCP Server

npm version License: Apache 2.0

Google Custom Search API を使用した Model Context Protocol (MCP) サーバーです。gemini-cli と google/genai のgoogle_web_searchツールと完全互換性があります。

特徴

  • gemini-cli 互換: google_web_searchツールを完全再現
  • google/genai 互換: Google GenAI SDK の検索機能と同等
  • 構造化された結果: 引用付きの詳細な検索結果
  • メタデータサポート: Open Graph データ、公開日時、画像情報を含む
  • エラーハンドリング: 詳細なエラーメッセージとトラブルシューティング情報

セットアップ

1. 依存関係のインストール

npm install -g @fukayatti0/googlesearch-mcp

2. 環境変数の設定

以下の環境変数を設定してください:

export GOOGLE_API_KEY="your_google_api_key"
export CUSTOM_SEARCH_ENGINE_ID="your_custom_search_engine_id"

3. Google Custom Search API の設定

  1. Google Cloud Consoleでプロジェクトを作成
  2. Custom Search JSON API を有効化
  3. API キーを作成
  4. Programmable Search Engineでカスタム検索エンジンを作成
    • ウェブ全体を検索を有効にする(*を検索対象に追加)
  5. 検索エンジン ID を取得。

使用方法

MCP クライアントでの使用

このサーバーは以下のツールを提供します:

google_web_search (gemini-cli 互換)

Google Web 検索します。gemini-cli のgoogle_web_searchツールと同じインターフェースです。

パラメータ:

  • query (string, 必須): 検索クエリ

例:

google_web_search(query="latest advancements in AI-powered code generation")

google_search (後方互換性)

Google 検索します。追加のパラメータをサポートします。

パラメータ:

  • query (string, 必須): 検索クエリ
  • num_results (number, オプション): 返す結果の数 (デフォルト: 10, 最大: 10)

例:

{
  "name": "google_search",
  "arguments": {
    "query": "TypeScript MCP server",
    "num_results": 5
  }
}

出力形式

検索結果は以下の構造化された形式で返されます:

# Web Search Results for "your query"

Found 1,234,567 results in 0.45 seconds

## 1. Page Title

**URL:** https://example.com/page
**Domain:** example.com
**Snippet:** Brief description of the page content...
**Description:** More detailed Open Graph description if available
**Published:** 2024-01-15T10:30:00Z
**Image:** https://example.com/image.jpg

---

## Sources

[1] Page Title - https://example.com/page
[2] Another Page - https://example.com/another

MCP 設定例

Claude Desktop / Kiro

{
  "mcpServers": {
    "google-web-search": {
      "command": "node",
      "args": ["/path/to/googlesearch-mcp/build/index.js"],
      "env": {
        "GOOGLE_API_KEY": "your_google_api_key",
        "CUSTOM_SEARCH_ENGINE_ID": "your_custom_search_engine_id"
      }
    }
  }
}

uvx 経由での実行

{
  "mcpServers": {
    "google-web-search": {
      "command": "npx",
      "args": ["@fukayatti0/googlesearch-mcp"],
      "env": {
        "GOOGLE_API_KEY": "your_google_api_key",
        "CUSTOM_SEARCH_ENGINE_ID": "your_custom_search_engine_id"
      }
    }
  }
}

gemini-cli との互換性

この MCP サーバーは、gemini-cli のgoogle_web_searchツールと完全に互換性があります。

  • 同じツール名: google_web_search
  • 同じパラメータ: queryのみ
  • 同じ出力形式: 構造化された Markdown 形式
  • 同じ機能: Web 検索結果の要約と引用

gemini-cli から移行する場合、設定を変更するだけで同じ機能を利用できます。

トラブルシューティング

よくあるエラー

  1. API Key not found: GOOGLE_API_KEY環境変数が設定されていません
  2. Custom Search Engine ID not found: CUSTOM_SEARCH_ENGINE_ID環境変数が設定されていません
  3. API quota exceeded: 1 日 100 クエリの無料枠を超過しました
  4. Invalid API key: API キーが無効または権限がありません

制限事項

  • 無料枠: 1 日 100 クエリまで無料
  • 結果数: 最大 10 件まで(Google Custom Search API の制限)
  • レート制限: 秒間 100 クエリまで

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.