gdrive-mcp
Enables MCP clients to access a configured Google Drive folder over Streamable HTTP, listing files and reading text content with automatic export of Google Docs, Sheets, and Slides.
README
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 |
List files/folders inside the configured Drive folder (optional search) |
read_file |
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.
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.
- Open your folder in Google Drive → right-click →
- Copy the folder ID (the part after
/folders/in the URL).
2. Local setup
git clone <your-repo-url>
cd gdrive-mcp
npm install
Create 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.json - PowerShell:
[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 --prod
4. 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 main
5. 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 |
|---|---|---|
DRIVE_FOLDER_ID |
Yes | Google Drive folder ID |
GOOGLE_SERVICE_ACCOUNT_KEY |
Yes | Base64-encoded service-account JSON key |
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.