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

@franciscpd/drive-mcp-server

v1.0.0

Published

MCP server for Google Drive, Docs, Sheets, and Slides — manage files, documents, spreadsheets, and presentations via AI agents

Readme

@franciscpd/drive-mcp-server

CI npm version License: MIT

A Model Context Protocol (MCP) server for Google Drive, Docs, Sheets, and Slides. Manage files, documents, spreadsheets, and presentations through AI agents — powered by 3 environment variables.

Quick Start

npx -y @franciscpd/drive-mcp-server

Set these environment variables:

| Variable | Description | |----------|-------------| | GOOGLE_DRIVE_CLIENT_ID | OAuth2 client ID from Google Cloud Console | | GOOGLE_DRIVE_CLIENT_SECRET | OAuth2 client secret | | GOOGLE_DRIVE_REFRESH_TOKEN | OAuth2 refresh token (see Setup Guide) | | LOG_LEVEL | (optional) Logging verbosity: debug, info, warn, error (default: info) |

Setup Guide

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project (or select an existing one)
  3. Note your project name for the next steps

2. Enable APIs

Navigate to APIs & ServicesLibrary and enable each of the following:

Drive API

  1. Search for "Google Drive API"
  2. Click Enable

Docs API

  1. Search for "Google Docs API"
  2. Click Enable

Sheets API

  1. Search for "Google Sheets API"
  2. Click Enable

Slides API

  1. Search for "Google Slides API"
  2. Click Enable

3. Create OAuth2 Credentials

  1. Navigate to APIs & ServicesCredentials
  2. Click Create CredentialsOAuth client ID
  3. If prompted, configure the OAuth consent screen:
    • User type: External (or Internal for Workspace)
    • Add the scopes:
      • https://www.googleapis.com/auth/drive
      • https://www.googleapis.com/auth/documents
      • https://www.googleapis.com/auth/spreadsheets
      • https://www.googleapis.com/auth/presentations
    • Add your email as a test user
  4. Application type: Web application
  5. Add https://developers.google.com/oauthplayground as an authorized redirect URI
  6. Save your Client ID and Client Secret

4. Get a Refresh Token

  1. Go to Google OAuth2 Playground
  2. Click the gear icon (top right) and check Use your own OAuth credentials
  3. Enter your Client ID and Client Secret
  4. In the left panel, select these scopes:
    • Drive API v3https://www.googleapis.com/auth/drive
    • Google Docs API v1https://www.googleapis.com/auth/documents
    • Google Sheets API v4https://www.googleapis.com/auth/spreadsheets
    • Google Slides API v1https://www.googleapis.com/auth/presentations
  5. Click Authorize APIs and grant access
  6. Click Exchange authorization code for tokens
  7. Copy the Refresh token

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["-y", "@franciscpd/drive-mcp-server"],
      "env": {
        "GOOGLE_DRIVE_CLIENT_ID": "your-client-id",
        "GOOGLE_DRIVE_CLIENT_SECRET": "your-client-secret",
        "GOOGLE_DRIVE_REFRESH_TOKEN": "your-refresh-token",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["-y", "@franciscpd/drive-mcp-server"],
      "env": {
        "GOOGLE_DRIVE_CLIENT_ID": "your-client-id",
        "GOOGLE_DRIVE_CLIENT_SECRET": "your-client-secret",
        "GOOGLE_DRIVE_REFRESH_TOKEN": "your-refresh-token",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

Generic MCP Client

GOOGLE_DRIVE_CLIENT_ID=your-client-id \
GOOGLE_DRIVE_CLIENT_SECRET=your-client-secret \
GOOGLE_DRIVE_REFRESH_TOKEN=your-refresh-token \
LOG_LEVEL=debug \
npx -y @franciscpd/drive-mcp-server

The server communicates over stdio using the MCP protocol.

Tools

Drive

| Tool | Description | |------|-------------| | drive_search | Search files across Google Drive using query syntax | | drive_list | List files and folders in a specific folder | | drive_create_folder | Create a new folder in Google Drive | | drive_upload | Upload a text file to Google Drive | | drive_read | Read file content (exports Docs as Markdown, Sheets as CSV, Slides as plain text) | | drive_delete | Move a file or folder to trash (soft delete) | | drive_move | Move a file to a different folder | | drive_copy | Copy a file with optional new name and parent | | drive_rename | Rename a file or folder | | drive_share | Share a file or folder with a user by email | | drive_list_shared_drives | List available Shared Drives |

Docs

| Tool | Description | |------|-------------| | docs_create | Create a new Google Doc with optional initial content | | docs_read | Read document content as plain text with paragraph indices | | docs_insert_text | Insert text at a specific position | | docs_delete_text | Delete a range of text | | docs_list_comments | List all comments on a document | | docs_add_comment | Add a comment to a document |

Sheets

| Tool | Description | |------|-------------| | sheets_create | Create a new spreadsheet with optional initial data | | sheets_read | Read cell values from a range (A1 notation) | | sheets_update | Update cell values in a range (literal text, no formula execution) | | sheets_list | List all sheets (tabs) in a spreadsheet |

Slides

| Tool | Description | |------|-------------| | slides_create | Create a new Google Slides presentation | | slides_read | Read presentation content including objectIds and text | | slides_add_slide | Add a new slide with optional layout | | slides_insert_text | Insert or replace text in a slide shape |

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Start the server
npm start

License

MIT