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

@cl0ud95/google-workspace-mcp

v1.2.2

Published

MCP server for Google Drive and Sheets via Apps Script proxy

Readme

Google Workspace MCP

MCP server for Google Drive and Sheets, backed by a Google Apps Script proxy running in the client's Google account.

How It Works

Agent Container → MCP Server (stdio) → HTTP → Apps Script (Google) → Drive/Sheets API
  • Apps Script runs in the client's Google account — handles auth via Google session, scopes all operations to a configurable root folder
  • MCP Server (this repo) translates MCP tool calls into HTTP requests to the Apps Script URL
  • No credentials in the container — just a URL and API key env var

Setup

1. Deploy the Apps Script

  1. Go to script.google.com and create a new project
  2. Replace the default Code.gs with the contents of apps-script/Code.gs
  3. Configure script properties (File > Project properties > Script properties):
    • ROOT_FOLDER_ID — the Google Drive folder ID that scopes all operations (copy from the URL: https://drive.google.com/drive/folders/{THIS_IS_THE_ID})
    • APPS_SCRIPT_API_KEY — a secret key of your choosing (e.g. a random string)
  4. Deploy as web app:
    • Click Deploy > New deployment
    • Type: Web app
    • Execute as: Me
    • Who has access: Anyone
    • Copy the resulting URL

2. Configure the MCP Server

{
  "mcpServers": {
    "google-apps": {
      "command": "node",
      "args": ["/path/to/google-workspace-mcp/dist/index.js"],
      "env": {
        "GOOGLE_APPS_SCRIPT_URL": "https://script.google.com/macros/s/{YOUR_SCRIPT_ID}/exec",
        "GOOGLE_APPS_SCRIPT_API_KEY": "your-api-key-here"
      }
    }
  }
}

3. Verify

curl "https://script.google.com/macros/s/{YOUR_SCRIPT_ID}/exec?action=drive_list&api_key=your-api-key-here"

Should return a JSON response with { "success": true, ... }.

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | GOOGLE_APPS_SCRIPT_URL | Yes | — | Deployed Apps Script web app URL | | GOOGLE_APPS_SCRIPT_API_KEY | Yes | — | Must match APPS_SCRIPT_API_KEY in Script Properties | | GOOGLE_SERVICES | No | drive,sheets | Comma-separated list of enabled services | | GOOGLE_READONLY | No | false | If true, only read tools are registered | | GOOGLE_TIMEOUT | No | 30000 | HTTP timeout in ms |

Service Filtering

Only register tools the agent needs — saves context tokens:

"GOOGLE_SERVICES": "sheets"       // Only Sheets tools
"GOOGLE_SERVICES": "drive,sheets" // Both (default)
"GOOGLE_SERVICES": "drive"        // Only Drive tools

Read-Only Mode

For agents that should only observe, not modify:

"GOOGLE_READONLY": "true"

Tools

Drive (12 tools)

| Tool | R/W | Description | |------|-----|-------------| | drive_list_files | R | List files in folder (paginated) | | drive_get_file | R | Get file metadata | | drive_read_file | R | Read text file content (truncates at 1MB) | | drive_download | R | Get download URL for binary files | | drive_search | R | Search files by name in root tree | | drive_tree | R | Get folder tree structure | | drive_create_folder | W | Create folder | | drive_create_file | W | Create text file | | drive_update_file | W | Update file content | | drive_move_file | W | Move file to different folder | | drive_rename_file | W | Rename file/folder | | drive_delete_file | W | Trash file/folder |

Sheets (12 tools)

| Tool | R/W | Description | |------|-----|-------------| | sheets_list | R | List all spreadsheets in root folder tree | | sheets_get_info | R | Get spreadsheet metadata and sheets | | sheets_get_sheet | R | Get specific sheet/tab metadata | | sheets_read_cell | R | Read single cell | | sheets_read_range | R | Read range (truncates at 10k rows) | | sheets_read_all | R | Read entire sheet | | sheets_write_cell | W | Write single cell | | sheets_write_range | W | Write 2D array to range | | sheets_append_row | W | Append row to end of sheet | | sheets_clear_range | W | Clear range values | | sheets_create_sheet | W | Create new sheet/tab | | sheets_create_spreadsheet | W | Create new spreadsheet file | | sheets_delete_sheet | W | Delete sheet/tab |

Sheets tools accept either spreadsheet_id (direct file ID) or spreadsheet_name (searches root folder tree).

NanoClaw Agent Config

Add to clients/{client}/agents/{agent}/.mcp.json:

{
  "mcpServers": {
    "google-apps": {
      "command": "node",
      "args": ["/path/to/google-workspace-mcp/dist/index.js"],
      "env": {
        "GOOGLE_APPS_SCRIPT_URL": "https://script.google.com/macros/s/{SCRIPT_ID}/exec",
        "GOOGLE_APPS_SCRIPT_API_KEY": "your-api-key-here",
        "GOOGLE_SERVICES": "sheets",
        "GOOGLE_READONLY": "true"
      }
    }
  }
}

Build

npm install
npm run build