Connect your AI Agents to Google Drive in minutes

Merge lets you securely connect your agents to Google Drive and thousands of tools instantly

Available tools

list_comments

List all comments and replies on a Google Drive file with pagination support

get_comment

Get details of a specific comment

create_comment

Add a new comment to a Google Drive file with optional text anchoring and rich formatting

update_comment

Update the text content of an existing comment on a Google Drive file. Use listcomments to find comment IDs. Resolved state is not writable through this tool - use resolvecomment or reopen_comment to change whether a thread is resolved.

delete_comment

Permanently delete a comment and all its replies from a Google Drive file

resolve_comment

Resolve a comment thread on a Google Drive file by posting a reply with action 'resolve' (the only way Drive can resolve a thread). Optionally attach text to that reply. Use listcomments to find comment IDs. Use reopencomment to undo, or delete_comment to remove a thread entirely.

reopen_comment

Reopen a resolved comment thread on a Google Drive file by posting a reply with action 'reopen' (the only way Drive can reopen a thread). Optionally attach text to that reply. Use listcomments to find comment IDs. Use resolvecomment to resolve a thread again.

list_replies

List all replies to a specific comment with pagination and filtering options

get_reply

Get a single reply in a comment thread on a Google Drive file by its ID. Use listreplies to find reply IDs and listcomments to find comment IDs. Prefer list_replies to browse a whole thread; use this when you already have a reply ID.

create_reply

Add a reply to an existing comment thread on a Google Drive file. Use listcomments to find comment IDs. Provide content, or an action ('resolve'/'reopen') to change the thread's state, or both. Prefer resolvecomment / reopen_comment when you only want to change resolution state.

update_reply

Update an existing reply to a comment

delete_reply

Permanently delete a specific reply from a comment thread

list_drives

List all shared drives (Team Drives) accessible to the user

get_drive

Get detailed information about a specific shared drive

create_drive

Create a new shared drive for team collaboration. Pass a stable requestid and reuse the SAME value on any retry: repeats then return 409 instead of creating a duplicate drive. Only name and themeid are settable on create - use updatedrive afterwards for restrictions, colorrgb and backgroundimagefile.

update_drive

Update shared drive settings including name, color, and restrictions

delete_drive

Permanently delete a shared drive. By default this only succeeds on an EMPTY drive: deleting a drive that still holds untrashed items requires allowitemdeletion=true together with usedomainadminaccess=true (the API only honours allowitemdeletion for domain admins). Cannot be undone. Use listdrives to find drive IDs.

hide_drive

Hide a shared drive from the user's view (does not delete)

unhide_drive

Restore a hidden shared drive to the user's view

search_drives

Search shared drives with a Drive query, e.g. "name contains 'marketing'". Use this when you have search criteria; use listdrives to browse everything. Results are paginated - pass nextpagetoken from the response back as pagetoken to fetch further matches.

set_drive_restrictions

Set access restrictions on a shared drive (all six Drive.restrictions fields). Omitted fields are left unchanged. Use listdrives or searchdrives to find drive IDs. Note download_restriction is an object, e.g. {'restrictedForReaders': true}, not a boolean.

list_files

List and search files and folders in Google Drive with advanced filtering options

get_file

Get detailed metadata for a specific file or folder

create_file

Create a new file, folder, or shortcut in Google Drive. Set mimetype to 'application/vnd.google-apps.folder' for a folder, or to 'application/vnd.google-apps.shortcut' with shortcuttargetid for a shortcut. Use listfiles to find parent folder IDs. To make creation retry-safe, call generatefileids first and pass one of the returned IDs as id.

update_file

Update file or folder metadata including name, description, parents, and properties

copy_file

Create a copy of a file with an optional new name and location. Folders cannot be copied. Use listfiles to find the source file ID and parent folder IDs. To make the copy retry-safe, call generatefile_ids first and pass one of the returned IDs as id.

delete_file

PERMANENT — bypasses the trash and cannot be undone. Use trashfile for a recoverable delete. On a folder this also removes every descendant you own. Use listfiles or search_files to find file IDs.

trash_file

Move a file or folder to the trash, from where it can be restored with untrashfile or purged with emptytrash. Use listfiles or searchfiles to find file IDs. To delete permanently and irreversibly instead, use delete_file.

untrash_file

Restore a file or folder from the trash. Use listfiles with the query "trashed=true" to find trashed file IDs. Files already purged by emptytrash or delete_file cannot be restored.

empty_trash

Permanently delete all files in the trash

export_file

Convert and export a Google Workspace document (Docs, Sheets, Slides, Drawings) to a chosen format such as PDF, DOCX, XLSX, or plain text. Exported content is limited to 10 MB; larger documents fail. Use this ONLY for native Workspace files, which have no bytes of their own. For stored files (PDF, Office, images), use readfiletext (readable text) or download_file (raw bytes).

