Mitigate AI Platform

Google Drive

How to configure the Google Drive MCP connector

The Google Drive connector allows the chatbot to search and read files in Google Drive, Docs, and Sheets through Google Drive API using the google_workspace_mcp server.

Connector Settings

FieldValue
Integration TypeMCP
NameGoogle Drive
URLhttps://google-workspace-drive.mcp.mitigate.dev/mcp
Transport TypeStreamable HTTP
Authentication TypeOAuth 2.1
OAuth Client ID(from Google Cloud Console)
OAuth Client Secret(from Google Cloud Console)
OAuth Scopesopenid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/drive

This MCP server does not support Dynamic Client Registration (RFC 7591). You must provide OAuth Client ID and Client Secret from a Google Cloud Console OAuth 2.0 Web application client.

OAuth Scopes

See all available scopes in the Google OAuth 2.0 Scopes documentation.

ScopeDescription
openidEnables OpenID Connect sign-in
https://www.googleapis.com/auth/userinfo.emailAccess to the user's email address
https://www.googleapis.com/auth/drive.readonlyView files in Google Drive
https://www.googleapis.com/auth/drive.fileAccess files created or opened by the app
https://www.googleapis.com/auth/drive.metadata.readonlyView file metadata only
https://www.googleapis.com/auth/driveFull access — see, edit, create, and delete all Google Drive files

Document Source

The Google Drive connector can also be used as a document source to ingest files from Google Drive into your knowledge base.

Usage Examples

Once connected, users can interact with Google Drive through natural language:

  • "Search my Drive for the project proposal"
  • "Show recent documents shared with me"
  • "Find spreadsheets related to the budget"

Tools

Search Drive Files

search_drive_files

Searches for files and folders within a user's Google Drive, including shared drives.

Parameters:

  • query - Search query string
  • page_size - Maximum number of results to return
  • corpora - Bodies of items to search
  • drive_id - ID of the shared drive to search
  • include_items_from_all_drives - Whether to include items from all drives

Get Drive File Content

get_drive_file_content

Retrieves the content of a specific Google Drive file by ID, supporting files in shared drives. Native Google Docs, Sheets, Slides are exported as text/CSV. Office files are parsed to extract readable text.

Parameters:

  • file_id - The ID of the file to retrieve

Get Drive File Download Url

get_drive_file_download_url

Downloads a Google Drive file and returns a local file path or temporary download URL. For Google native files, exports to PDF, DOCX, XLSX, PPTX, or CSV depending on the format specified.

Parameters:

  • file_id - The ID of the file to download
  • export_format - Export format for Google native files

List Drive Items

list_drive_items

Lists files and folders, supporting shared drives. If drive_id is specified, lists items within that shared drive. Otherwise, lists items from the user's "My Drive".

Parameters:

  • folder_id - The ID of the folder to list
  • page_size - Maximum number of results to return
  • corpora - Bodies of items to search
  • drive_id - ID of the shared drive
  • include_items_from_all_drives - Whether to include items from all drives

Create Drive Folder

create_drive_folder

Creates a new folder in Google Drive, supporting creation within shared drives.

Parameters:

  • folder_name - Name of the folder to create
  • parent_folder_id - ID of the parent folder

Create Drive File

create_drive_file

Creates a new file in Google Drive, supporting creation within shared drives. Accepts either direct content or a fileUrl to fetch the content from.

Parameters:

  • file_name - Name of the file to create
  • content - Direct content for the file
  • fileUrl - URL to fetch file content from
  • folder_id - ID of the destination folder
  • mime_type - MIME type of the file

Import To Google Doc

import_to_google_doc

Imports a file (Markdown, DOCX, TXT, HTML, RTF, ODT) into Google Docs format with automatic conversion.

Parameters:

  • file_name - Name of the document to create
  • content - Direct content to import
  • file_url - URL to fetch file content from
  • file_path - Local file path to import
  • folder_id - ID of the destination folder
  • source_format - Source file format

Copy Drive File

copy_drive_file

Creates a copy of an existing Google Drive file.

Parameters:

  • file_id - The ID of the file to copy
  • new_name - Name for the copy
  • parent_folder_id - Destination folder ID

Update Drive File

update_drive_file

Updates metadata and properties of a Google Drive file.

