MCP

Access and Search Google Drive Files

Integrate Google Drive with Claude to search files, read content, and access cloud storage. Install with npm.

Works with google drive

90
Spark score
out of 100
Updated 4 months ago
Version 1.0.0

Add to Favorites

Why it matters

Integrate Google Drive with your AI, enabling it to search for files, read their content, and access cloud storage for enhanced data retrieval and analysis.

Outcomes

What it gets done

01

Search for files using Drive's query syntax.

02

Read the content of specific files by ID.

03

List files within a specified folder.

04

Access files via resource URIs (e.g., gdrive:///file_id).

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-gdrive | bash

Capabilities

Tools your agent gets

search_files

Search for files in Google Drive using search queries and Drive search syntax.

read_file

Read the contents of a file from Google Drive by file ID.

list_files

List files in a Google Drive folder or root directory.

Overview

Google Drive MCP

What it does

This connector allows Claude to interact with Google Drive, enabling it to search for files, read their contents, and access cloud storage.

How it connects

Use this connector when you need to retrieve information from your Google Drive for use within Claude.

Source README

The Google Drive MCP server provides integration with Google Drive, allowing Claude to search for files, read document contents, and access your cloud storage.

Installation

npm install -g @modelcontextprotocol/server-gdrive

Configuration

Add to your Claude Code settings:

{
  "mcpServers": {
    "gdrive": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-gdrive"]
    }
  }
}

Authentication Setup

  1. Create a project in Google Cloud Console
  2. Enable the Google Drive API
  3. Create OAuth 2.0 credentials (Desktop application type)
  4. Download the credentials file
  5. Set the path to credentials:
{
  "mcpServers": {
    "gdrive": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-gdrive"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/credentials.json"
      }
    }
  }
}

Available Tools

search_files

Search for files in Google Drive.

search_files(query: string): FileList

Parameters:

  • query - Search query (supports Drive search syntax)

read_file

Read the contents of a file.

read_file(file_id: string): FileContent

list_files

List files in a folder.

list_files(folder_id?: string): FileList

Resources

The server also exposes files as MCP resources:

  • gdrive:///<file_id> - Access any file by ID
  • Supports Google Docs, Sheets, and other formats

Supported File Types

  • Google Docs (exported as text)
  • Google Sheets (exported as CSV)
  • Google Slides (exported as text)
  • PDF files
  • Plain text files
  • And more...

Usage Example

Claude, search my Google Drive for documents about
"quarterly report" and summarize the most recent one.

Permissions

The server requires the following OAuth scopes:

  • https://www.googleapis.com/auth/drive.readonly - Read file metadata and content
  • https://www.googleapis.com/auth/drive.file - Access files created by the app

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.