Google Drive MCP Server for managing files and folders via the Model Context Protocol
Project description
Google Drive MCP Server
An MCP server for managing files and folders in Google Drive, integrating seamlessly with AI assistants using the Model Context Protocol.
Features
- List Files/Folders: Search and list files with advanced query support.
- Get Metadata: Retrieve detailed information about specific files or folders.
- Manage Folders: Create new folders and organize content.
- Organize Content: Move, copy, and delete (or trash) files.
- Trash Management: List trashed items and restore by file ID or name.
- Export: Export Google Docs, Sheets, and Slides to formats like PDF or DOCX.
Installation
Prerequisites
- Python 3.9 or higher.
- A Google Cloud Project with the Drive API enabled.
- OAuth2 credentials (Client ID and Client Secret).
Local Setup
-
Install dependencies:
pip install -e .
-
Run the server:
python main.py --access-token <TOKEN> --refresh-token <REFRESH_TOKEN> --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET>
Configuration
Add the following to your MCP host configuration (e.g., mcp-config.json):
{
"mcpServers": {
"barie-google-drive-mcp": {
"command": "uvx",
"args": [
"barie-google-drive-mcp",
"--access-token",
"YOUR_ACCESS_TOKEN",
"--refresh-token",
"YOUR_REFRESH_TOKEN",
"--client-id",
"YOUR_CLIENT_ID",
"--client-secret",
"YOUR_CLIENT_SECRET"
]
}
}
}
Tools
list_files: Search and list files.get_file_metadata: Get file details.create_folder: Create a new folder.delete_file: Delete or trash a file.move_file: Move a file to a new folder.copy_file: Copy a file.export_file: Export Google Workspace files (currently returns status metadata only).list_trashed_files: List files/folders currently in trash.restore_file: Restore trashed files/folders byfileIdorname.
Restore Tool Behavior
restore_file supports two modes:
- Restore by ID:
{ "fileId": "FILE_ID" }
- Restore by name:
{
"name": "report",
"exactMatch": false,
"restoreAllMatches": false
}
Notes:
- Provide either
fileIdorname. - When restoring by name and multiple files match, only the first is restored unless
restoreAllMatchesistrue.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file barie_google_drive_mcp-0.1.3.tar.gz.
File metadata
- Download URL: barie_google_drive_mcp-0.1.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a84c17b77c56ea29fa3fce52ddbd80c3e593744ab05d9fd43f7f1409b94b32fe
|
|
| MD5 |
66f537d76cf2702d180e6149d2b8dd91
|
|
| BLAKE2b-256 |
a4a74c695a0e90c3be521d826395232dd7b1f6623fd35686af46a952da5c3777
|
File details
Details for the file barie_google_drive_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: barie_google_drive_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7fb1f0dbe286f2b839df329a22865a6ec53d7987b8d9b590f24f30f940ae70e
|
|
| MD5 |
269bb2ba1bfa3cbb60d195469ea4359c
|
|
| BLAKE2b-256 |
4fdf9cce3d49d54ed4aebcfe0ea4db18b80afa9f6a0ead9fc488fdb4ce0b50ef
|