Back to MCP Catalog

Google Drive MCP Server

Cloud PlatformsTypeScript
Access and search files in your Google Drive
Available Tools

search

Search for files in Google Drive

query

The Google Drive MCP server provides seamless integration with Google Drive, allowing you to list, read, and search through your files directly from AI assistants. It supports all file types, with automatic conversion of Google Workspace files to appropriate formats (Docs to Markdown, Sheets to CSV, etc.). With this integration, you can leverage your existing Google Drive content as context for AI interactions, making it easier to reference documents, spreadsheets, and other files during conversations without having to manually copy and paste content.

Overview

The Google Drive MCP server enables AI assistants to access and search your Google Drive files. This integration allows you to reference documents, spreadsheets, presentations, and other files stored in your Google Drive directly in your AI conversations.

Features

  • Search for files in Google Drive using natural language queries
  • Access all file types stored in Google Drive
  • Automatic conversion of Google Workspace files:
    • Google Docs → Markdown
    • Google Sheets → CSV
    • Google Slides → Plain text
    • Google Drawings → PNG
  • Other files are provided in their native format

Setup Instructions

Prerequisites

Before using the Google Drive MCP server, you need to set up OAuth credentials:

  1. Create a new Google Cloud project at console.cloud.google.com/projectcreate
  2. Enable the Google Drive API at console.cloud.google.com/workspace-api/products
  3. Configure an OAuth consent screen at console.cloud.google.com/apis/credentials/consent (selecting "internal" is sufficient for testing)
  4. Add the OAuth scope: https://www.googleapis.com/auth/drive.readonly
  5. Create an OAuth Client ID at console.cloud.google.com/apis/credentials/oauthclient for application type "Desktop App"
  6. Download the JSON file containing your OAuth keys
  7. Rename the key file to gcp-oauth.keys.json

Authentication

After setting up your OAuth credentials, you need to authenticate the server:

  1. Run the server with the auth argument: node ./dist auth or using the appropriate Docker command
  2. This will open an authentication flow in your browser
  3. Complete the authentication process
  4. Credentials will be saved (location depends on your installation method)

Installation Options

NPX Installation

Add the following configuration to your AI assistant's settings:

{
  "mcpServers": {
    "gdrive": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gdrive"
      ],
      "env": {
        "GDRIVE_CREDENTIALS_PATH": "/path/to/.gdrive-server-credentials.json"
      }
    }
  }
}

Replace /path/to/.gdrive-server-credentials.json with the actual path to your credentials file.

Docker Installation

If you prefer using Docker, add this configuration instead:

{
  "mcpServers": {
    "gdrive": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "mcp-gdrive:/gdrive-server",
        "-e",
        "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json",
        "mcp/gdrive"
      ]
    }
  }
}

Usage

Once installed and authenticated, you can use the Google Drive MCP server to:

  1. Search for files using the search tool
  2. Access file contents using the resource URI format: gdrive:///<file_id>

The server will automatically handle file type conversions as needed, making the content accessible to your AI assistant in the most appropriate format.

Troubleshooting

  • If you encounter authentication issues, try re-running the authentication process
  • Ensure your OAuth credentials have the correct scope (https://www.googleapis.com/auth/drive.readonly)
  • Check that the path to your credentials file is correct in your configuration
  • For Docker installations, verify that the volume is properly mounted

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.