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

@shigobo/gas-mcp

v0.2.0

Published

MCP server for Google Apps Script

Readme

gas-mcp

Claude Code から Google Apps Script (GAS) プロジェクトを直接操作できる MCP サーバーです。

コードの読み書き、プロジェクト管理、デプロイまで、すべて Claude Code 上で完結します。

セットアップ

1. 前提条件

2. Google Apps Script API を有効化

以下の URL にアクセスし、API を オン にしてください:

https://script.google.com/home/usersettings

3. Claude Code に MCP サーバーを登録

プロジェクトのルートディレクトリに .mcp.json を作成します:

{
  "mcpServers": {
    "gas": {
      "command": "npx",
      "args": ["-y", "gas-mcp"]
    }
  }
}

4. Claude Code を再起動

再起動後、/mcp コマンドで gas サーバーが表示され、8つのツールが利用可能になります。

5. Google 認証

Claude Code で以下のように伝えてください:

「GASの認証をして」

ブラウザが開き、Google アカウントの認証画面が表示されます。許可すると認証完了です。

注意: 「このアプリは確認されていません」という警告が表示された場合は、「詳細」→「(安全でないページ)に移動」 をクリックして続行してください。

使い方

自然言語で Claude Code に指示するだけです:

| やりたいこと | 指示の例 | |-------------|---------| | プロジェクト一覧 | 「GASプロジェクトを一覧表示して」 | | コード読み取り | 「scriptId XXX のコードを見せて」 | | コード編集 | 「XXX の Code.gs に hello 関数を追加して」 | | プロジェクト作成 | 「新しいGASプロジェクトを作って」 | | デプロイ | 「XXX をデプロイして」 | | デプロイ一覧 | 「XXX のデプロイ一覧を見せて」 |

scriptId の確認方法

  1. https://script.google.com/home を開く
  2. 対象のプロジェクトをクリック
  3. ブラウザのアドレスバーに表示される URL の projects/ の後ろの文字列が scriptId です
https://script.google.com/home/projects/【ここが scriptId】/edit

利用可能なツール

| ツール名 | 説明 | |---------|------| | gas_auth | Google 認証を実行 | | gas_list_projects | アクセス可能な GAS プロジェクト一覧 | | gas_get_files | プロジェクト内の全ファイルを読み取り | | gas_update_file | ファイルの作成・更新 | | gas_create_project | 新規プロジェクト作成 | | gas_run_function | 関数の実行 ※ | | gas_deploy | デプロイ(バージョン作成) | | gas_list_deployments | デプロイ一覧 |

gas_run_function は、スクリプトが OAuth クライアントと同じ GCP プロジェクトに紐付けられている必要があります。

アカウント切換

別の Google アカウントで認証し直したい場合:

  1. 認証ファイルを削除します:
    rm ~/.gas-mcp/credentials.json
  2. 再度 gas_auth を実行してください。

カスタム OAuth クライアント(オプション)

独自の OAuth クライアントを使用したい場合は、~/.gas-mcp/config.json を作成してください:

{
  "clientId": "YOUR_CLIENT_ID.apps.googleusercontent.com",
  "clientSecret": "YOUR_CLIENT_SECRET"
}

設定しない場合は、組み込みのデフォルト認証情報が使用されます。

ローカル開発

git clone <repo-url>
cd gas-mcp
npm install
npm run build
npm test

ローカルで動作確認する場合は .mcp.json を以下のように設定します:

{
  "mcpServers": {
    "gas": {
      "command": "node",
      "args": ["/path/to/gas-mcp/dist/index.js"]
    }
  }
}