@botrun/mcp-google-drive
v0.1.0
Published
MCP server for Google Drive - list files, read content from Google Docs/Sheets/Slides
Readme
@botrun/mcp-google-drive
MCP (Model Context Protocol) server for Google Drive integration. List files, read content from Google Docs, Sheets, and Slides.
Features
- 📁 List Drive Files - List all files in a Google Drive folder
- 📄 Get File Content - Read content from Google Docs, Sheets, Slides, and other text files
- 🔓 Public Access - Access public files without credentials
- 🔐 Private Access - Access private files with Service Account
Installation
npm install -g @botrun/mcp-google-driveOr use with npx:
npx @botrun/mcp-google-driveSetup in Cursor / Claude Desktop
Add to your MCP configuration file:
For Public Files Only (No credentials needed)
{
"mcpServers": {
"google-drive": {
"command": "npx",
"args": ["@botrun/mcp-google-drive"]
}
}
}For Private Files (Requires Service Account)
{
"mcpServers": {
"google-drive": {
"command": "npx",
"args": ["@botrun/mcp-google-drive"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/credentials.json"
}
}
}
}Getting Service Account Credentials
- Go to Google Cloud Console
- Create or select a project
- Enable the Google Drive API
- Go to Credentials → Create Credentials → Service Account
- Create the service account and download the JSON key file
- Share your Google Drive folder/files with the service account email
Available Tools
list-drive-files
List all files in a Google Drive folder.
Input:
url(required): Google Drive folder URL
Example:
List files in https://drive.google.com/drive/folders/xxxxxget-drive-file-content
Get the content of a single file.
Input:
fileUrl(required): Google Drive file URL or file ID
Supported formats:
- Google Docs → Plain text
- Google Sheets → CSV
- Google Slides → Plain text
- Other text files → Raw content
Example:
Read content from https://docs.google.com/document/d/xxxxx/editOutput Format
All responses follow a consistent JSON format:
{
"isSuccess": true,
"result": {
"message": "Description"
// ... data
}
}Environment Variables
| Variable | Required | Description |
| -------------------------------- | -------- | ------------------------------------- |
| GOOGLE_APPLICATION_CREDENTIALS | No | Path to Service Account JSON key file |
License
MIT
