gdrive-mcp
Provides the ability to list files and folders in a configured Google Drive folder and read text content from files, with automatic export of Google Docs, Sheets, and Slides.
Click on "Deploy 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 the files in the configured Google Drive 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.
gdrive-mcp
An MCP (Model Context Protocol) server that exposes a Google Drive folder over Streamable HTTP, built to run on Vercel and hosted on GitHub.
It provides two tools:
Tool | Description |
| List files/folders inside the configured Drive folder (optional search) |
| Read text content, auto-exporting Google Docs/Sheets/Slides |
Architecture
server.ts— Node.js HTTP server entrypoint (Streamable HTTP MCP endpoint).src/mcp.ts— MCP server definition + tools.src/drive.ts— Google Drive client using a service account.
Authentication is read-only (drive.readonly) via a Google service account.
Related MCP server: gdrive-mcp-server
1. Google Cloud setup (service account)
Go to Google Cloud Console and create a project.
Enable the Google Drive API:
APIs & Services→Library→ search "Google Drive API" → Enable.Create a service account:
IAM & Admin→Service Accounts→Create Service Account.Create a JSON key for it: open the service account →
Keys→Add Key→Create New Key→ JSON. Download the file.Note the service account email (looks like
name@project.iam.gserviceaccount.com).Share the Drive folder with that email:
Open your folder in Google Drive → right-click →
Share.Paste the service account email, give it Viewer access.
Copy the folder ID (the part after
/folders/in the URL).
2. Local setup
git clone <your-repo-url>
cd gdrive-mcp
npm installCreate a .env file (copy .env.example):
DRIVE_FOLDER_ID=1XM-0CtgvW3PGDekC8qLa2ghxRyvTfjwD
GOOGLE_SERVICE_ACCOUNT_KEY=<base64 of service-account.json>Encode the service-account key to base64:
Linux/macOS:
base64 -w0 service-account.jsonPowerShell:
[Convert]::ToBase64String([IO.File]::ReadAllBytes("service-account.json"))
3. Deploy to Vercel
Option A — Vercel + GitHub (recommended)
Push this repo to GitHub.
In Vercel → Add New → Project → import the GitHub repo.
Add the environment variables (
DRIVE_FOLDER_ID,GOOGLE_SERVICE_ACCOUNT_KEY).Deploy. The MCP endpoint will be:
https://<your-project>.vercel.app
Option B — Vercel CLI
npm i -g vercel
vercel login
vercel env add DRIVE_FOLDER_ID
vercel env add GOOGLE_SERVICE_ACCOUNT_KEY
vercel --prod4. Push to GitHub (first time)
git init
git add .
git commit -m "Add gdrive-mcp server"
git branch -M main
git remote add origin https://github.com/<you>/gdrive-mcp.git
git push -u origin main5. Connect an MCP client
Point your client at the deployed URL with the Streamable HTTP transport.
Example claude_desktop_config.json:
{
"mcpServers": {
"gdrive": {
"type": "http",
"url": "https://<your-project>.vercel.app"
}
}
}For clients that use the generic MCP config format:
{
"mcpServers": {
"gdrive": {
"url": "https://<your-project>.vercel.app"
}
}
}The endpoint is stateless, so each request creates a fresh transport — ideal for serverless. Access is controlled by Google Drive sharing on the service account.
Environment variables
Variable | Required | Description |
| Yes | Google Drive folder ID |
| Yes | Base64-encoded service-account JSON key |
This server cannot be deployed
Maintenance
Related MCP Connectors
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth.
Give Claude only the Google Drive files you choose. Every action logged.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA read-only Google Drive MCP server that allows searching files, reading file content (with auto-export for Google Docs, Sheets, Slides), and retrieving file metadata via OAuth authentication.13 npm2-
- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI assistants to interact with a user's Google Drive, including listing, searching, reading, creating, updating, and deleting files, with authentication via Google OAuth.-
- FlicenseNot gradedqualityBmaintenanceA read-only MCP server that exposes a configured Google Drive folder to MCP clients, enabling them to list, search, and extract content from various file formats like Excel, CSV, PDF, DOCX, and images.-
- FlicenseNot gradedqualityCmaintenanceEnables interacting with Google Drive folders through an MCP server, allowing listing, searching, and reading files using tools like list_files, search_files, get_file, and read_file.-