Skip to main content
Glama
mcp-google-drive

mcp-google-drive

by Longtran2404

MCP Google Drive

Official open-source package in the TaskKit ecosystem, maintained by TrαΊ§n Minh Long. It provides an MCP server for Google Drive file search, management, sharing, and content operations.

TaskKit open-source catalog Β· npm Β· GitHub

✨ Features

  • File Management: Create, read, update, delete files and folders

  • Search & Discovery: Advanced search with multiple criteria

  • Sharing & Permissions: Manage file sharing and access control

  • Content Operations: Upload, download, and modify file content

  • Drive Operations: List drives, manage shared drives

  • Type Safety: Full TypeScript support with Zod validation

  • Error Handling: Comprehensive error handling and logging

Related MCP server: Google Drive MCP Server

πŸš€ Quick Setup

Prerequisites

  • Node.js 20+

  • Google Service Account with Drive API enabled

  • Service Account JSON key file

Installation

npm install mcp-google-drive

Environment Setup

Set your Google Service Account credentials:

export GOOGLE_SERVICE_ACCOUNT_KEY='{"type":"service_account",...}'

πŸ”§ Cursor MCP Integration

Automatic Integration

The MCP server is designed to work seamlessly with Cursor. Add this configuration to your ~/.cursor/mcp.json:

{
  "mcpServers": {
    "mcp-google-drive": {
      "command": "npx",
      "args": ["mcp-google-drive@latest"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_KEY": "your-service-account-json",
        "MCP_MODE": "stdio",
        "LOG_LEVEL": "info",
        "DISABLE_CONSOLE_OUTPUT": "false"
      },
      "cwd": "/path/to/your/project"
    }
  }
}

Troubleshooting Cursor Integration

If MCP tools are not working in Cursor:

  1. Restart Cursor after updating mcp.json

  2. Check MCP Status: Command Palette β†’ "MCP: Show Servers"

  3. Verify Connection: Command Palette β†’ "MCP: Test Connection"

  4. Check Logs: Look for MCP server startup messages

Manual Server Start

If automatic integration fails, you can start the server manually:

# In your project directory
npm run start

# Or globally
npx mcp-google-drive

πŸ› οΈ Available Tools

File Operations

  • search_files - Search files with advanced criteria

  • get_file - Get file metadata and content

  • create_file - Create new files and folders

  • update_file - Update file content and metadata

  • delete_file - Delete files and folders

  • copy_file - Copy files to new locations

  • move_file - Move files between folders

Drive Management

  • get_drive_info - Get drive information

  • list_shared_drives - List available shared drives

Sharing & Permissions

  • get_file_permissions - Get file sharing settings

  • share_file - Share files with users

  • get_file_revisions - Get file version history

πŸ“š Documentation

πŸ§ͺ Development

Build

npm run build

Development Mode

npm run dev

Linting

npm run lint
npm run lint:fix

πŸ“„ License

MIT License - see LICENSE for details.

🀝 Contributing

Contributions welcome! Please read our contributing guidelines and submit pull requests.

Release validation runs on Node.js 20 and 22. npm publication is performed manually from a maintainer-controlled authenticated session so that account and 2FA checks remain under the publisher's control.

πŸ“ž Support

Available Tools

15 tools
copy_fileC

Copy a file to a new location

Inputs: fileId (required), name, parentId.

create_fileB

Create a new file in Google Drive

Inputs: name (required), mimeType (required), content (required), parentId, +1 more.

create_folderC

Create a new folder in Google Drive

Inputs: name (required), parentId, description.

delete_fileC

Delete a file from Google Drive

Inputs: fileId (required), permanent.

get_drive_infoC

Get information about a drive

Inputs: driveId.

get_fileA

Get file metadata and optionally content

Inputs: fileId (required), includeContent, includePermissions.

get_file_contentC

Get file content in various formats

Inputs: fileId (required), mimeType, encoding.

get_file_permissionsC

Get permissions for a file

Inputs: fileId (required).

get_file_revisionsC

Get revision history of a file

Inputs: fileId (required), maxResults.

list_filesB

List files in Google Drive with optional filtering

Inputs: pageSize, pageToken, orderBy, q, +2 more.

list_shared_drivesB

List all shared drives

Inputs: pageSize, pageToken.

move_fileC

Move a file to a new location

Inputs: fileId (required), parentId (required), removeFromParents.

search_filesC

Search for files in Google Drive using Google's search syntax

Inputs: query (required), maxResults, fileType, orderBy, +1 more.

share_fileB

Share a file with another user

Inputs: fileId (required), email (required), role (required), message.

update_fileC

Update an existing file in Google Drive

Inputs: fileId (required), name, description, content.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but get_file and get_file_content overlap somewhat, as do list_files and search_files. Descriptions help differentiate them.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., create_file, list_files, delete_file), with no exceptions.

    Tool Count5/5

    15 tools is well-scoped for a Google Drive server, covering file operations, folders, sharing, permissions, and search without being excessive.

    Completeness4/5

    Core CRUD, sharing, permissions, and search are covered. Missing features like trash or copy folder are minor gaps that do not hinder typical workflows.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers