Skip to content
MCP server

Google Drive

Search, browse, move, upload and share files in Google Drive from an MCP client

Google Drive is an open-source MCP server for files and documents. It can run locally on your machine or as a hosted remote server.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally or Remotely
What it can do
Can change data (4 tools)
Version
2.6.2

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add mcp-drive --env GOOGLE_CLIENT_ID='<GOOGLE_CLIENT_ID>' --env GOOGLE_CLIENT_SECRET='<GOOGLE_CLIENT_SECRET>' -- npx -y @mcp-z/mcp-drive

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "mcp-drive": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-drive"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-drive": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-drive"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-drive": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-drive"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "mcp-drive": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-drive"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add mcp-drive --env GOOGLE_CLIENT_ID='<GOOGLE_CLIENT_ID>' --env GOOGLE_CLIENT_SECRET='<GOOGLE_CLIENT_SECRET>' -- npx -y @mcp-z/mcp-drive

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.mcp-drive]
command = "npx"
args = ["-y", "@mcp-z/mcp-drive"]
env = { GOOGLE_CLIENT_ID = "<GOOGLE_CLIENT_ID>", GOOGLE_CLIENT_SECRET = "<GOOGLE_CLIENT_SECRET>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-drive": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-drive"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e GOOGLE_CLIENT_ID='<GOOGLE_CLIENT_ID>' -e GOOGLE_CLIENT_SECRET='<GOOGLE_CLIENT_SECRET>' mcp-drive npx -- -y @mcp-z/mcp-drive

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "mcp-drive": {
          "command": "npx",
          "args": [
            "-y",
            "@mcp-z/mcp-drive"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
            "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • GOOGLE_CLIENT_IDGoogle OAuth client ID (required for OAuth authentication modes)Required
  • GOOGLE_CLIENT_SECRETGoogle OAuth client secret (optional for public clients)
  • GOOGLE_SERVICE_ACCOUNT_KEY_FILEPath to service account JSON key file (required for service-account auth mode)
  • AUTH_MODEAuthentication mode
  • HEADLESSDisable browser auto-open, return auth URL instead (true/false)
  • REDIRECT_URIOAuth redirect URI (optional, default: ephemeral loopback)
  • RESOURCE_STORE_URIResource store URI for exported files (file://). Default: .mcp-z/mcp-drive/files beside the nearest .mcp.json, else ~/.mcp-z/mcp-drive/files
  • PORTHTTP server port (overrides --port)
  • BASE_URLBase URL for HTTP transport (used for OAuth/DCR endpoints and file links)
  • LOG_LEVELLogging level
  • GOOGLE_CLIENT_IDGoogle OAuth client ID (required for OAuth authentication modes)Required
  • GOOGLE_CLIENT_SECRETGoogle OAuth client secret (optional for public clients)
  • GOOGLE_SERVICE_ACCOUNT_KEY_FILEPath to service account JSON key file (required for service-account auth mode)
  • AUTH_MODEAuthentication mode
  • HEADLESSDisable browser auto-open, return auth URL instead (true/false)
  • REDIRECT_URIOAuth redirect URI (optional, default: ephemeral loopback)
  • DCR_STORE_URIDCR client storage URI (for self-hosted DCR mode)
  • RESOURCE_STORE_URIResource store URI for exported files (file://). Default: .mcp-z/mcp-drive/files beside the nearest .mcp.json, else ~/.mcp-z/mcp-drive/files
  • PORTHTTP server port (overrides --port)
  • BASE_URLBase URL for HTTP transport (used for OAuth/DCR endpoints and file links)
  • LOG_LEVELLogging level

About Google Drive

This server from the mcp-z project gives an assistant file operations on Google Drive: searching files and folders, browsing folder contents and paths, creating folders, moving or trashing items, and uploading from a local path or URL. It also ships a file resource and two prompts, one for organising files and one explaining query syntax.

It runs over stdio or HTTP and serves both the 2025 and 2026-07-28 protocol revisions from the same process. You supply Google credentials by creating your own Google Cloud OAuth app with the Drive API enabled, or a service account key file. OAuth tokens are stored on disk by default under ~/.mcp-z/ with other storage backends possible.

Node 20 or newer is required.

Tools this server provides (8)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 4 of 8 tools change data; 2 names don't say.

From the server's own tool labels and tool names; not verified by us.

files-searchName suggests: reads
Search files
folder-contents
List folder contents
folder-createName suggests: changes
Create a folder
folder-path
Resolve a folder path
folder-searchName suggests: reads
Search folders
file-moveName suggests: changes
Move a file
file-move-to-trashName suggests: changes
Trash a file
file-uploadName suggests: changes
Upload a file

What it does

File search
Search files and folders.
Folder browsing
List contents and resolve paths.
Move and trash
Reorganise or remove items.
Uploads
Upload from a local path or URL.
Two transports
Run over stdio or HTTP.
Flexible auth
OAuth app or service account.

Good for

  • Find a document by query
  • Tidy a messy folder
  • Upload a file from a URL
  • Trash outdated files

Pricing

Open source

Free to run; Google Cloud project required.

Google Drive FAQ

What credentials are needed?

A Google OAuth client ID, or a service account key file.

Which transports?

stdio and streamable HTTP.

Where are tokens kept?

By default under ~/.mcp-z/ via a file store.

Is Google Drive free?

Yes. Google Drive is open source, so you can use and self-host it for free.

How do I add Google Drive to Claude Code?

Run this command in your terminal: claude mcp add mcp-drive --env GOOGLE_CLIENT_ID='<GOOGLE_CLIENT_ID>' --env GOOGLE_CLIENT_SECRET='<GOOGLE_CLIENT_SECRET>' -- npx -y @mcp-z/mcp-drive

What are the best alternatives to Google Drive?

The closest alternatives to Google Drive are Scholar Sidekick, Stashpad, loremfile, Excel-AI-ze and SSRS2.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers