Access and Search Google Drive Files
Integrate Google Drive with Claude to search files, read content, and access cloud storage. Install with npm.
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
Search for files using Drive's query syntax.
Read the content of specific files by ID.
List files within a specified folder.
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 for files in Google Drive using search queries and Drive search syntax.
Read the contents of a file from Google Drive by file ID.
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
- Create a project in Google Cloud Console
- Enable the Google Drive API
- Create OAuth 2.0 credentials (Desktop application type)
- Download the credentials file
- 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 contenthttps://www.googleapis.com/auth/drive.file- Access files created by the app
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.