download_file

Download the raw stored bytes of a regular (non-Workspace) file by file ID -- PDF, CSV, image, ZIP or Office. Returns text as a string and binary as base64. Use it when you need the actual bytes to re-upload or process elsewhere; to READ a PDF, DOCX or XLSX, use readfiletext, which returns extracted text instead of base64. For native Workspace documents, use export_file.

generate_file_ids

Pre-generate file IDs that can be passed as the id field to createfile or copyfile, making those writes retry-safe (a replay with the same ID cannot create a duplicate). Set type to 'shortcuts' for shortcut IDs, otherwise IDs are for files.

search_files

Search for files using an advanced Google Drive query string. Use listfiles instead for plain paginated browsing with no query. Pass the nextpagetoken from a previous response back as pagetoken to fetch the next page, and fields to narrow the returned columns.

initiate_resumable_upload

Initiates a resumable upload and returns one-time usable pre-authorized session URI (valid 7 days) that the caller streams file chunks to via HTTP PUT with X-Goog-Upload-Offset, X-Goog-Upload-Command (upload/finalize), and X-Goog-Upload-Total-Size headers. All the chunks should be 256KiB except final chunk. See docstring for protocol details.

upload_file

Upload a new file with content to Google Drive including Google Docs, Sheets, and other document types

update_file_content

Update the content of an existing file in Google Drive including Google Docs, Sheets, and other documents

list_permissions

List all permissions (sharing settings) for a file or folder

get_permission

Get details of a specific permission for a file

create_permission

Share a file or folder with a user, group, or make it public

update_permission

Update an existing permission (change access level or expiration)

delete_permission

Remove a permission (stop sharing with a user or group)

batch_create_permissions

Share a file with multiple users/groups. Format: [{"type":"user","role":"reader","emailAddress":"user@example.com"}]. Sends a notification email to each user/group grantee unless sendNotificationEmail is false. Cannot transfer ownership; use transfer_ownership for that.

transfer_ownership

Transfer ownership of a file to another user. The new owner must be a user, not a group; use listpermissions to check an existing grantee's type. Google always emails the new owner, so sendnotification_email cannot be false. On consumer accounts the transfer is pending until the recipient accepts.

batch_delete_permissions

Remove multiple permissions from a file at once

make_public

Make a file or folder accessible to anyone with the link. Grants role 'reader' by default; 'writer' lets anyone with the link edit. Note that later removing public access (make_private) does not retract a link that has already been distributed.

make_private

Remove public access from a file or folder

validate_credential

Validate Google Drive credentials. Verifies credentials during setup.

View all tools by creating a free accountSee more tools

How to set up Merge Agent Handler

In an mcp.json file, add the configuration below, and restart Cursor.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5      "headers": {
6        "Authorization": "Bearer yMt*****"
7      }
8    }
9  }
10}
11
Copy Code

Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.

Make sure Claude is using the Node v20+.

Learn more in the official documentation ↗

1{
2  "mcpServers": {
3    "agent-handler": {
4      "command": "npx",
5      "args": [
6        "-y",
7        "mcp-remote@latest",
8        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9        "--header",
10        "Authorization: Bearer ${AUTH_TOKEN}"
11      ],
12      "env": {
13        "AUTH_TOKEN": "yMt*****"
14      }
15    }
16  }
17}
Copy Code
Copied!

Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.

Learn more in the official documentation ↗

1{
2    "mcpServers": {
3      "agent-handler": {
4        "command": "npx",
5        "args": [
6          "-y",
7          "mcp-remote@latest",
8          "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9          "--header",
10          "Authorization: Bearer ${AUTH_TOKEN}"
11        ],
12        "env": {
13          "AUTH_TOKEN": "<ah-production-access-key>"
14        }
15      }
16    }
17  }
Copy Code

In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".

You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.

Learn more in the official documentation ↗

1{
2  "inputs": [
3    {
4      "type": "promptString",
5      "id": "agent-handler-auth",
6      "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7      "password": true
8    }
9  ],
10  "servers": {
11    "agent-handler": {
12      "type": "stdio",
13      "command": "npx",
14      "args": [
15        "-y",
16        "mcp-remote@latest",
17        "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18        "--header",
19        "Authorization: Bearer ${input:agent-handler-auth}"
20      ]
21    }
22  }
23}
Copy Code

FAQs on using Merge's Google Drive  MCP server

FAQs on using Merge's Google Drive  MCP server

What are common use cases for the Google Drive MCP server?

