productivity
Google Drive MCP Integration for Claude Agent SDK
Connect Google Drive to Claude Agent SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Google Drive to Claude Agent SDK
Give Claude Agent SDK workflows access to KosmoKrator integrations through a local MCP server.
Add a KosmoKrator stdio MCP server to the Claude Agent SDK options. The gateway is local, scoped to this integration, and starts with
--write=deny so Claude Agent SDK can inspect read-capable tools without receiving write access by default.
Google Drive MCP Config for Claude Agent SDK
Use a narrow integration list so the agent does not load unrelated tools.
{
"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 Claude Agent SDK
Claude Agent SDK 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. |