Parameters:

  • file_id - The ID of the file to update
  • name - New file name
  • description - New file description
  • mime_type - New MIME type
  • starred - Whether the file is starred
  • trashed - Whether the file is trashed
  • properties - Custom properties
  • add_parents - Parent folder IDs to add
  • remove_parents - Parent folder IDs to remove
  • writers_can_share - Whether writers can share the file
  • copy_requires_writer_permission - Whether copy requires writer permission

Get Drive File Permissions

get_drive_file_permissions

Gets detailed metadata about a Google Drive file including sharing permissions.

Parameters:

  • file_id - The ID of the file

Check Drive File Public Access

check_drive_file_public_access

Searches for a file by name and checks if it has public link sharing enabled.

Parameters:

  • file_name - The name of the file to search for

get_drive_shareable_link

Gets the shareable link for a Google Drive file or folder.

Parameters:

  • file_id - The ID of the file or folder

Share Drive File

share_drive_file

Shares a Google Drive file or folder with a user, group, domain, or anyone with the link. When sharing a folder, all files inside inherit the permission.

Parameters:

  • file_id - The ID of the file or folder to share
  • share_type - Type of sharing: user, group, domain, or anyone
  • role - Permission role to grant
  • share_with - Email address or domain to share with
  • email_message - Optional message to include in the notification
  • send_notification - Whether to send a notification email
  • expiration_time - Optional expiration time for the permission
  • allow_file_discovery - Whether the file can be discovered through search

Batch Share Drive File

batch_share_drive_file

Shares a Google Drive file or folder with multiple users or groups in a single operation. Each recipient can have a different role and optional expiration time.

Parameters:

  • file_id - The ID of the file or folder to share
  • recipients - List of recipient objects with role and sharing details
  • email_message - Optional message to include in the notification
  • send_notification - Whether to send a notification email

Update Drive Permission

update_drive_permission

Updates an existing permission on a Google Drive file or folder.

Parameters:

  • file_id - The ID of the file or folder
  • permission_id - The ID of the permission to update
  • role - New permission role
  • expiration_time - New expiration time

Remove Drive Permission

remove_drive_permission

Removes a permission from a Google Drive file or folder, revoking access.

Parameters:

  • file_id - The ID of the file or folder
  • permission_id - The ID of the permission to remove

Set Drive File Permissions

set_drive_file_permissions

Sets file-level sharing settings and controls link sharing for a Google Drive file or folder. Use this to toggle "anyone with the link" access or configure file-level sharing behavior.

Parameters:

  • file_id - The ID of the file or folder
  • link_sharing - Link sharing setting
  • writers_can_share - Whether writers can share
  • copy_requires_writer_permission - Whether copy requires writer permission

Transfer Drive Ownership

transfer_drive_ownership

Transfers ownership of a Google Drive file or folder to another user. This is an irreversible operation.

Parameters:

  • file_id - The ID of the file or folder
  • new_owner_email - Email of the new owner
  • move_to_new_owners_root - Whether to move the file to the new owner's root

Manage Drive Access

manage_drive_access

Consolidated tool for managing Google Drive file and folder access permissions. Supports granting, batch-granting, updating, revoking permissions, and transferring file ownership — all through a single entry point.

Parameters:

  • action - Access management action: grant, grant_batch, update, revoke, or transfer_owner
  • file_id - The ID of the file or folder
  • share_type - Type of sharing: user, group, domain, or anyone (grant action)
  • share_with - Email address (user/group), domain name, or omit for anyone
  • role - Permission role: reader, commenter, or writer. Defaults to reader
  • recipients - List of recipient objects for grant_batch. Each has email, role, share_type, expiration_time
  • permission_id - Permission ID (required for update and revoke)
  • expiration_time - Expiration in RFC 3339 format (e.g., 2025-01-15T00:00:00Z)
  • email_message - Custom notification email message
  • send_notification - Whether to send notification emails. Defaults to true
  • allow_file_discovery - For domain/anyone shares, whether the file appears in search
  • new_owner_email - Email of the new owner (required for transfer_owner)
  • move_to_new_owners_root - Move file to the new owner's root. Defaults to false

Search Docs

search_docs

Searches for Google Docs by name using Drive API.

Parameters:

  • query - Search query string
  • page_size - Maximum number of results

Get Doc Content

get_doc_content

