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

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

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

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

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

Read Spreadsheet Comments

read_spreadsheet_comments

Read all comments from a Google Spreadsheet.

Parameters:

  • spreadsheet_id - The ID of the spreadsheet

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