Access Google Drive, Google Docs, and Google Sheets with LLM-powered tools.
Google Drive MCP Server
A Model Context Protocol server that gives LLM-powered tools (Claude Code CLI, Cursor, Claude Desktop, etc.) access to Google Drive, Google Docs, and Google Sheets.
Search, list, and read files, including automatic export of Google Docs as Markdown, Sheets as CSV, and Slides as plain text. Create and edit Google Docs with targeted text insertion, replacement, formatting, headings, lists, alignment, rename, and duplicate operations. Create and edit Google Sheets with value updates, formatting, tab management, and row or column operations. Works with both personal drives and shared drives.
Quick start
1. Guided setup (recommended)
git clone https://github.com/wagnerlabs/gdrive-mcp.git
cd gdrive-mcp
./scripts/install.sh
The setup script installs dependencies, builds the project, and walks you through creating a Google Cloud project, enabling APIs, configuring OAuth, and authenticating. It prints ready-to-copy MCP client config at the end. Run with --dry-run to preview without side effects:
./scripts/install.sh --dry-run
2. Add to your MCP client
Claude Code CLI
claude mcp add --scope user wagnerlabs-gdrive -- node /absolute/path/to/gdrive-mcp/dist/index.js
The --scope user flag installs the server globally, so the MCP server will be available in Claude Code as wagnerlabs-gdrive from any directory you run Claude Code in.
To remove:
claude mcp remove wagnerlabs-gdrive
Cursor
Add to .cursor/mcp.json in any project (or globally):
{
"mcpServers": {
"gdrive": {
"command": "node",
"args": ["/absolute/path/to/gdrive-mcp/dist/index.js"]
}
}
}
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"gdrive": {
"command": "node",
"args": ["/absolute/path/to/gdrive-mcp/dist/index.js"]
}
}
}
Tools
Read-only tools
| Tool | Description |
|---|---|
gdrive_search |
Search files using full-text search or Drive query syntax |
gdrive_get_file |
Get detailed metadata for a file by ID |
gdrive_read_file |
Read file content (Docs → Markdown, Sheets → CSV, Slides → plain text) |
gdrive_list_files |
List files in a folder with sorting and pagination |
gdrive_get_spreadsheet_info |
Get spreadsheet metadata including all sheet tabs and named ranges |
gdrive_get_document_info |
Get Google Docs metadata and optional tab-scoped structured content |
Write tools
Sheets
| Tool | Description | Destructive | Idempotent |
|---|---|---|---|
gdrive_create_sheet |
Create a new spreadsheet | No | No |
gdrive_update_sheet |
Overwrite values in a cell range | Yes | Yes |
gdrive_append_sheet |
Append rows after existing data | No | No |
gdrive_clear_values |
Clear values from a cell range (preserves formatting) | Yes | Yes |
gdrive_format_cells |
Apply formatting to a cell range | No | Yes |
gdrive_add_sheet_tab |
Add a new sheet tab | No | No |
gdrive_delete_sheet_tab |
Delete a sheet tab and all its data | Yes | No |
gdrive_rename_sheet_tab |
Rename an existing sheet tab | Yes | No |
gdrive_insert_rows_columns |
Insert empty rows or columns | No | No |
gdrive_delete_rows_columns |
Delete rows or columns and their data | Yes | No |
Docs
| Tool | Description | Destructive | Idempotent |
|---|---|---|---|
gdrive_create_doc |
Create a blank Google Doc, optionally in a specific folder | No | No |
gdrive_insert_doc_text |
Insert text at a position, explicit index, or text anchor | No | No |
gdrive_replace_doc_text |
Replace a targeted text range or anchored text match | Yes | No |
gdrive_replace_all_doc_text |
Replace every exact text match in a tab or across all tabs | Yes | Yes |
gdrive_delete_doc_text |
Delete a targeted text range or anchored text match | Yes | No |
gdrive_update_doc_text_style |
Apply character-level formatting such as bold, colors, fonts, and links | No | Yes |
gdrive_update_doc_paragraph_style |
Apply headings and alignment to whole paragraphs | No | Yes |
gdrive_update_doc_list |
Create, change, or remove list formatting on paragraphs | Yes | Yes |
gdrive_rename_doc |
Rename an existing Google Doc file | Yes | No |
gdrive_duplicate_doc |
Duplicate a Google Doc, optionally into a specific folder | No | No |
Value input options
When writing cell values (gdrive_update_sheet, gdrive_append_sheet), the value_input_option parameter controls how values are interpreted:
USER_ENTERED(default) — Values are parsed as if typed into the Google Sheets UI. Formulas are executed (=SUM(A1:A10)), numbers and dates are formatted automatically.RAW— Values are stored exactly as provided. A string like=SUM(A1:A10)is stored as literal text, not executed as a formul
Tools (5)
gdrive_searchSearch files using full-text search or Drive query syntaxgdrive_read_fileRead file content (Docs to Markdown, Sheets to CSV, Slides to plain text)gdrive_update_sheetOverwrite values in a cell rangegdrive_insert_doc_textInsert text at a position, explicit index, or text anchorgdrive_create_docCreate a blank Google Doc, optionally in a specific folderEnvironment Variables
GOOGLE_CLIENT_IDrequiredOAuth client ID for Google Cloud projectGOOGLE_CLIENT_SECRETrequiredOAuth client secret for Google Cloud projectConfiguration
{"mcpServers": {"gdrive": {"command": "node", "args": ["/absolute/path/to/gdrive-mcp/dist/index.js"]}}}