Retrieves content of a Google Doc or a Drive file (like .docx) identified by document_id.

Parameters:

  • document_id - The ID of the document

Get Doc As Markdown

get_doc_as_markdown

Reads a Google Doc and returns it as clean Markdown with optional comment context. Preserves document formatting as Markdown: headings, bold/italic/strikethrough, links, code spans, ordered/unordered lists with nesting, and tables.

Parameters:

  • document_id - ID of the Google Doc (or full URL)
  • include_comments - Whether to include comments. Defaults to true
  • comment_mode - How to display comments: inline, appendix, or none. Defaults to inline
  • include_resolved - Whether to include resolved comments. Defaults to false

List Docs In Folder

list_docs_in_folder

Lists Google Docs within a specific Drive folder.

Parameters:

  • folder_id - The ID of the folder
  • page_size - Maximum number of results

Create Doc

create_doc

Creates a new Google Doc and optionally inserts initial content.

Parameters:

  • title - Document title
  • content - Optional initial content

Modify Doc Text

modify_doc_text

Modifies text in a Google Doc — can insert/replace text and/or apply formatting in a single operation.

Parameters:

  • document_id - The ID of the document
  • text - Text to insert or replace
  • start_index - Start index for the operation
  • end_index - End index for the operation
  • bold - Apply bold formatting
  • italic - Apply italic formatting
  • underline - Apply underline formatting
  • font_size - Font size
  • font_family - Font family
  • text_color - Text color
  • background_color - Background color
  • link_url - URL to link

Find And Replace Doc

find_and_replace_doc

Finds and replaces text throughout a Google Doc.

Parameters:

  • document_id - The ID of the document
  • find_text - Text to find
  • replace_text - Text to replace with
  • match_case - Whether to match case

Insert Doc Elements

insert_doc_elements

Inserts structural elements like tables, lists, or page breaks into a Google Doc.

Parameters:

  • document_id - The ID of the document
  • element_type - Type of element to insert
  • index - Insertion index
  • text - Text content
  • rows - Number of table rows
  • columns - Number of table columns
  • list_type - Type of list

Insert Doc Image

insert_doc_image

Inserts an image into a Google Doc from Drive or a URL.

Parameters:

  • document_id - The ID of the document
  • image_source - Image source (URL or Drive ID)
  • index - Insertion index
  • width - Image width
  • height - Image height

Update Doc Headers Footers

update_doc_headers_footers

Updates headers or footers in a Google Doc.

Parameters:

  • document_id - The ID of the document
  • header_footer_type - Type: header or footer
  • section_type - Section type
  • content - Content to set

Batch Update Doc

batch_update_doc

Executes multiple document operations in a single atomic batch update.

Parameters:

  • document_id - The ID of the document
  • operations - List of operations to execute

Update Paragraph Style

update_paragraph_style

Apply paragraph-level formatting, heading styles, and/or list formatting to a range in a Google Doc.

Parameters:

  • document_id - The ID of the document
  • start_index - Start index
  • end_index - End index
  • heading_level - Heading level (H1–H6)
  • alignment - Paragraph alignment
  • line_spacing - Line spacing
  • space_above - Space above paragraph
  • space_below - Space below paragraph
  • indent_start - Start indentation
  • indent_end - End indentation
  • indent_first_line - First line indentation
  • list_type - List type
  • list_nesting_level - List nesting level

Inspect Doc Structure

inspect_doc_structure

Essential tool for finding safe insertion points and understanding document structure. Always call this before creating tables to get a safe insertion index.

Parameters:

  • document_id - The ID of the document
  • detailed - Whether to return detailed information

Create Table With Data

create_table_with_data

Creates a table and populates it with data in one reliable operation. You must call inspect_doc_structure first to get the correct insertion index.

Parameters:

  • document_id - The ID of the document
  • index - Insertion index (from inspect_doc_structure)
  • table_data - 2D list of strings representing table rows and columns
  • bold_headers - Whether to bold the header row

Debug Table Structure

debug_table_structure

Essential debugging tool for understanding existing table structure. Use when tables don't work as expected.

Parameters:

  • document_id - The ID of the document
  • table_index - Index of the table to inspect

Insert Doc Tab

insert_doc_tab

Inserts a new tab into a Google Doc.

