Integrates with Google Drive API to enable file listing, searching, and reading for document retrieval and content analy...
Created byApr 22, 2025
Google Drive MCP Server
A powerful Model Context Protocol (MCP) server that provides seamless integration with Google Drive, allowing AI models to search, list, and read files from Google Drive.
Features
Tools
1. `gdrive_search`
Search for files in your Google Drive with powerful full-text search capabilities.
Input:
Output: List of files with:
2. `gdrive_read_file`
Read file contents directly using a Google Drive file ID.
Input:
Output: File contents with appropriate format conversion
Automatic File Format Handling
The server intelligently handles different Google Workspace file types:
Google Docs Markdown
Google Sheets CSV
Google Presentations Plain text
Google Drawings PNG
Text/JSON files UTF-8 text
Other files Base64 encoded
Getting Started
Prerequisites
Node.js (v16 or higher)
npm or yarn
A Google Cloud Project
A Google Workspace or personal Google account
Detailed Google Cloud Setup
Create a Google Cloud Project
Enable the Google Drive API
Configure OAuth Consent Screen
Create OAuth Client ID
Set Up Credentials in Project
Installation
Authentication
Create a credentials directory and place your OAuth keys:
Run the authentication command:
Complete the OAuth flow in your browser
Credentials will be saved in credentials/.gdrive-server-credentials.json
Usage
As a Command Line Tool
Integration with Desktop App
Add this configuration to your app's server settings:
Replace path/to/gdrive-mcp-server with the actual path to your installation directory.
Example Usage
Search for files:
Read file contents:
Security
All sensitive credentials are stored in the credentials directory
OAuth credentials and tokens are excluded from version control
Read-only access to Google Drive
Secure OAuth 2.0 authentication flow
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This MCP server is licensed under the MIT License. See the LICENSE file for details.
Troubleshooting
If you encounter issues:
Verify your Google Cloud Project setup
Ensure all required OAuth scopes are enabled
Check that credentials are properly placed in the credentials directory
Verify file permissions and access rights in Google Drive
A powerful Model Context Protocol (MCP) server that provides seamless integration with Google Drive, allowing AI models to search, list, and read files from Google Drive.
Features
Tools
1. `gdrive_search`
Search for files in your Google Drive with powerful full-text search capabilities.
Input:
Output: List of files with:
2. `gdrive_read_file`
Read file contents directly using a Google Drive file ID.
Input:
Output: File contents with appropriate format conversion
Automatic File Format Handling
The server intelligently handles different Google Workspace file types:
Google Docs Markdown
Google Sheets CSV
Google Presentations Plain text
Google Drawings PNG
Text/JSON files UTF-8 text
Other files Base64 encoded
Getting Started
Prerequisites
Node.js (v16 or higher)
npm or yarn
A Google Cloud Project
A Google Workspace or personal Google account
Detailed Google Cloud Setup
Create a Google Cloud Project
Enable the Google Drive API
Configure OAuth Consent Screen
Create OAuth Client ID
Set Up Credentials in Project
Installation
Authentication
Create a credentials directory and place your OAuth keys:
Run the authentication command:
Complete the OAuth flow in your browser
Credentials will be saved in credentials/.gdrive-server-credentials.json
Usage
As a Command Line Tool
Integration with Desktop App
Add this configuration to your app's server settings:
Replace path/to/gdrive-mcp-server with the actual path to your installation directory.
Example Usage
Search for files:
Read file contents:
Security
All sensitive credentials are stored in the credentials directory
OAuth credentials and tokens are excluded from version control
Read-only access to Google Drive
Secure OAuth 2.0 authentication flow
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This MCP server is licensed under the MIT License. See the LICENSE file for details.
Troubleshooting
If you encounter issues:
Verify your Google Cloud Project setup
Ensure all required OAuth scopes are enabled
Check that credentials are properly placed in the credentials directory
Verify file permissions and access rights in Google Drive