Your top use cases hinge on the type of agents you support. That said, here are several common agentic use cases for Google Drive:

  • Document generation: Your agent can automatically create and populate Google Docs with meeting notes, weekly reports, or customer onboarding materials based on data from CRM or project management systems
  • Content organization: Your agent can monitor new files, automatically organize them into appropriate folders based on file type, project tags, or metadata, and apply consistent naming conventions
  • Compliance archiving: Your agent can identify files that meet retention criteria, move them to designated archive folders, and update permissions to ensure regulatory compliance
  • Onboarding automation: Your agent can create personalized folder structures and populate them with relevant documents, templates, and resources when new team members join
  • Contract management: Your agent can extract key dates from contracts stored in Drive, create reminders for renewal deadlines, and notify stakeholders when agreements are approaching expiration

What are popular tools for Google Drive’s MCP server?

Here are several popular tools broken down by data types:

Drives

  • <code class="blog_inline-code">list_drives</code>
  • <code class="blog_inline-code">get_drive</code>
  • <code class="blog_inline-code">create_drive</code>
  • <code class="blog_inline-code">hide_drive</code>

Files

  • <code class="blog_inline-code">list_files</code>
  • <code class="blog_inline-code">get_file</code>
  • <code class="blog_inline-code">create_file</code>
  • <code class="blog_inline-code">update_file</code>
  • <code class="blog_inline-code">copy_file</code>

Permissions

  • <code class="blog_inline-code">list_permission</code>
  • <code class="blog_inline-code">get_permission</code>
  • <code class="blog_inline-code">create_permission</code>
  • <code class="blog_inline-code">batch_create_permissions</code>

What makes Merge Agent Handler’s Google Drive MCP server better than alternative Google Drive MCP servers?

Merge Agent Handler adds enterprise-grade infrastructure and controls on top of MCP:

  • Enterprise-grade security and DLP: All Google Drive tool inputs and outputs are inspected by a security gateway with configurable data loss prevention rules to block, redact, or mask sensitive data
  • Managed authentication: Merge handles credential storage, validation, and dynamic authorization flows, eliminating the need for custom Google OAuth handling in your agent code
  • Real-time observability and audit trails: Every Google Drive tool call is logged with a fully searchable audit trail for debugging, auditing, and optimization
  • Pre-production validation: The Evaluation Suite allows teams to test Google Drive tools against expected outcomes before deploying them to production

Can I set custom security rules for Google Drive tool calls in Merge Agent Handler?

You can easily set a wide range of rules. Here are just a few examples:

  • Credit card numbers: Block any <code class="blog_inline-code">create_file</code> or <code class="blog_inline-code">update_file</code> tool calls that contain credit card numbers in the document content or file name before they're written to Google Drive
  • Email addresses: Redact email addresses from <code class="blog_inline-code">read_file</code> or <code class="blog_inline-code">search_files</code> responses, so agents only see masked versions (e.g., j*@merge.dev) when retrieving document content
  • Phone numbers: Automatically redact phone numbers from file content and metadata when agents retrieve them via <code class="blog_inline-code">get_file</code> or <code class="blog_inline-code">download_file</code> operations
  • External sharing: Block <code class="blog_inline-code">share_file</code> tool calls that attempt to share documents with email addresses outside your organization's domain

How can I add tools to Merge Agent Handler's Google Drive MCP server?

Here are the steps you can take within the Connector Studio:

1. Start with Merge’s pre-built Google Drive connector. The connector provides dozens of out-of-the-box tools that are maintained by Merge.

2. If necessary, you can add new tools or modify existing Google Drive tools. Use Connector Studio to create custom tools for specialized workflows or to modify existing tools to change parameters, add validation logic, or adjust response formats to match your agent's needs.

3. Configure the authentication type (individual or shared). Choose individual auth when each user needs to connect their own Google Drive account, or shared auth when your agent should act on behalf of a single service account across all users. 

4. Bundle tools into Tool Packs and associate them with your agent via the dashboard or API. Group related Google Drive tools into a Tool Pack (e.g., "Document Management" or "File Storage Core"), then attach that Tool Pack to your agent through the Agent Handler dashboard or programmatically via the API. This makes it easy to manage permissions and enable/disable entire sets of functionality at once.

Explore other MCP servers built and managed by Merge

canva
Canva
clay
Clay
clickup
ClickUp
clinicaltrials
ClinicalTrials.gov
cloudflare
Cloudflare
cms_coverage
CMS Coverage
coda
Coda
compliancequest
ComplianceQuest
concur
Concur
confluence
Confluence
contentful
Contentful
crustdata
Crustdata
databricks
Databricks
datadog
Datadog
docusign
DocuSign
doordash
DoorDash
dropbox
Dropbox
duffel
Duffel
dynamics365
Dynamics 365 Sales
exa
Exa
expensify
Expensify
figma
Figma
firecrawl
Firecrawl
fireflies
Fireflies

Ready to try it out?

Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now