Skip to main content
Glama
YatharthLakhera

Custom Google Drive MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
USER_GOOGLE_EMAILNoGoogle email for single-user mode (stdio).
MCP_ENABLE_OAUTH21NoEnable OAuth 2.1 mode (true/false).true
WORKSPACE_MCP_HOSTNoHost IP for HTTP transport, default 0.0.0.0.0.0.0.0
WORKSPACE_MCP_PORTNoPort for HTTP transport, default 8000.8000
MCP_SINGLE_USER_MODENoEnable single-user mode (1/0).
GOOGLE_OAUTH_CLIENT_IDNoGoogle OAuth client ID from GCP console.
WORKSPACE_EXTERNAL_URLNoExternal URL for ngrok or Railway (e.g., https://<service>.up.railway.app).
WORKSPACE_MCP_TRANSPORTNoTransport type: 'streamable-http' (default) or omit for stdio.streamable-http
GOOGLE_OAUTH_REDIRECT_URINoOAuth redirect URI, typically http://localhost:8000/oauth2callback.
GOOGLE_OAUTH_CLIENT_SECRETNoGoogle OAuth client secret from GCP console.
DOWNLOAD_FILE_CONTENT_MAX_MBNoMax file size in MB for download_file_content, default 25.25
WORKSPACE_MCP_STATELESS_MODENoRun in stateless mode (true/false).true
WORKSPACE_MCP_CREDENTIALS_DIRNoDirectory to persist credentials for stdio mode../store_creds

Capabilities

Features and capabilities supported by this server

CapabilityDetails
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

NameDescription
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:

  1. You need to re-authenticate with different credentials

  2. You want to proactively authenticate before using other tools

  3. The automatic authentication flow failed and you need to retry

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:

  • Google Docs -> PDF (default) or DOCX if export_format='docx'

  • Google Sheets -> XLSX (default), PDF if export_format='pdf', or CSV if export_format='csv'

  • Google Slides -> PDF (default) or PPTX if export_format='pptx'

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 drive_id is specified, lists items within that shared drive. folder_id is then relative to that drive (or use drive_id as folder_id for root). If drive_id is not specified, lists items from user's "My Drive" and accessible shared drives (if include_items_from_all_drives is True). Set resource_type to "shared_drives" to list shared drive containers instead of folder contents.

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 upload_url to PUT raw file bytes directly to Google — bypassing MCP transport limits on large content arguments. Only the short URL travels through MCP; the bytes go straight from the sandbox to Google.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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