Parameters:

  • document_id - ID of the document to update
  • title - Title of the new tab
  • index - Position index for the new tab (0-based among sibling tabs)
  • parent_tab_id - Optional ID of a parent tab to nest the new tab under

Update Doc Tab

update_doc_tab

Renames a tab in a Google Doc.

Parameters:

  • document_id - ID of the document to update
  • tab_id - ID of the tab to rename (use inspect_doc_structure to find tab IDs)
  • title - New title for the tab

Delete Doc Tab

delete_doc_tab

Deletes a tab from a Google Doc by its tab ID.

Parameters:

  • document_id - ID of the document to update
  • tab_id - ID of the tab to delete

Debug Docs Runtime Info

debug_docs_runtime_info

Returns runtime/source information for diagnosing stale MCP server instances. Diagnostic tool used to verify which code checkout the running MCP server has loaded.

Export Doc To Pdf

export_doc_to_pdf

Exports a Google Doc to PDF format and saves it to Google Drive.

Parameters:

  • document_id - The ID of the document
  • pdf_filename - Filename for the exported PDF
  • folder_id - Destination folder ID

Read Document Comments

read_document_comments

Read all comments from a Google Document.

Parameters:

  • document_id - The ID of the document

List Document Comments

list_document_comments

Lists all comments from a Google Document.

Parameters:

  • document_id - The ID of the document

Manage Document Comment

manage_document_comment

Manages comments on a Google Document. Supports creating, replying to, and resolving comments via a single tool.

Parameters:

  • action - Action to perform: create, reply, or resolve
  • document_id - The ID of the document
  • comment_content - Content of the comment (required for create and reply)
  • comment_id - Comment ID (required for reply and resolve)

Create Document Comment

create_document_comment

Create a new comment on a Google Document.

Parameters:

  • document_id - The ID of the document
  • comment_content - Content of the comment

Reply To Document Comment

reply_to_document_comment

Reply to a specific comment in a Google Document.

Parameters:

  • document_id - The ID of the document
  • comment_id - The ID of the comment to reply to
  • reply_content - Content of the reply

Resolve Document Comment

resolve_document_comment

Resolve a comment in a Google Document.

Parameters:

  • document_id - The ID of the document
  • comment_id - The ID of the comment to resolve

List Spreadsheets

list_spreadsheets

Lists spreadsheets from Google Drive that the user has access to.

Parameters:

  • max_results - Maximum number of results to return

Get Spreadsheet Info

get_spreadsheet_info

Gets information about a specific spreadsheet including its sheets.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet

Read Sheet Values

read_sheet_values

Reads values from a specific range in a Google Sheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • range_name - The range to read (e.g., Sheet1!A1:D10)
  • include_hyperlinks - Whether to include hyperlinks

List Sheet Tables

list_sheet_tables

Lists all structured tables in a spreadsheet with their IDs, names, ranges, and column details. Use this to find table IDs for append_table_rows.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet

Append Table Rows

append_table_rows

Appends rows to a structured table in a Google Sheet. The rows are added to the end of the table body, automatically extending the table range. Use list_sheet_tables first to find the table ID.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • table_id - The ID of the table to append to
  • values - 2D array of values to append. Each inner list is one row

Resize Sheet Dimensions

resize_sheet_dimensions

Manages sheet-level dimension properties: resize columns/rows, auto-resize to fit content, freeze rows/columns, hide/unhide rows/columns, and insert/delete rows/columns.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • sheet_name - Sheet name to target. Defaults to the first sheet
  • column_sizes - Dict mapping column letters to pixel widths (e.g., {"A": 200, "C": 300})
  • row_sizes - Dict mapping 1-based row numbers to pixel heights (e.g., {"1": 40, "3": 60})
  • auto_resize_columns - List of column letters to auto-resize (e.g., ["A", "B"])
  • auto_resize_rows - List of 1-based row numbers to auto-resize
  • hide_columns - List of column letters to hide
  • unhide_columns - List of column letters to unhide
  • hide_rows - List of 1-based row numbers to hide
  • unhide_rows - List of 1-based row numbers to unhide
  • frozen_row_count - Number of rows to freeze from the top. Use 0 to unfreeze all
  • frozen_column_count - Number of columns to freeze from the left. Use 0 to unfreeze all
  • insert_rows - Number of rows to insert
  • insert_rows_at - 1-based row number to insert before. Appends to the end if omitted
  • insert_columns - Number of columns to insert
  • insert_columns_at - Column letter to insert before (e.g., C). Appends to the end if omitted
  • delete_rows - List of 1-based row numbers to delete
  • delete_columns - List of column letters to delete

