Google Drive MCP Server

Official

Search and read your Drive — Docs, Sheets and files become context your assistant can actually use.

Local serverstdioTypeScriptMIT 63.0k

What is the Google Drive MCP server?

Most organisational knowledge lives in somebody's Drive, in a folder structure nobody fully remembers. The Google Drive MCP server makes that searchable and readable from your assistant: query across your files, open the hits, and work with their contents — with Google's native formats converted automatically (Docs to markdown, Sheets to CSV) so the model gets clean text rather than proprietary blobs.

The pattern it unlocks is "answer from our documents." Point a question at your Drive — what did we decide about pricing in last quarter's planning doc? what's in the onboarding checklist? — and the assistant searches, reads the relevant files and answers with the actual content in context. For meeting-notes archaeology and policy lookups, that beats fifteen minutes of manual Drive searching every time.

Setup is the honest cost of entry. This is a Google Workspace integration, so you'll create a Google Cloud project, enable the Drive API, configure an OAuth consent screen and complete a browser auth flow the first time. None of it is hard, but it's fifteen minutes of console-clicking that the one-line installs in this directory don't need. The token refreshes itself afterwards.

Access is read-only in the reference implementation — search and read, no writing or sharing changes — which is the right default for pointing an AI at a corpus of company documents. Like its reference siblings it's now archived (community forks add Sheets editing and broader Workspace coverage if you need writes), but for the core "let my assistant read our Drive" job, it remains the straightforward answer.

Before you run the auth flow

  • Run the package's auth command on its own once. It opens a browser and writes the credentials JSON that GDRIVE_CREDENTIALS_PATH points at; skip it and you'll be debugging a startup crash instead.
  • An OAuth consent screen left in Testing mode issues refresh tokens that expire after a week. Publishing the app, or using Internal on a Workspace account, is what ends the weekly re-auth ritual.
  • The flow requests read-only Drive scope, and Workspace admins can block unapproved apps outright — worth checking with whoever owns the domain before assuming you misconfigured something.
  • Docs, Sheets and Slides convert cleanly, but a PDF or scanned image arrives as an opaque blob rather than text. Those still need a separate extraction step.

What you can do with it

Answer from company docs

Questions answered with the actual contents of planning docs, specs and notes.

Meeting-notes archaeology

"What did we decide about X?" resolved from months of scattered documents.

Spreadsheet quick-reads

Sheets arrive as CSV, ready for summarising or analysis.

Available tools

ToolWhat it does
searchFull-text search across your Drive files
gdrive_read_fileRead a file's contents, auto-converting Google formats (Docs→markdown, Sheets→CSV)

How to install the Google Drive MCP server

{
  "mcpServers": {
    "gdrive": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-gdrive"],
      "env": {
        "GDRIVE_CREDENTIALS_PATH": "/path/to/.gdrive-server-credentials.json"
      }
    }
  }
}

Requires a one-time OAuth setup: create a Google Cloud project, enable the Drive API, download OAuth keys, then run the server's auth command.

Configuration

A Google account, a Google Cloud project with the Drive API enabled, and a one-time browser OAuth flow.

VariableDescriptionRequired
GDRIVE_CREDENTIALS_PATHPath to the saved OAuth credentials produced by the auth flowYes
GDRIVE_OAUTH_PATHPath to the OAuth client keys JSON downloaded from Google CloudOptional

Example prompts to try

  • Search my Drive for the Q3 planning doc and summarise the decisions in it.
  • Find every doc mentioning the Acme contract and give me a timeline of what was agreed.
  • Read the budget spreadsheet and tell me which line items grew the most this year.

Frequently asked questions

Google requires OAuth apps to be registered, so you create a (free) Cloud project, enable the Drive API and generate OAuth keys once. After the first browser sign-in, the saved token refreshes automatically.