gdrive-mcp
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., "@gdrive-mcplist my recent Google Drive files"
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
A Model Context Protocol (MCP) server that provides tools to search, list, and read files from Google Drive. Use it with Claude Desktop, Cursor, or any MCP-compatible client.
Features
Tool | Description |
| Full-text search across file names and contents |
| Show recently modified files |
| Download and return file content as text |
| Get detailed file information |
| Browse folder contents |
| Files others have shared with you |
| Your starred/important files |
| Read comments and discussions on a file |
Related MCP server: Google Drive MCP Server
Prerequisites
Python 3.11+
A Google account with Google Drive access
Setup
1. Clone the Repository
git clone https://github.com/YOUR_USERNAME/gdrive-mcp.git
cd gdrive-mcp2. Install Dependencies
pip install -r requirements.txt3. Create Google OAuth Credentials
Go to Google Cloud Console
Create a new project (or select an existing one)
Enable the Google Drive API:
Go to APIs & Services → Library
Search for "Google Drive API" → Click Enable
Create OAuth credentials:
Go to APIs & Services → Credentials
Click + Create Credentials → OAuth client ID
If prompted, configure the OAuth consent screen:
User Type: External
Add your email as a test user
Application type: Desktop app
Click Create
Download the JSON file and save it as
client_secrets.jsonin the project root
4. Configure Your MCP Client
For Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"gdrive": {
"command": "python3",
"args": ["/path/to/gdrive-mcp/server.py"]
}
}
}For Claude Desktop
Add to your Claude Desktop config:
{
"mcpServers": {
"gdrive": {
"command": "python3",
"args": ["/path/to/gdrive-mcp/server.py"]
}
}
}Note: Replace /path/to/gdrive-mcp with the actual path where you cloned the repo.
5. Authenticate
On first use, the server will:
Open a browser window for Google OAuth
Ask you to sign in and grant "View files in Google Drive" permission
Save the token to
token.jsonfor future use
Usage Examples
Once configured, you can ask your AI assistant:
"Search my Google Drive for quarterly reports"
"Show me files I've modified in the last 48 hours"
"Get the content of file with ID xyz123"
"List the contents of my Drive root folder"
File Structure
gdrive-mcp/
├── server.py # MCP server (main entry point)
├── requirements.txt # Python dependencies
├── client_secrets.json # Your OAuth credentials (do not commit!)
├── client_secrets.example.json # Template for credentials
├── token.json # Auth token (auto-generated, do not commit!)
├── README.md # This file
└── _tools/ # Standalone CLI scripts (optional)
├── gdrive_download.py
└── gdrive_recent.pySecurity Notes
Never commit
client_secrets.jsonortoken.json— they contain sensitive credentialsEach user must create their own Google Cloud project and OAuth credentials
The server only requests read-only access (
drive.readonlyscope)
Troubleshooting
"Access blocked" error during OAuth
Go to Google Cloud Console → APIs & Services → OAuth consent screen
Add your email to Test Users
Token expired
Delete
token.jsonand restart the server to re-authenticate
Module not found errors
Ensure you're using the same Python that has the dependencies installed
Try using the full path to Python:
/usr/bin/python3or similar
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.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that provides seamless integration with Google Workspace, allowing operations with Google Drive, Docs, and Sheets through secure OAuth2 authentication.83MIT
- Alicense-qualityDmaintenanceA server that provides a Machine Control Protocol (MCP) interface to search, access, and interact with Google Drive files and folders, enabling AI assistants to work with Google Drive content.8MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to interact with Google Workspace services including Drive, Docs, and Sheets through natural language commands.8MIT
- FlicenseBqualityDmaintenanceAn MCP server that enables integration with Google Drive through a service account to list files and retrieve detailed file metadata. It allows users to browse and inspect Drive contents using natural language via the Model Context Protocol.2
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/jskutner/gdrive-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server