Custom Google Drive MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| USER_GOOGLE_EMAIL | No | Google email for single-user mode (stdio). | |
| MCP_ENABLE_OAUTH21 | No | Enable OAuth 2.1 mode (true/false). | true |
| WORKSPACE_MCP_HOST | No | Host IP for HTTP transport, default 0.0.0.0. | 0.0.0.0 |
| WORKSPACE_MCP_PORT | No | Port for HTTP transport, default 8000. | 8000 |
| MCP_SINGLE_USER_MODE | No | Enable single-user mode (1/0). | |
| GOOGLE_OAUTH_CLIENT_ID | No | Google OAuth client ID from GCP console. | |
| WORKSPACE_EXTERNAL_URL | No | External URL for ngrok or Railway (e.g., https://<service>.up.railway.app). | |
| WORKSPACE_MCP_TRANSPORT | No | Transport type: 'streamable-http' (default) or omit for stdio. | streamable-http |
| GOOGLE_OAUTH_REDIRECT_URI | No | OAuth redirect URI, typically http://localhost:8000/oauth2callback. | |
| GOOGLE_OAUTH_CLIENT_SECRET | No | Google OAuth client secret from GCP console. | |
| DOWNLOAD_FILE_CONTENT_MAX_MB | No | Max file size in MB for download_file_content, default 25. | 25 |
| WORKSPACE_MCP_STATELESS_MODE | No | Run in stateless mode (true/false). | true |
| WORKSPACE_MCP_CREDENTIALS_DIR | No | Directory to persist credentials for stdio mode. | ./store_creds |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_google_authA | Manually initiate Google OAuth authentication flow. NOTE: This is a legacy OAuth 2.0 tool and is disabled when OAuth 2.1 is enabled. The authentication system automatically handles credential checks and prompts for authentication when needed. Only use this tool if:
In most cases, simply try calling the Google Workspace tool you need - it will automatically handle authentication if required. |
| search_filesB | Searches for files and folders within a user's Google Drive, including shared drives. |
| list_recent_filesA | Lists the user's most recently modified files in Google Drive (across all drives the user has access to). Excludes trashed items. |
| get_file_metadataB | Returns metadata for a single Google Drive file by ID. |
| read_file_contentA | Retrieves the content of a specific Google Drive file by ID, supporting files in shared drives. • Native Google Docs, Sheets, Slides → exported as text / CSV. • Office files (.docx, .xlsx, .pptx) → unzipped & parsed with std-lib to extract readable text. • PDFs → text extracted with pypdf when possible; scanned/image-only PDFs fall back to a download hint. • Images → returned as base64 with MIME metadata for multimodal clients. • Any other file → downloaded; tries UTF-8 decode, else notes binary. |
| download_file_contentA | Downloads a Google Drive file and returns its raw bytes as a base64-encoded blob. For Google native files (Docs, Sheets, Slides), exports to a useful format:
For other files, downloads the original file format. Size limit: DOWNLOAD_FILE_CONTENT_MAX_MB env var (default 25 MB). Files larger than the limit return an error pointing to read_file_content for text extraction, or a Drive shareable link as a fallback. |
| list_drive_itemsA | Lists files/folders or shared drive containers, supporting shared drives.
If |
| create_drive_folderA | Creates a new folder in Google Drive, supporting creation within shared drives. |
| create_fileA | Creates a new file in Google Drive, supporting creation within shared drives. Accepts either direct content or a fileUrl to fetch the content from. |
| create_resumable_upload_sessionA | Creates a Google Drive resumable upload session and returns the upload URL. The caller (e.g. a skill running in claude.ai's sandbox) uses the returned
|
| import_to_google_docA | Imports a file (Markdown, DOCX, TXT, HTML, RTF, ODT) into Google Docs format with automatic conversion. Google Drive automatically converts the source file to native Google Docs format, preserving formatting like headings, lists, bold, italic, etc. For batch operations, prefer file_path for files on disk so callers do not need to load full file contents into their context. |
| get_drive_file_permissionsB | Gets detailed metadata about a Google Drive file including sharing permissions. |
| check_drive_file_public_accessA | Searches for a file by name and checks if it has public link sharing enabled. |
| update_drive_fileB | Updates metadata and properties of a Google Drive file. |
| get_drive_shareable_linkB | Gets the shareable link for a Google Drive file or folder. |
| manage_drive_accessA | Consolidated tool for managing Google Drive file and folder access permissions. Supports granting, batch-granting, updating, revoking permissions, and transferring file ownership -- all through a single entry point. |
| copy_drive_fileA | Creates a copy of an existing Google Drive file. This tool copies the template document to a new location with an optional new name. The copy maintains all formatting and content from the original file. |
| set_drive_file_permissionsA | Sets file-level sharing settings and controls link sharing for a Google Drive file or folder. This is a high-level tool for the most common permission changes. Use this to toggle "anyone with the link" access or configure file-level sharing behavior. For managing individual user/group permissions, use share_drive_file or update_drive_permission instead. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/YatharthLakhera/claude-gdrive-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server