productivity
Google Drive MCP Integration for OpenAI Agents SDK
Connect Google Drive to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Google Drive to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Google Drive MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-google_drive": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=google_drive",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=google_drive --write=deny Why Use KosmoKrator Here
Expose only Google Drive instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Google Drive Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Google Drive integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__google_drive__google_drive_copy | google_drive.google_drive_copy | Read | Duplicate a file in Google Drive. |
integration__google_drive__google_drive_create_file | google_drive.google_drive_create_file | Write | Create an empty Google Doc, Sheet, or Presentation in Google Drive. |
integration__google_drive__google_drive_create_folder | google_drive.google_drive_create_folder | Write | Create a folder in Google Drive. |
integration__google_drive__google_drive_delete | google_drive.google_drive_delete | Read | Permanently delete a file from Google Drive (irreversible). |
integration__google_drive__google_drive_move | google_drive.google_drive_move | Read | Move a file to a different folder in Google Drive. |
integration__google_drive__google_drive_rename | google_drive.google_drive_rename | Read | Rename a file or folder in Google Drive. |
integration__google_drive__google_drive_get_file | google_drive.google_drive_get_file | Read | Get file metadata by ID from Google Drive. For Google Docs/Sheets/Slides, use `export_as` to get content as text, csv, or markdown. |
integration__google_drive__google_drive_list_permissions | google_drive.google_drive_list_permissions | Read | List all permissions (sharing settings) on a Google Drive file or folder. |
integration__google_drive__google_drive_search_files | google_drive.google_drive_search_files | Read | 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'` |
integration__google_drive__google_drive_share_file | google_drive.google_drive_share_file | Read | 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) |
integration__google_drive__google_drive_unshare_file | google_drive.google_drive_unshare_file | Read | Remove a permission from a Google Drive file or folder. Use google_drive_list_permissions first to find the permission ID. |
integration__google_drive__google_drive_star | google_drive.google_drive_star | Read | Mark a file as starred/favorite in Google Drive. |
integration__google_drive__google_drive_trash | google_drive.google_drive_trash | Read | Move a file to trash in Google Drive (reversible). |
integration__google_drive__google_drive_unstar | google_drive.google_drive_unstar | Read | Remove star from a file in Google Drive. |
integration__google_drive__google_drive_untrash | google_drive.google_drive_untrash | Read | Restore a file from trash in Google Drive. |