MCP Hub
Back to servers

mcp-google-gdrive

An MCP server that enables AI assistants to list, read, create, and manage files in Google Drive. It features automatic conversion of Google Workspace formats into Markdown, CSV, and plain text for seamless integration with AI workflows.

glama
Updated
Mar 20, 2026

mcp-google-gdrive

An MCP server for the Google Drive API. Lets AI assistants list, read, create, and manage files in Google Drive with automatic Google Workspace format conversion (Docs to Markdown, Sheets to CSV, Slides to plain text).

Tools

ToolDescriptionStatus
gdrive_list_filesList and search files with query filtering and paginationAvailable
gdrive_get_metadataGet detailed file metadata by IDAvailable
gdrive_read_fileRead file content with automatic Workspace format conversionAvailable
gdrive_create_fileCreate a new file with contentAvailable
gdrive_create_folderCreate a new folderAvailable
gdrive_update_fileUpdate existing file contentPlanned
gdrive_delete_fileTrash or permanently delete a filePlanned
gdrive_move_fileMove a file between foldersPlanned
gdrive_copy_fileCopy a file with optional renamePlanned
gdrive_export_docExport Google Doc to Markdown, HTML, or PDFPlanned
gdrive_export_sheetExport Google Sheet to CSV or JSONPlanned
gdrive_export_slidesExport Google Slides to text or PDFPlanned
gdrive_create_docCreate a Google Doc from MarkdownPlanned
gdrive_update_docUpdate a Google Doc with Markdown contentPlanned

Prerequisites

  • Node.js 18 or later
  • A Google Cloud project with the Google Drive API enabled
  • OAuth2 desktop application credentials

Setup

  1. Create a project in the Google Cloud Console and enable the Google Drive API
  2. Create OAuth2 credentials (Application type: Desktop app) and download the JSON file
  3. Save the credentials file:
mkdir -p ~/.config/mcp-google-gdrive
cp ~/Downloads/client_secret_*.json ~/.config/mcp-google-gdrive/credentials.json
chmod 600 ~/.config/mcp-google-gdrive/credentials.json
  1. Run the one-time authorization flow:
npx mcp-google-gdrive --auth

This opens a URL for Google consent. After granting access, paste the authorization code back into the terminal. The token is saved to ~/.config/mcp-google-gdrive/token.json.

Configuration

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["-y", "mcp-google-gdrive"]
    }
  }
}

VS Code / Cursor

Add to .vscode/mcp.json:

{
  "servers": {
    "google-drive": {
      "command": "npx",
      "args": ["-y", "mcp-google-gdrive"]
    }
  }
}

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["-y", "mcp-google-gdrive"]
    }
  }
}

Authentication

The server uses OAuth2 for Google Drive access. On first run with --auth, it generates an authorization URL for browser-based consent. After authorization, tokens are stored locally at ~/.config/mcp-google-gdrive/token.json with restricted file permissions (0600).

Access tokens expire after one hour and are refreshed automatically using the stored refresh token. Token refresh is transparent and requires no user interaction.

License

MIT

Reviews

No reviews yet

Sign in to write a review