productivity
Google Drive MCP, CLI, and Lua Integration for AI Agents
Google Drive integration docs for AI agents: MCP gateway setup, Google Drive CLI commands, Lua API reference, credentials, and function schemas.
15 functions 13 read 2 write OAuth browser flow auth
Google Drive for agents
OAuth can be configured in web hosts through redirect and in CLI hosts through local/device authorization; runtime works with stored tokens.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
google_drive- route_slug
google/google-drive- package
google- auth_strategy
oauth2_authorization_codeOAuth browser flow- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
false
Quick Links
Lua APIAgent-facing namespace and function reference. Google Drive CLIHeadless setup and direct function calls. Google Drive MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Google Drive MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Google Drive.
Claude Code Google Drive MCP setup for Claude Code. Cursor Google Drive MCP setup for Cursor. Codex Google Drive MCP setup for Codex. OpenAI Agents Google Drive MCP setup for OpenAI Agents SDK. Claude Agent SDK Google Drive MCP setup for Claude Agent SDK. Vercel AI SDK Google Drive MCP setup for Vercel AI SDK. LangChain Google Drive MCP setup for LangChain. LangGraph Google Drive MCP setup for LangGraph. CrewAI Google Drive MCP setup for CrewAI. MCP clients Google Drive MCP setup for Generic MCP Clients.
Google Drive CLI Matrix
Use these pages for direct Google Drive CLI workflows in scripts, CI, cron, and agent wrappers.
CI Google Drive CLI for CI. Cron Jobs Google Drive CLI for cron jobs. Shell Scripts Google Drive CLI for shell scripts. Headless Automation Google Drive CLI for headless automation. Coding Agents Google Drive CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
google_drive.google_drive_copy | Read read | 3 | Duplicate a file in Google Drive. |
google_drive.google_drive_create_file | Write write | 3 | Create an empty Google Doc, Sheet, or Presentation in Google Drive. |
google_drive.google_drive_create_folder | Write write | 2 | Create a folder in Google Drive. |
google_drive.google_drive_delete | Read read | 1 | Permanently delete a file from Google Drive (irreversible). |
google_drive.google_drive_move | Read read | 2 | Move a file to a different folder in Google Drive. |
google_drive.google_drive_rename | Read read | 2 | Rename a file or folder in Google Drive. |
google_drive.google_drive_get_file | Read read | 2 | Get file metadata by ID from Google Drive. For Google Docs/Sheets/Slides, use `export_as` to get content as text, csv, or markdown. |
google_drive.google_drive_list_permissions | Read read | 1 | List all permissions (sharing settings) on a Google Drive file or folder. |
google_drive.google_drive_search_files | Read read | 4 | Search for files in Google Drive using Drive query syntax (default: 20 results, max: 100). Trashed files are excluded by default. Drive query syntax examples: - By name: `name contains 'budget'` or `name = 'Q1 Report'` - By type: `mimeType = 'application/vnd.google-apps.spreadsheet'` (also: document, presentation, folder) - In folder: `'FOLDER_ID' in parents` - Recent: `modifiedTime > '2026-01-01'` - Shared with me: `sharedWithMe = true` - Starred: `starred = true` - By owner: `'[email protected]' in owners` - Combine: `name contains 'report' and mimeType = 'application/vnd.google-apps.spreadsheet'` |
google_drive.google_drive_share_file | Read read | 6 | Share a Google Drive file or folder. Provide `fileId`, `role` ("reader", "writer", "commenter"), and one of: - `email`: share with a specific user (e.g., "[email protected]") - `domain`: share with an entire domain (e.g., "example.com") - `type` set to `"anyone"`: make accessible to anyone with the link (no email/domain needed) - `notify` (optional, default true): send email notification (only for email shares) |
google_drive.google_drive_unshare_file | Read read | 2 | Remove a permission from a Google Drive file or folder. Use google_drive_list_permissions first to find the permission ID. |
google_drive.google_drive_star | Read read | 1 | Mark a file as starred/favorite in Google Drive. |
google_drive.google_drive_trash | Read read | 1 | Move a file to trash in Google Drive (reversible). |
google_drive.google_drive_unstar | Read read | 1 | Remove star from a file in Google Drive. |
google_drive.google_drive_untrash | Read read | 1 | Restore a file from trash in Google Drive. |