Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables Claude to read, create, update, and manage files in Google Drive through MCP tools.

README.md

Google Drive MCP Server

Connect Google Drive to Claude Code with a simple double-click setup. This MCP server allows Claude to read, create, update, and manage files in your Google Drive.

Prerequisites

  • Python 3.10 or higher
  • A Google Account (personal or Google Workspace)
  • Google Cloud Console access

Step 1: Create Google Cloud Credentials

1.1 Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click the project dropdown at the top of the page
  3. Click New Project
  4. Enter a project name (e.g., "Google Drive MCP")
  5. Click Create
  6. Wait for the project to be created, then select it

1.2 Enable the Google Drive API

  1. In the Google Cloud Console, go to APIs & Services > Library
  2. Search for "Google Drive API"
  3. Click on Google Drive API
  4. Click Enable

1.3 Configure OAuth Consent Screen

  1. Go to APIs & Services > OAuth consent screen
  2. Select External (or Internal if using Google Workspace)
  3. Click Create
  4. Fill in the required fields:
  • App name: Google Drive MCP
  • User support email: Your email
  • Developer contact email: Your email
  1. Click Save and Continue
  2. On the Scopes page, click Add or Remove Scopes
  3. Add these scopes:
  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive
  1. Click Update, then Save and Continue
  2. On the Test users page, click Add Users
  3. Add your email address
  4. Click Save and Continue

1.4 Create OAuth Client ID

  1. Go to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. Select Desktop app as the application type
  4. Enter a name (e.g., "Google Drive MCP Desktop")
  5. Click Create
  6. Click Download JSON on the popup
  7. Rename the downloaded file to credentials.json
  8. Place credentials.json in the project root directory

Important: The credentials must be of type "Desktop app", not "Web application".

Step 2: Install Dependencies

Option A: Using Virtual Environment (Recommended)

# Clone the repository
git clone https://github.com/david-valdivia/GoogleDriveMCP.git
cd GoogleDriveMCP

# Create virtual environment (Python 3.10+ required)
python3 -m venv .venv

# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Option B: Global Installation

pip install -r requirements.txt

Step 3: Run the Setup GUI

# With virtual environment activated
python -m src.main

This opens the setup window where you can:

  1. Select your permission level (Read Only, Read + Create, or Full Access)
  2. Click "Connect to Google" to authenticate
  3. Complete the OAuth flow in your browser
  4. Click "Configure MCP" to select a project directory for Claude Code

Step 4: Build the Executable (Optional)

Build a standalone executable that doesn't require Python:

# With virtual environment activated
python build/build.py

Build Output

| Platform | Output | |----------|--------| | macOS | build/dist/Google Drive MCP.app and build/dist/googledrive-mcp | | Windows | build/dist/googledrive-mcp.exe | | Linux | build/dist/googledrive-mcp |

macOS Additional Requirements

If building on macOS, you need Tcl/Tk for the GUI:

# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Python with Tcl/Tk support
brew install python-tk@3.12

Step 5: Configure Claude Code

After authentication, the app automatically creates a .mcp.json file in your selected project directory. Alternatively, create it manually:

{
  "mcpServers": {
    "googledrive": {
      "command": "/path/to/googledrive-mcp",
      "args": ["--serve"]
    }
  }
}

Replace /path/to/googledrive-mcp with:

  • Built executable: Full path to googledrive-mcp or googledrive-mcp.exe
  • From source: Full path to Python and script, e.g.:
  {
    "mcpServers": {
      "googledrive": {
        "command": "/path/to/.venv/bin/python",
        "args": ["/path/to/GoogleDriveMCP/src/main.py", "--serve"]
      }
    }
  }

Permission Levels

| Level | Scopes | Capabilities | |-------|--------|--------------| | Read Only | drive.readonly | View and search files | | Read + Create | drive.file | Above + create new files | | Full Access | drive | Read, create, update, delete, share |

Available MCP Tools

| Tool | Description | Required Permission | |------|-------------|---------------------| | list_files | List files in a folder or root | Read Only | | read_file | Read file contents (exports Google Docs to text) | Read Only | | search_files | Full-text search across Drive | Read Only | | list_folders | List all folders for navigation | Read Only | | get_sharing_info | View who has access to a file | Read Only | | create_file | Create a new file or Google Doc | Read + Create | | create_folder | Create a new folder | Read + Create | | update_file | Update file contents | Full Access | | delete_file | Move file to trash | Full Access | | move_file | Move file to different folder | Full Access | | copy_file | Copy a file | Full Access | | share_file | Share file with email address | Full Access |

Development

Run Tests

# With virtual environment activated
pytest -v

Project Structure

GoogleDriveMCP/
├── src/
│   ├── main.py          # Entry point, mode detection
│   ├── gui.py           # Setup GUI with tkinter
│   ├── server.py        # MCP server implementation
│   ├── drive.py         # Google Drive API wrapper
│   ├── auth.py          # OAuth flow and token management
│   └── config.py        # Platform-specific config paths
├── tests/               # Test files
├── build/
│   ├── build.py         # Build script
│   └── googledrive-mcp.spec  # PyInstaller spec
├── credentials.json     # Your OAuth credentials (not committed)
├── requirements.txt     # Python dependencies
└── README.md

Token Storage Location

Tokens are stored in platform-specific locations:

| Platform | Location | |----------|----------| | macOS | ~/Library/Application Support/GoogleDriveMCP/ | | Windows | %APPDATA%\GoogleDriveMCP\ | | Linux | ~/.config/GoogleDriveMCP/ |

Troubleshooting

"credentials.json not found"

Make sure credentials.json is in the project root directory (same folder as src/).

"Error 400: redirect_uri_mismatch"

Your OAuth credentials are configured as "Web application" instead of "Desktop app". Create new credentials with type "Desktop app".

"Access blocked: This app's request is invalid"

  1. Make sure you added yourself as a test user in the OAuth consent screen
  2. Verify the app is in "Testing" mode (not "In production")

"ModuleNotFoundError: No module named 'tkinter'"

On macOS with Homebrew Python: ``bash brew install python-tk@3.12 ``

On Ubuntu/Debian: ``bash sudo apt-get install python3-tk ``

MCP server not connecting in Claude Code

  1. Verify the path in .mcp.json is correct and absolute
  2. Restart Claude Code after creating/modifying .mcp.json
  3. Check that the executable has execute permissions: chmod +x googledrive-mcp

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.