# Google Drive

> Google Drive is an open-source MCP server for files and documents. Search, browse, move, upload and share files in Google Drive from an MCP client. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/mcp-z/mcp-drive
- **MCP Registry name:** io.github.mcp-z/mcp-drive
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

```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 Desktop (claude_desktop_config.json)

```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.

### Cursor (~/.cursor/mcp.json)

```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.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
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
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```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>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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.

### Devin Desktop (~/.config/devin/mcp_config.json)

```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.

### Cline (cline_mcp_settings.json)

```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.

### Zed (Zed settings.json)

```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.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```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>"
      }
    }
  }
}
```

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```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.

### Kiro (~/.kiro/settings/mcp.json)

```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.

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

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-search` (name suggests: reads): Search files
- `folder-contents`: List folder contents
- `folder-create` (name suggests: changes): Create a folder
- `folder-path`: Resolve a folder path
- `folder-search` (name suggests: reads): Search folders
- `file-move` (name suggests: changes): Move a file
- `file-move-to-trash` (name suggests: changes): Trash a file
- `file-upload` (name suggests: changes): Upload a file

## 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.

## Alternatives

- [Scholar Sidekick](https://ai-powered.com/mcp/scholar-sidekick): Scholar Sidekick is a freemium MCP server for education and exams.
- [Stashpad](https://ai-powered.com/mcp/stashpad): Stashpad is an open-source MCP server for files and documents.
- [loremfile](https://ai-powered.com/mcp/loremfile): loremfile is a free MCP server for developer tools.
- [Excel-AI-ze](https://ai-powered.com/mcp/excel-ai-ze): Excel-AI-ze is an MCP server for files and documents.
- [SSRS2](https://ai-powered.com/mcp/ssrs2): SSRS2 is an MCP server for files and documents.
- [axross headless MCP](https://ai-powered.com/mcp/axross-headless-mcp): axross headless MCP is an open-source MCP server for cloud and infrastructure.
- [PlainByte Shopify Variant Metafields CSV Validator](https://ai-powered.com/mcp/plainbyte-shopify-variant-metafields-csv-validator): PlainByte Shopify Variant Metafields CSV Validator is a paid MCP server for files and documents.
- [Merrowick Tools](https://ai-powered.com/mcp/merrowick-tools): Merrowick Tools is an MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/google-drive-3