Create Spreadsheet

create_spreadsheet

Creates a new Google Spreadsheet.

Parameters:

  • title - Spreadsheet title
  • sheet_names - List of sheet names to create

Create Sheet

create_sheet

Creates a new sheet within an existing spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • sheet_name - Name of the new sheet

Modify Sheet Values

modify_sheet_values

Modifies values in a specific range of a Google Sheet — can write, update, or clear values.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • range_name - The range to modify
  • values - Values to write
  • clear_values - Whether to clear existing values
  • value_input_option - How input data should be interpreted

Format Sheet Range

format_sheet_range

Applies formatting to a range: colors, number formats, text wrapping, alignment, and text styling.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • range_name - The range to format
  • bold - Bold text
  • italic - Italic text
  • font_size - Font size
  • text_color - Text color (hex)
  • background_color - Background color (hex)
  • number_format_type - Number format type
  • number_format_pattern - Number format pattern
  • horizontal_alignment - Horizontal alignment
  • vertical_alignment - Vertical alignment
  • wrap_strategy - Text wrapping strategy

Add Conditional Formatting

add_conditional_formatting

Adds a conditional formatting rule to a range.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • range_name - The range to format
  • condition_type - Type of condition
  • condition_values - Condition values
  • text_color - Text color when condition is met
  • background_color - Background color when condition is met
  • rule_index - Position for the new rule
  • gradient_points - Gradient color points

Update Conditional Formatting

update_conditional_formatting

Updates an existing conditional formatting rule by index on a sheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • rule_index - Index of the rule to update
  • sheet_name - Sheet name
  • range_name - New range
  • condition_type - New condition type
  • condition_values - New condition values
  • text_color - New text color
  • background_color - New background color
  • gradient_points - New gradient points

Delete Conditional Formatting

delete_conditional_formatting

Deletes an existing conditional formatting rule by index on a sheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • rule_index - Index of the rule to delete
  • sheet_name - Sheet name

Manage Conditional Formatting

manage_conditional_formatting

Manages conditional formatting rules on a Google Sheet. Supports adding, updating, and deleting rules via a single tool.

Parameters:

  • action - Action to perform: add, update, or delete
  • spreadsheet_id - The ID of the spreadsheet
  • sheet_name - Sheet name to locate the rule when range_name is omitted
  • range_name - A1-style range (optionally with sheet name). Required for add
  • rule_index - 0-based index of the rule. Required for update and delete
  • condition_type - Sheets condition type (e.g., NUMBER_GREATER, TEXT_CONTAINS, DATE_BEFORE, CUSTOM_FORMULA). Required for add
  • condition_values - Values for the condition. Used by add and update
  • text_color - Hex text color to apply when condition matches
  • background_color - Hex background color to apply when condition matches
  • gradient_points - List of gradient points for a color scale. If provided, a gradient rule is created and boolean parameters are ignored

Read Spreadsheet Comments

read_spreadsheet_comments

Read all comments from a Google Spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet

List Spreadsheet Comments

list_spreadsheet_comments

Lists all comments from a Google Spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet

Manage Spreadsheet Comment

manage_spreadsheet_comment

Manages comments on a Google Spreadsheet. Supports creating, replying to, and resolving comments via a single tool.

Parameters:

  • action - Action to perform: create, reply, or resolve
  • spreadsheet_id - The ID of the spreadsheet
  • comment_content - Content of the comment (required for create and reply)
  • comment_id - Comment ID (required for reply and resolve)

Create Spreadsheet Comment

create_spreadsheet_comment

Create a new comment on a Google Spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • comment_content - Content of the comment

Reply To Spreadsheet Comment

reply_to_spreadsheet_comment

Reply to a specific comment in a Google Spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • comment_id - The ID of the comment to reply to
  • reply_content - Content of the reply

Resolve Spreadsheet Comment

resolve_spreadsheet_comment

Resolve a comment in a Google Spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet
  • comment_id - The ID of the comment to resolve

On this page