Google Drive MCP
Allows reading the contents of Google Docs documents by exporting them to text.
Provides tools to read, create, update, search, delete, move, copy, and share files and folders in Google Drive.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Drive MCPlist files in my root folder"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Drive MCP Server
Connect Google Drive to Claude Code with a simple double-click setup. This MCP server allows Claude to read, create, update, and manage files in your Google Drive.
Prerequisites
Python 3.10 or higher
A Google Account (personal or Google Workspace)
Google Cloud Console access
Related MCP server: aegea-drive-mcp
Step 1: Create Google Cloud Credentials
1.1 Create a Google Cloud Project
Go to Google Cloud Console
Click the project dropdown at the top of the page
Click New Project
Enter a project name (e.g., "Google Drive MCP")
Click Create
Wait for the project to be created, then select it
1.2 Enable the Google Drive API
In the Google Cloud Console, go to APIs & Services > Library
Search for "Google Drive API"
Click on Google Drive API
Click Enable
1.3 Configure OAuth Consent Screen
Go to APIs & Services > OAuth consent screen
Select External (or Internal if using Google Workspace)
Click Create
Fill in the required fields:
App name: Google Drive MCP
User support email: Your email
Developer contact email: Your email
Click Save and Continue
On the Scopes page, click Add or Remove Scopes
Add these scopes:
https://www.googleapis.com/auth/drive.readonlyhttps://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/drive
Click Update, then Save and Continue
On the Test users page, click Add Users
Add your email address
Click Save and Continue
1.4 Create OAuth Client ID
Go to APIs & Services > Credentials
Click Create Credentials > OAuth client ID
Select Desktop app as the application type
Enter a name (e.g., "Google Drive MCP Desktop")
Click Create
Click Download JSON on the popup
Rename the downloaded file to
credentials.jsonPlace
credentials.jsonin the project root directory
Important: The credentials must be of type "Desktop app", not "Web application".
Step 2: Install Dependencies
Option A: Using Virtual Environment (Recommended)
# Clone the repository
git clone https://github.com/david-valdivia/GoogleDriveMCP.git
cd GoogleDriveMCP
# Create virtual environment (Python 3.10+ required)
python3 -m venv .venv
# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtOption B: Global Installation
pip install -r requirements.txtStep 3: Run the Setup GUI
# With virtual environment activated
python -m src.mainThis opens the setup window where you can:
Select your permission level (Read Only, Read + Create, or Full Access)
Click "Connect to Google" to authenticate
Complete the OAuth flow in your browser
Click "Configure MCP" to select a project directory for Claude Code
Step 4: Build the Executable (Optional)
Build a standalone executable that doesn't require Python:
# With virtual environment activated
python build/build.pyBuild Output
Platform | Output |
macOS |
|
Windows |
|
Linux |
|
macOS Additional Requirements
If building on macOS, you need Tcl/Tk for the GUI:
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python with Tcl/Tk support
brew install python-tk@3.12Step 5: Configure Claude Code
After authentication, the app automatically creates a .mcp.json file in your selected project directory. Alternatively, create it manually:
{
"mcpServers": {
"googledrive": {
"command": "/path/to/googledrive-mcp",
"args": ["--serve"]
}
}
}Replace /path/to/googledrive-mcp with:
Built executable: Full path to
googledrive-mcporgoogledrive-mcp.exeFrom source: Full path to Python and script, e.g.:
{ "mcpServers": { "googledrive": { "command": "/path/to/.venv/bin/python", "args": ["/path/to/GoogleDriveMCP/src/main.py", "--serve"] } } }
Permission Levels
Level | Scopes | Capabilities |
Read Only |
| View and search files |
Read + Create |
| Above + create new files |
Full Access |
| Read, create, update, delete, share |
Available MCP Tools
Tool | Description | Required Permission |
| List files in a folder or root | Read Only |
| Read file contents (exports Google Docs to text) | Read Only |
| Full-text search across Drive | Read Only |
| List all folders for navigation | Read Only |
| View who has access to a file | Read Only |
| Create a new file or Google Doc | Read + Create |
| Create a new folder | Read + Create |
| Update file contents | Full Access |
| Move file to trash | Full Access |
| Move file to different folder | Full Access |
| Copy a file | Full Access |
| Share file with email address | Full Access |
Development
Run Tests
# With virtual environment activated
pytest -vProject Structure
GoogleDriveMCP/
├── src/
│ ├── main.py # Entry point, mode detection
│ ├── gui.py # Setup GUI with tkinter
│ ├── server.py # MCP server implementation
│ ├── drive.py # Google Drive API wrapper
│ ├── auth.py # OAuth flow and token management
│ └── config.py # Platform-specific config paths
├── tests/ # Test files
├── build/
│ ├── build.py # Build script
│ └── googledrive-mcp.spec # PyInstaller spec
├── credentials.json # Your OAuth credentials (not committed)
├── requirements.txt # Python dependencies
└── README.mdToken Storage Location
Tokens are stored in platform-specific locations:
Platform | Location |
macOS |
|
Windows |
|
Linux |
|
Troubleshooting
"credentials.json not found"
Make sure credentials.json is in the project root directory (same folder as src/).
"Error 400: redirect_uri_mismatch"
Your OAuth credentials are configured as "Web application" instead of "Desktop app". Create new credentials with type "Desktop app".
"Access blocked: This app's request is invalid"
Make sure you added yourself as a test user in the OAuth consent screen
Verify the app is in "Testing" mode (not "In production")
"ModuleNotFoundError: No module named 'tkinter'"
On macOS with Homebrew Python:
brew install python-tk@3.12On Ubuntu/Debian:
sudo apt-get install python3-tkMCP server not connecting in Claude Code
Verify the path in
.mcp.jsonis correct and absoluteRestart Claude Code after creating/modifying
.mcp.jsonCheck that the executable has execute permissions:
chmod +x googledrive-mcp
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/david-valdivia/GoogleDriveMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server