Google Drive MCP Server

✓ verified

Search and read files from Google Drive.

Don't have ToolPiper? We'll take you to the download.

Open repository →

Publisher

Anthropic Reference (archived)

License

MIT

Transport

Local subprocess

Tools

2

What this server does

Read-only by design. Two affordances: a `search` tool that takes a query string and returns matching files (name plus MIME type), and a `gdrive:///<file_id>` resource pattern the host can read to fetch contents. Google Workspace formats are auto-exported on read: Docs become Markdown, Sheets become CSV, Slides become plain text, Drawings become PNG. Other files come back in their native format. Setup is the heavy part. You need a Google Cloud project, the Drive API enabled, an OAuth consent screen, a Desktop OAuth client, the keys downloaded as `gcp-oauth.keys.json`, and a first-run `node ./dist auth` to walk through the browser flow. Credentials land in `.gdrive-server-credentials.json` and the server reads from there on subsequent runs. The Docker path mounts the same files into the container. Required OAuth scope is `https://www.googleapis.com/auth/drive.readonly`. That is enough for everything the server does and the worst-case blast radius is bounded to reading whatever your Drive account can read. The scope cannot be elevated without re-running auth. What you trade for that read-only guarantee: no creating files, no moving them, no permissions changes, no comments. For write workflows you need community alternatives such as isaacphi/mcp-gdrive, which extends the surface but at the cost of broader OAuth scopes.

Tools included

  • search

    Search files by name and content.

  • gdrive_read_file

    Read a file by Drive ID.

The authoritative list comes from the server's tools/list at runtime. This catalog entry may lag the upstream until the next ToolPiper release.

Install in ToolPiper

ToolPiper handles the JSON configuration. Click Install, fill in any required tokens, and the server is ready in your chat.

Don't have ToolPiper? We'll take you to the download.

Install in another client

Install in another MCP client (Claude Desktop, Cursor, Continue, Cline)

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json.

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gdrive"
      ]
    }
  }
}

Example prompts

  • "Find the Q4 planning doc in my Drive and summarize it."

  • "Search for spreadsheets named 'budget' modified in the last month."

  • "Open gdrive:///1abc...xyz and pull out every action item."

  • "Look up the Drive ID 1xyz and tell me when it was last edited."

Security notes

OAuth credentials are saved to disk in `.gdrive-server-credentials.json`. That file holds a long-lived refresh token; anyone with that file can impersonate your Google account against Drive within the read-only scope. Protect it like a password and revoke at myaccount.google.com/permissions if it leaks. The scope is bounded to read-only and cannot be elevated without re-running the auth flow, so an attacker cannot edit or share your files. They can read whatever your account can read, which is often a lot. The upstream Anthropic reference is archived; community-maintained alternatives include isaacphi/mcp-gdrive when you need write operations.

Related tools