MCP Google Drive Server
Provides tools for interacting with Google Drive, including listing, searching, reading, creating, updating, deleting, moving, copying, renaming, sharing files and folders, managing permissions, and viewing storage quota.
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., "@MCP Google Drive Serverlist files in my 'Projects' 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.
🚀 MCP Google Drive Server
Kết nối AI Assistant với Google Drive của bạn thông qua Model Context Protocol (MCP)
Connect your AI Assistant to Google Drive via Model Context Protocol (MCP)
📖 Hướng dẫn Tiếng Việt
MCP Google Drive là gì?
MCP Google Drive là một server tuân theo chuẩn Model Context Protocol (MCP) — giao thức cho phép các AI Assistant (như Antigravity IDE, Claude Code, Claude Desktop) đọc, ghi, tìm kiếm và quản lý file trên Google Drive của bạn trực tiếp qua chat.
Sau khi cài đặt, bạn có thể nói chuyện với AI như:
"Hãy tạo file tóm tắt cuộc họp hôm nay và lưu vào thư mục 'Work' trên Drive của tôi" "Đọc nội dung file report.txt trong Drive và phân tích giúp tôi" "Tìm tất cả file Excel trong Drive có tên chứa 'báo cáo'"
✨ Tính năng
Tool | Mô tả |
| Liệt kê file/folder trong thư mục bất kỳ |
| Tạo thư mục mới |
| Đọc nội dung file (hỗ trợ Google Docs, Sheets, CSV, text) |
| Tạo file mới với nội dung |
| Cập nhật nội dung file có sẵn |
| Xóa file/folder (chuyển vào thùng rác hoặc xóa vĩnh viễn) |
| Tìm kiếm file theo tên, loại, v.v. |
📋 Yêu cầu trước khi cài đặt
Node.js v18 trở lên
Tài khoản Google
Đã cài Antigravity IDE hoặc Claude Code / Claude Desktop
🔧 Bước 1: Lấy Google OAuth Credentials
Đây là bước quan trọng nhất. Bạn cần tạo thông tin xác thực OAuth 2.0 từ Google Cloud Console.
1.1. Vào Google Cloud Console
Truy cập https://console.cloud.google.com
Đăng nhập bằng tài khoản Google của bạn
Tạo Project mới hoặc chọn project hiện có
1.2. Bật Google Drive API
Trong menu bên trái, chọn "APIs & Services" → "Library"
Tìm kiếm "Google Drive API"
Click vào kết quả và nhấn "Enable" (Bật)
1.3. Tạo OAuth 2.0 Credentials
Vào "APIs & Services" → "Credentials"
Click "+ Create Credentials" → "OAuth client ID"
Nếu được yêu cầu cấu hình OAuth consent screen:
Chọn "External" → "Create"
Điền tên app (bất kỳ, ví dụ: "My MCP Drive")
Thêm email của bạn vào "Test users"
Lưu lại
Quay lại tạo credentials:
Application type: chọn "Desktop app"
Name: đặt tên bất kỳ (ví dụ: "MCP Drive Desktop")
Click "Create"
Nhấn "Download JSON" để tải file credentials
1.4. Lưu file credentials
Đặt file vừa tải về vào thư mục dự án và đổi tên thành credentials.json
⚠️ Quan trọng: KHÔNG chia sẻ file
credentials.jsonvàtoken.jsonvới bất kỳ ai!
📥 Bước 2: Cài đặt MCP Google Drive
# Clone repository
git clone https://github.com/mrbit-dev/mcp-google-driver.git
cd mcp-google-driver
# Cài đặt dependencies
npm install
# Build TypeScript
npm run build🔑 Bước 3: Xác thực Google Drive (Lần đầu tiên)
npm run authChương trình sẽ:
Hiển thị một đường link Google OAuth
Mở link đó trong trình duyệt, đăng nhập và cấp quyền
Sau khi xác nhận, bạn sẽ được chuyển hướng (trang có thể báo lỗi kết nối — điều đó bình thường)
Copy toàn bộ URL trên thanh địa chỉ trình duyệt và dán vào terminal
File
token.jsonsẽ được tạo tự động — xác thực thành công!
⚙️ Bước 4: Cài đặt vào AI Assistant
🤖 Antigravity IDE
Mở Antigravity IDE
Vào Settings → MCP Servers
Thêm cấu hình sau:
{
"mcpServers": {
"google-drive": {
"command": "node",
"args": ["C:/ĐƯỜNG_DẪN_ĐẾN_THƯ_MỤC/mcp-google-driver/dist/index.js"],
"env": {
"CREDENTIALS_PATH": "C:/ĐƯỜNG_DẪN_ĐẾN_THƯ_MỤC/mcp-google-driver/credentials.json",
"TOKEN_PATH": "C:/ĐƯỜNG_DẪN_ĐẾN_THƯ_MỤC/mcp-google-driver/token.json"
}
}
}
}💡 Thay
C:/ĐƯỜNG_DẪN_ĐẾN_THƯ_MỤCbằng đường dẫn thực tế trên máy bạn.Ví dụ Windows:
C:/Users/TenUser/Documents/mcp-google-driverVí dụ macOS/Linux:/home/user/mcp-google-driver
Restart Antigravity IDE
Kiểm tra: Chat với AI và hỏi "Liệt kê file trong Google Drive của tôi"
🖥️ Claude Code (CLI)
Thêm vào file cấu hình MCP của Claude Code:
# Mở file cấu hình (tạo nếu chưa có)
# Windows: %APPDATA%\Claude\claude_desktop_config.json
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Linux: ~/.config/Claude/claude_desktop_config.jsonNội dung file cấu hình:
{
"mcpServers": {
"google-drive": {
"command": "node",
"args": ["/ĐƯỜNG_DẪN_THỰC_TẾ/mcp-google-driver/dist/index.js"],
"env": {
"CREDENTIALS_PATH": "/ĐƯỜNG_DẪN_THỰC_TẾ/mcp-google-driver/credentials.json",
"TOKEN_PATH": "/ĐƯỜNG_DẪN_THỰC_TẾ/mcp-google-driver/token.json"
}
}
}
}🖥️ Claude Desktop
Mở Claude Desktop
Vào Settings → Developer → Edit Config
Thêm cấu hình tương tự như Claude Code ở trên
Restart Claude Desktop
🎯 Ví dụ sử dụng
Sau khi cài xong, bạn có thể ra lệnh cho AI bằng ngôn ngữ tự nhiên:
📂 "Liệt kê tất cả file trong thư mục gốc Drive của tôi"
📖 "Đọc nội dung của file có ID: 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
✍️ "Tạo file text tên 'notes.txt' với nội dung 'Ghi chú quan trọng hôm nay'"
📁 "Tạo thư mục tên 'Dự án 2025' trong Drive"
🔍 "Tìm tất cả file PDF trong Drive"
🗑️ "Chuyển file ID abc123 vào thùng rác"❓ Xử lý lỗi thường gặp
Lỗi | Nguyên nhân | Giải pháp |
| Chưa đặt file credentials | Đặt |
| Chưa xác thực | Chạy |
| Token hết hạn | Chạy lại |
| Chưa bật Drive API | Bật Google Drive API trong Google Cloud Console |
Related MCP server: MCP Google Drive Server
📖 English Guide
What is MCP Google Drive?
MCP Google Drive is a server implementing the Model Context Protocol (MCP) — a standard that allows AI Assistants (Antigravity IDE, Claude Code, Claude Desktop) to read, write, search and manage files on your Google Drive directly through chat.
✨ Features
Tool | Description |
| List files/folders in any directory |
| Create a new folder |
| Read file content (supports Google Docs, Sheets, CSV, text) |
| Create a new file with content |
| Update existing file content |
| Delete file/folder (trash or permanent) |
| Search files by name, type, etc. |
📋 Prerequisites
Node.js v18 or higher
A Google Account
Antigravity IDE, Claude Code, or Claude Desktop installed
🔧 Step 1: Get Google OAuth Credentials
1.1. Go to Google Cloud Console
Sign in with your Google account
Create a new project or select an existing one
1.2. Enable Google Drive API
Navigate to "APIs & Services" → "Library"
Search for "Google Drive API"
Click the result and press "Enable"
1.3. Create OAuth 2.0 Credentials
Go to "APIs & Services" → "Credentials"
Click "+ Create Credentials" → "OAuth client ID"
If prompted to configure OAuth consent screen:
Choose "External" → "Create"
Fill in app name (any name, e.g., "My MCP Drive")
Add your email to "Test users"
Save
Back to creating credentials:
Application type: select "Desktop app"
Name: any name (e.g., "MCP Drive Desktop")
Click "Create"
Click "Download JSON" to download credentials
1.4. Save credentials file
Place the downloaded file in your project directory and rename it to credentials.json
⚠️ Important: NEVER share
credentials.jsonortoken.jsonwith anyone!
📥 Step 2: Install MCP Google Drive
# Clone repository
git clone https://github.com/mrbit-dev/mcp-google-driver.git
cd mcp-google-driver
# Install dependencies
npm install
# Build TypeScript
npm run build🔑 Step 3: Authenticate with Google Drive (First time only)
npm run authThe program will:
Display a Google OAuth link
Open that link in your browser, sign in and grant permissions
After confirmation, you'll be redirected (the page may show a connection error — that's normal)
Copy the full URL from the browser address bar and paste it into the terminal
token.jsonwill be created automatically — authentication successful!
⚙️ Step 4: Configure your AI Assistant
🤖 Antigravity IDE
Open Antigravity IDE
Go to Settings → MCP Servers
Add the following configuration:
{
"mcpServers": {
"google-drive": {
"command": "node",
"args": ["C:/PATH_TO_FOLDER/mcp-google-driver/dist/index.js"],
"env": {
"CREDENTIALS_PATH": "C:/PATH_TO_FOLDER/mcp-google-driver/credentials.json",
"TOKEN_PATH": "C:/PATH_TO_FOLDER/mcp-google-driver/token.json"
}
}
}
}💡 Replace
C:/PATH_TO_FOLDERwith the actual path on your machine.Windows example:
C:/Users/YourName/Documents/mcp-google-drivermacOS/Linux example:/home/user/mcp-google-driver
Restart Antigravity IDE
Test: Chat with AI and ask "List files in my Google Drive"
🖥️ Claude Code (CLI)
Add to your Claude Code MCP configuration file:
# Config file location:
# Windows: %APPDATA%\Claude\claude_desktop_config.json
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Linux: ~/.config/Claude/claude_desktop_config.jsonConfig content:
{
"mcpServers": {
"google-drive": {
"command": "node",
"args": ["/ACTUAL_PATH/mcp-google-driver/dist/index.js"],
"env": {
"CREDENTIALS_PATH": "/ACTUAL_PATH/mcp-google-driver/credentials.json",
"TOKEN_PATH": "/ACTUAL_PATH/mcp-google-driver/token.json"
}
}
}
}🖥️ Claude Desktop
Open Claude Desktop
Go to Settings → Developer → Edit Config
Add the same configuration as Claude Code above
Restart Claude Desktop
❓ Common Error Troubleshooting
Error | Cause | Solution |
| Credentials file missing | Place |
| Not authenticated yet | Run |
| Token has expired | Run |
| Drive API not enabled | Enable Google Drive API in Google Cloud Console |
🛡️ Security / Bảo mật
credentials.jsonvàtoken.jsonkhông được commit lên Git (đã có trong.gitignore)Chỉ cấp quyền tối thiểu cần thiết cho Google Drive API
Token được tự động làm mới khi hết hạn
📄 License
MIT License — Xem file LICENSE để biết thêm chi tiết.
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
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/mrbit-dev/mcp-google-driver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server