drive-mcp
Provides tools for listing, searching, reading, renaming, and moving files in Google Drive.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@drive-mcp search Google Drive for 'meeting notes'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
drive-mcp
MCP server for Google Drive and OneDrive operations.
Tools
Tool | Description |
| List files in a Google Drive folder by name or |
| Recursively list files in a folder and subfolders |
| List Shared Drives visible to the account |
| Search Google Drive by filename (includes Shared Drives) |
| Read file contents from Google Drive |
| Download a Drive file (or export Docs/Sheets/Slides) to a local path |
| Create/overwrite a text file in Google Drive |
| Create a Google Doc (optionally seeded with text) |
| Create a Google Drive folder (optional parent, dry-run, undo) |
| Rename a Google Drive file |
| Move a Google Drive file to another folder |
| Copy a Google Drive file |
| Move a Google Drive file/folder to trash |
| Share a file/folder with a user email ( |
| Undo a prior mutating gdrive_* operation via restore token |
| List items in OneDrive root |
| List items in a OneDrive folder by path |
| Search OneDrive by filename |
| Read file contents from OneDrive |
Most mutating Google Drive tools accept optional file_id / folder_id arguments
(preferred when known) and support dry_run=True previews. Successful mutations
that can be reversed return a restore_token for gdrive_undo.
Related MCP server: Google Drive MCP Server
Setup
Prerequisites
Python 3.10+
Google account with Drive API enabled
Microsoft account with Graph API access
Installation
git clone https://github.com/<your-user>/drive-mcp.git
cd drive-mcp
"$(uv python find --system --managed-python 3.13.15)" -m venv --copies venv
venv/bin/python -m pip install -e .Authentication
Google Drive credentials: place OAuth desktop client JSON at
drive_credentials.json.OneDrive credentials: defaults in
src/onedrive.pyuse a public device-flow app registration.Bootstrap auth once:
venv/bin/python -c "from src import google_drive; google_drive.authenticate()"
venv/bin/python -c "from src import onedrive; onedrive.authenticate()"Claude Code Configuration
Add to ~/.claude.json:
{
"mcpServers": {
"drive-mcp": {
"type": "stdio",
"command": "/path/to/drive-mcp/venv/bin/python",
"args": ["/path/to/drive-mcp/run_server.py"]
}
}
}Development
venv/bin/python -c "from src.server import mcp; print([t.name for t in mcp._tool_manager._tools.values()])"
venv/bin/python run_server.pyLicense
MIT
Available Tools
21 toolsgdrive_copyA
Copy a Google Drive file, optionally renaming and/or placing under a new folder.
Discovery: run gdrive_search or gdrive_list_folder first to obtain
file_name / file_id and destination folder values.
Use this for: duplicating a file/template.
Not for: moving the original file — see gdrive_move.
Use dry_run=True to preview the change without committing.
Args: file_name: Name of the file to copy new_name: Optional name for the copy destination_folder: Optional destination folder name destination_folder_id: Optional stable destination folder ID file_id: Optional stable file ID (preferred when known) dry_run: Preview the copy without committing it
Inputs: dry_run, file_id, new_name, file_name, +2 more. Returns: result
gdrive_create_docA
Create a Google Doc in Drive, optionally seeded with plain-text content.
Discovery: run gdrive_search or gdrive_list_folder first to obtain
parent folder name/ID values.
Use this for: creating a Google Doc artifact.
Not for: creating a folder — see gdrive_create_folder.
Not for: writing a plain .md/.txt file — see gdrive_write_file.
Not for: spreadsheets — use gsheets-mcp.
Use dry_run=True to preview the change without committing.
Args: title: Title of the Google Doc content: Optional plain-text content to seed into the Doc parent_folder: Optional parent folder name (defaults to My Drive root) parent_folder_id: Optional stable parent folder ID dry_run: Preview the create without committing it
Inputs: title (required), content, dry_run, parent_folder, +1 more. Returns: result
gdrive_create_folderA
Create a folder in Google Drive.
Discovery: run gdrive_search or gdrive_list_folder first to obtain
parent folder name/ID values when nesting under an existing folder.
Use this for: creating a new folder (optionally under a parent).
Not for: creating a Google Doc — see gdrive_create_doc.
Not for: renaming an existing folder — see gdrive_rename.
Not for: moving an existing folder — see gdrive_move.
Use dry_run=True to preview the change without committing. Use exist_ok=True to return an existing same-named child folder instead of erroring.
Args: folder_name: Name of the folder to create parent_folder: Optional parent folder name (defaults to My Drive root) parent_folder_id: Optional stable parent folder ID exist_ok: If a matching folder already exists under the parent, return it dry_run: Preview the create without committing it
Inputs: folder_name (required), dry_run, exist_ok, parent_folder, +1 more. Returns: result
gdrive_download_fileA
Download a Google Drive file to a local filesystem path.
Google Docs/Sheets/Slides are exported to Office formats (.docx/.xlsx/.pptx). Other files are downloaded in their native binary form.
Discovery: use gdrive_search or gdrive_list_folder first to obtain
file_name / file_id values.
Use this for: saving a Drive file locally for offline/binary use.
Not for: reading text content in-chat — see gdrive_read_file.
Args: local_path: Destination file path, or directory to download into file_name: Name of the file to download file_id: Optional stable file ID (preferred when known) dry_run: Preview the download without writing bytes
Inputs: local_path (required), dry_run, file_id, file_name. Returns: result
gdrive_list_folderA
List files in a Google Drive folder by name or folder_id.
Args: folder_name: Name of the folder to list (e.g., "Stock Investor Accelerator") folder_id: Optional stable folder ID from gdrive_search (preferred when known)
Discovery: use gdrive_search first when the exact folder_name/folder_id is unknown.
Sibling tools: use gdrive_list_folder_recursive to include subfolders and gdrive_read_file to read a discovered file.
Inputs: folder_id, folder_name. Returns: result
gdrive_list_folder_recursiveA
Recursively list all files in a Google Drive folder and its subfolders.
Args: folder_name: Name of the folder to list (e.g., "Stock Investor Accelerator") folder_id: Optional stable folder ID from gdrive_search (preferred when known)
Discovery: use gdrive_search first when the exact folder_name/folder_id is unknown.
Sibling tools: use gdrive_list_folder for a shallow listing and gdrive_read_file to read a discovered file.
Inputs: folder_id, folder_name. Returns: result
gdrive_moveA
Move a file to a different folder in Google Drive.
Discovery: run gdrive_list_folder or gdrive_search first to obtain
file_name / file_id and destination folder values.
Use this for: moving files between folders.
Not for: renaming a file in place — see gdrive_rename.
Use dry_run=True to preview the change without committing.
Args: file_name: Name of the file to move destination_folder: Name of the destination folder dry_run: Preview the move without committing it file_id: Optional stable file ID (preferred when known) destination_folder_id: Optional stable destination folder ID
Inputs: dry_run, file_id, file_name, destination_folder, +1 more. Returns: result
gdrive_read_fileA
Read the contents of a file from Google Drive.
Supports:
Google Docs (exported as plain text)
Google Sheets (exported as CSV)
PDFs (text extracted)
Text files (.txt, .md, .csv, .json, etc.)
Args: file_name: Name of the file to read (e.g., "My Document" or "report.pdf") max_chars: Maximum characters to return (default: 100000) file_id: Optional stable file ID from gdrive_search (preferred when known)
Discovery: use gdrive_search, gdrive_list_folder, or gdrive_list_folder_recursive first to find the exact file_name or file_id.
Inputs: file_id, file_name, max_chars. Returns: result
gdrive_renameA
Rename a file in Google Drive.
Discovery: run gdrive_list_folder or gdrive_search first to obtain
file_name / file_id values.
Use this for: renaming files in place.
Not for: moving a file to a different folder — see gdrive_move.
Use dry_run=True to preview the change without committing.
Args: file_name: Current name of the file to rename new_name: New name for the file dry_run: Preview the rename without committing it file_id: Optional stable file ID (preferred when known)
Inputs: dry_run, file_id, new_name, file_name. Returns: result
gdrive_searchB
Search for files in Google Drive by name (includes Shared Drives).
Args: query: Search term to find in file names max_results: Maximum number of results to return (default: 20)
Inputs: query (required), max_results. Returns: result
gdrive_trashA
Move a Google Drive file or folder to trash.
Discovery: run gdrive_search or gdrive_list_folder first to obtain
file_name / file_id values.
Use this for: soft-deleting a file/folder (recoverable from trash). Not for: permanently deleting — not supported by this server.
Use dry_run=True to preview the change without committing.
Args: file_name: Name of the file/folder to trash file_id: Optional stable file ID (preferred when known) dry_run: Preview the trash without committing it
Inputs: dry_run, file_id, file_name. Returns: result
gdrive_undoA
Undo a prior Drive mutation using its restore_token.
Supports: gdrive_rename, gdrive_move, gdrive_create_folder, gdrive_write_file (create only), gdrive_create_doc, gdrive_copy, gdrive_trash, gdrive_share.
Args: restore_token: Token returned by a mutating gdrive_* tool after commit
Inputs: restore_token (required).
gdrive_write_fileA
Create or overwrite a text/binary-capable file in Google Drive.
Discovery: run gdrive_search or gdrive_list_folder first to obtain
parent folder and optional existing file_id values.
Use this for: writing markdown/text/json/csv files into Drive.
Not for: creating a Google Doc — see gdrive_create_doc.
Not for: spreadsheet edits — use gsheets-mcp.
Use dry_run=True to preview the change without committing. Overwrites only when file_id is provided or overwrite=True finds a same-named file under the parent. Undo trashes newly created files; content overwrites are not undoable via restore_token.
Args: file_name: Destination file name (e.g., "notes.md") content: File contents to write parent_folder: Optional parent folder name (defaults to My Drive root) parent_folder_id: Optional stable parent folder ID mime_type: Optional MIME type (guessed from file_name when omitted) file_id: Optional existing file ID to overwrite overwrite: If True, overwrite an existing same-named file under the parent dry_run: Preview the write without committing it
Inputs: content (required), file_name (required), dry_run, file_id, +4 more. Returns: result
onedrive_complete_reauthB
Check if OneDrive re-authentication completed. Call after user visits URL.
Inputs: no named parameters. Returns: result
onedrive_list_folderA
List items in a OneDrive folder by path.
Args: folder_path: Path to the folder (e.g., "Documents/Projects" or "Stock Investor Accelerator")
Discovery: use onedrive_list_root or onedrive_search first when the exact folder_path is unknown.
Sibling tools: use onedrive_list_root for the top-level folder and onedrive_read_file to read a discovered file.
Inputs: folder_path (required). Returns: result
onedrive_list_rootA
List items in the OneDrive root folder.
Sibling tools: use onedrive_list_folder for nested folders and onedrive_read_file to read a discovered file.
Inputs: no named parameters. Returns: result
onedrive_read_fileA
Read the contents of a file from OneDrive.
Supports:
Text files (.txt, .md, .csv, .json, etc.)
PDFs (text extracted)
Word documents (.docx)
Excel spreadsheets (.xlsx) - exported as CSV-like format
PowerPoint presentations (.pptx)
Args: file_path: Path to the file (e.g., "Documents/report.pdf" or "Stock Investor Accelerator/notes.txt") max_chars: Maximum characters to return (default: 100000)
Discovery: use onedrive_search, onedrive_list_root, or onedrive_list_folder first to find the exact file_path.
Inputs: file_path (required), max_chars. Returns: result
onedrive_searchB
Search for files in OneDrive by name.
Args: query: Search term to find in file names max_results: Maximum number of results to return (default: 20)
Inputs: query (required), max_results. Returns: result
onedrive_start_reauthA
Start OneDrive re-authentication. Returns URL and code for user.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools have clearly distinct actions, and the gdrive_/onedrive_ prefixes separate the two providers cleanly. A few near-overlaps exist (gdrive_list_folder vs gdrive_list_folder_recursive, and gdrive_write_file vs gdrive_create_doc), but the descriptions explicitly disambiguate them.
The provider_verb[_noun] pattern is consistent and readable, e.g., gdrive_create_folder, gdrive_read_file, onedrive_list_folder. Minor deviations exist like verb-only names (gdrive_copy, gdrive_trash, gdrive_undo, gdrive_search), but they do not undermine predictability.
21 tools falls in the heavy range for a single MCP server, though the dual-provider scope explains the size. Each tool has a plausible purpose, but the surface feels larger than a typical well-scoped single-domain server.
The Google Drive side is fairly complete: create, read, search, list, rename, move, copy, trash, share, download, and undo are all covered. The OneDrive side is notably incomplete, offering only list/search/read/reauth with no create, write, rename, move, trash, or share operations.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- -licenseNot gradedqualityBmaintenanceThis MCP server integrates with Google Drive to allow listing, reading, and searching over files.5,582 npm91,952MIT
- AlicenseNot gradedqualityDmaintenanceA server that provides a Machine Control Protocol (MCP) interface to search, access, and interact with Google Drive files and folders, enabling AI assistants to work with Google Drive content.8MIT
- AlicenseBqualityCmaintenanceMCP server for Google Drive integration with file management, search, sharing, and full CRUD operations.15688 npm2MIT
- FlicenseNot gradedqualityDmaintenanceA read-only Google Drive MCP server that allows searching files, reading file content (with auto-export for Google Docs, Sheets, Slides), and retrieving file metadata via OAuth authentication.13 npm2-