Google Drive MCP Server
Google Drive MCP servers enable AI models to interact with Google Drive, providing capabilities for file search, content retrieval, and seamless integration with cloud storage.
Overview
The MCP Google Drive Server provides seamless integration with Google Drive, allowing AI models to search, list, and read files from Google Drive. It intelligently handles different Google Workspace file types, converting them to appropriate formats for AI consumption.
Created by:
Developed by felores
Key Features
Powerful File Search
Search for files in your Google Drive with full-text search capabilities.
Direct File Content Access
Read file contents directly using a Google Drive file ID.
Automatic Format Handling
Intelligently converts Google Docs to Markdown, Sheets to CSV, and more.
Secure Authentication
Secure OAuth 2.0 authentication flow with read-only access.
Available Tools
Quick Reference
| Tool | Purpose | Category |
|---|---|---|
gdrive_search | Search for files in Google Drive | Discovery |
gdrive_read_file | Read file contents by ID | Read |
Detailed Usage
gdrive_search▶
Search for files in your Google Drive with powerful full-text search capabilities.
use_mcp_tool({
server_name: "gdrive",
tool_name: "gdrive_search",
arguments: {
query: "quarterly report"
}
});
Returns a list of files with name, MIME type, ID, last modified time, and size.
gdrive_read_file▶
Read file contents directly using a Google Drive file ID.
use_mcp_tool({
server_name: "gdrive",
tool_name: "gdrive_read_file",
arguments: {
file_id: "your-file-id"
}
});
Returns the file contents with appropriate format conversion (e.g., Docs to Markdown).
Installation
{
"mcpServers": {
"gdrive": {
"command": "node",
"args": [
"path/to/gdrive-mcp-server/dist/index.js"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "path/to/gdrive-mcp-server/credentials/gcp-oauth.keys.json",
"MCP_GDRIVE_CREDENTIALS": "path/to/gdrive-mcp-server/credentials/.gdrive-server-credentials.json"
}
}
}
}
Local Installation:
Replace path/to/gdrive-mcp-server with the actual path to your installation directory.
Authentication
To set up authentication for the Google Drive MCP Server, you need to:
- Create a Google Cloud Project and enable the Google Drive API.
- Configure the OAuth Consent Screen.
- Create OAuth Client ID for a "Desktop app" and download the JSON file (e.g.,
client_secret_*.json). - Create a
credentialsdirectory in yourgdrive-mcp-serverinstallation. - Move and rename the downloaded JSON file to
credentials/gcp-oauth.keys.json. - Run the authentication command:
node dist/index.js authfrom the server's directory and complete the OAuth flow in your browser. This will generate.gdrive-server-credentials.json.
Common Use Cases
1. Searching for Documents
Find specific documents based on keywords:
use_mcp_tool({
server_name: "gdrive",
tool_name: "gdrive_search",
arguments: {
query: "meeting minutes Q3 2023"
}
});
2. Retrieving File Content
Get the content of a Google Doc or other file by its ID:
use_mcp_tool({
server_name: "gdrive",
tool_name: "gdrive_read_file",
arguments: {
file_id: "1AbCdEfGhIjKlMnOpQrStUvWxYz"
}
});
3. Processing Google Sheets Data
Read a Google Sheet and process its CSV content:
// Assuming gdrive_read_file returns CSV for Sheets
use_mcp_tool({
server_name: "gdrive",
tool_name: "gdrive_read_file",
arguments: {
file_id: "your-spreadsheet-id"
}
});
Sources
Related Articles
Puppeteer MCP Server
Puppeteer MCP servers enable AI models to perform browser automation, web scraping, testing workflows, and screenshot generation through headless Chrome/Chromium control.
Vectara MCP Server
Vectara MCP servers enable AI models to interact with Vectara's RAG platform, providing capabilities for fast and reliable Retrieval-Augmented Generation, semantic search, and hallucination correction.
Datadog MCP Server
Datadog MCP servers enable AI models to interact with Datadog observability: metrics, logs, traces, monitors, dashboards, incidents, and infrastructure insights.