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

google-sheets-writer

v0.1.9

Published

MCP server to read, write, and format Google Sheets from Claude — sign in with your own Google account.

Readme

Google Sheets Writer

An MCP server that lets Claude read, write, format, and create Google Sheets. You sign in with your own Google account — no spreadsheet sharing, no service accounts. Published on npm and run via npx, so it works in any MCP client (Claude Code, VS Code, Claude Desktop, CLI).

  • Scopes: spreadsheets + drive.file (both sensitive, not the heavy restricted full-drive scope).
  • Token: stored locally at ~/.google-sheets-writer/token.json, auto-refreshed.
  • Auth: the OAuth client is supplied by you via env (no secret is bundled in the npm package).

20 tools

sign_in, get_auth_status, create_spreadsheet, share_spreadsheet, list_sheets, read_range, write_range, append_rows, update_cells, clear_range, add_sheet, delete_sheet, format_cells, set_borders, merge_cells, unmerge_cells, freeze, set_dimension_size, add_dropdown, add_conditional_format.

All spreadsheet_id / folder_id args accept a raw id or a full URL. Writes default to USER_ENTERED (formulas & dates are parsed).


Install

Requires Node.js installed (so npx is available).

1. Create your own Google OAuth client (one time)

In Google Cloud Console:

  1. Enable the Google Sheets API and Google Drive API.
  2. APIs & Services → Credentials → Create Credentials → OAuth client ID → Desktop app → download the JSON (e.g. to C:\Users\you\oauth-client.json).
  3. On the OAuth consent screen, add yourself under Test users (or use Internal if you're in a Google Workspace org).

2. Add the MCP server to your client's config

Same JSON block everywhere — only the file location differs:

{
  "mcpServers": {
    "gsheet-writer": {
      "command": "npx",
      "args": ["-y", "google-sheets-writer@latest"],
      "env": {
        "GOOGLE_OAUTH_CLIENT_FILE": "C:\\Users\\you\\oauth-client.json"
      }
    }
  }
}

| Client | Where to put it | |--------|-----------------| | Claude Code / VS Code | .mcp.json in the project root, or claude mcp add | | Claude Desktop | %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config) | | CLI | project .mcp.json |

@latest means each restart automatically picks up the newest published version.

3. Use it

Restart / reload the client, then just ask Claude to work with a sheet, e.g. "read this sheet <link>". On the first request a browser opens for Google sign-in — approve it and Claude continues automatically. No separate "connect" step needed (a sign_in tool exists if you ever want to connect explicitly).

Auth options: set GOOGLE_OAUTH_CLIENT_FILE (path) or GOOGLE_OAUTH_CLIENT_JSON (inline JSON) in the env block. The npm package ships without any bundled OAuth client, so no secret is ever published.


For developers

npm install
npm run typecheck
npm run build        # esbuild -> dist/index.js (self-contained, has a shebang/bin)

Run locally by pointing the env var at your client file:

GOOGLE_OAUTH_CLIENT_FILE=C:\path\to\oauth-client.json node dist/index.js

Publish a new version

npm version patch    # bump
npm run build
npm publish          # requires npm auth (2FA OTP or an automation token)

The npm tarball only contains dist/index.js, package.json, and README.md (the files whitelist) — never credentials.json.

Auth resolution order (runtime)

  1. GOOGLE_OAUTH_CLIENT_JSON (inline JSON) — env
  2. GOOGLE_OAUTH_CLIENT_FILE (path) — env
  3. bundled dist/credentials.json, if present (used only for a self-contained build; not shipped to npm)