Agentbrisk
productivity TypeScript

Google Drive MCP Server

Let AI agents browse, search, and read files in your Google Drive through a standard MCP interface


The Google Drive MCP server connects AI agents to your Google Drive through the Model Context Protocol, exposing tools for listing files, reading document contents, and searching across your Drive. Auth runs through OAuth 2.0 with a Google Cloud project you configure. The original Anthropic reference implementation has been archived; the community-maintained isaacphi/mcp-gdrive fork is the most credible active option as of 2026.

Most of the time when I point an AI agent at documents, I'm copy-pasting content into the conversation. The Google Drive MCP server changes that: the agent can search your Drive, navigate folders, and pull document content without you fetching anything manually. It is one of the more useful productivity MCP servers once you get past the Google Cloud setup, which is admittedly the friction point.

What the server does

The Google Drive MCP server exposes tools that map closely to what you do in the Drive UI. In practice, the three operations that matter are search, list, and read.

Search queries your Drive using Google's full-text search. You pass a query string and get back matching files with their IDs, names, MIME types, and modification dates. The search engine is the same one behind the Drive search bar, so it handles partial matches, finds content inside documents (not just file names), and supports Drive query syntax like mimeType='application/vnd.google-apps.document' or 'folder-id' in parents.

List lets the agent enumerate files in a specific folder. Given a folder ID, it returns the directory contents in the same metadata format as search results. This is how the agent builds a picture of your Drive structure when search alone is not enough.

Read fetches the content of a file. For Google Docs, Sheets, and Slides, the server hits the Drive export endpoint and returns the content as plain text. For PDFs, it returns the text layer if one exists. For binary files like images, the server can return base64-encoded content, though most workflows do not need that.

The combination of these three tools means an agent can navigate from a broad search to a specific document, read it, and use the content in reasoning. The workflow is genuinely useful for things like "find the Q4 planning doc and tell me what the headcount targets were."

The archived reference implementation

I want to be upfront about the history here. Anthropic originally shipped a Google Drive server as part of the modelcontextprotocol/servers monorepo. That repo was archived in May 2025 when Anthropic reorganized how they maintain MCP reference code. The archived code still works, but it is not receiving bug fixes or dependency updates.

The community fork at isaacphi/mcp-gdrive picks up where the reference implementation left off. It maintains the same OAuth setup approach, keeps the TypeScript implementation clean, and has seen more recent activity. This is the version I'd recommend for new setups.

Google itself has not published an official MCP server. If that changes, it will likely appear in the MCP server registry, but for now the community route is the only credible path.

Setup walkthrough

The gotcha with Google Drive MCP is the credential setup. The server itself is straightforward; the Google Cloud Console part takes more clicks than you'd expect.

Step 1: Create a Google Cloud project

Go to console.cloud.google.com, create a new project (or use an existing one you control), and enable the Google Drive API. You find it under "APIs and Services" > "Enable APIs and Services", then search for "Google Drive API".

Step 2: Create an OAuth credential

Still in the Console, go to "APIs and Services" > "Credentials". Create an OAuth 2.0 Client ID and choose "Desktop app" as the application type. Download the JSON file that appears. This is your credentials.json.

Step 3: Clone and build the server

git clone https://github.com/isaacphi/mcp-gdrive.git
cd mcp-gdrive
npm install
npm run build

Step 4: Run the auth flow

npm run auth

This opens a browser window to Google's OAuth consent screen. After you approve, the server stores a token at ~/.gdrive-server-credentials.json. The token is long-lived (refresh tokens do not expire as long as you use them regularly), but if it ever expires you can re-run npm run auth.

Step 5: Add to your MCP config

For Claude Desktop, add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gdrive": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-gdrive/dist/index.js"],
      "env": {
        "GDRIVE_CREDENTIALS_PATH": "/absolute/path/to/credentials.json"
      }
    }
  }
}

For Claude Code, the same block goes in ~/.claude/mcp.json. Use absolute paths throughout. Relative paths cause silent failures that are annoying to debug.

Restart your client after saving the config. The Drive tools should appear in the tool list within a few seconds of connecting.

Real use cases

Document Q&A without copy-paste. The agent can search for a document by topic, read it, and answer questions about it directly. I've used this to pull specs, contracts, and internal docs without leaving the conversation. It works best when you have a reasonably organized Drive where search returns the right document in the top few results.

Meeting note summaries. If your team stores meeting notes as Google Docs, an agent equipped with this server can find the last three meeting notes for a project, read all of them, and surface the recurring action items or blockers. This is genuinely useful and not something you'd want to do manually.

Cross-document research. Ask the agent to find all documents tagged with a certain keyword, list them, and synthesize a summary. It handles the file iteration in a loop. The quality of the output depends on how good Google's search index is for your content, which is generally quite good.

Shared drive auditing. For a team's shared Drive, an agent can walk a folder structure, catalog the files it finds, and report on what's there. Useful when you've inherited a Drive folder with unknown contents. You'd want a service account rather than personal OAuth for this kind of task.

Content extraction for pipelines. If you're building a workflow where documents in Drive feed downstream processes, the MCP server gives you an easy way to pull that content without building a full Google Drive integration. For prototyping, this is significantly faster than writing Drive API code yourself.

Security considerations

This server reads files from your Google account. The scope you request during setup determines what it can access.

The default drive.readonly scope grants read access to every file your Google account can read. On a personal account that is probably fine. On a work account that might include sensitive HR documents, financial records, or confidential client files that you would not want an AI model to process unless you deliberately asked it to.

A few things worth doing:

Create a dedicated Google Cloud project. Using a project you control specifically for MCP means you can audit what's accessing your Drive, revoke credentials cleanly, and keep the OAuth app separate from anything else.

Consider a service account for team use. If you're setting this up for a shared Drive that the whole team uses, a service account limited to a specific shared drive is cleaner than routing everything through someone's personal OAuth token. Service accounts support Drive API access with domain-wide delegation.

Keep credentials.json and the token file out of version control. The credentials.json file from Google Cloud and the ~/.gdrive-server-credentials.json token file are both sensitive. Make sure neither ends up in a git repo.

Review what the agent actually reads. Because search-and-read is the pattern, the agent only processes documents it explicitly fetches. It is not reading your entire Drive in the background. Specific prompts that search for specific content give you a much clearer picture of what the agent is looking at than broad open-ended instructions.

Pairing with other servers

The Google Drive server pairs naturally with the Filesystem MCP server for workflows that involve both cloud documents and local files. You can have an agent pull a spec from Drive and write corresponding code to a local directory in one session.

If your team also uses Slack, combining the two servers lets an agent trace a decision from a Slack discussion back to the Drive document it references. That kind of cross-context navigation is where multi-server MCP setups start to feel genuinely powerful.

For writing and document creation workflows, the GitHub MCP server pairs well if you want an agent to pull content from Drive and then create or update files in a repository.

The bottom line

The Google Drive MCP server solves a real problem. Documents live in Drive; agents without access to Drive are limited to whatever you manually paste. The community fork at isaacphi/mcp-gdrive fills the gap that the archived reference implementation left, and it works well for the core read and search use cases.

The setup is heavier than most MCP servers because Google's OAuth flow requires creating a Cloud project and an OAuth credential before any code runs. Plan for 15 to 20 minutes the first time. After that, the token persists and the server just works.

For personal Drive use with Claude Desktop or Claude Code, this is a straightforward win. For work use, think carefully about which account's credentials you use and whether scoping to a specific shared drive makes more sense than granting full Drive access.

Features

  • Search Google Drive files by name or content query
  • Read file contents including Google Docs, Sheets, and Slides as plain text
  • List files and folders with metadata (name, type, modified date, owner)
  • Download and inspect PDFs, images, and other binary formats
  • OAuth 2.0 authentication with a scoped Google Cloud credential
  • Configurable Drive scope limiting to specific folders or shared drives
  • Works with Claude Desktop and Claude Code via stdio transport

How to set up the Google Drive MCP Server MCP server

  1. Create a Google Cloud project and enable the Google Drive API in the Console
  2. Create an OAuth 2.0 Desktop App credential and download the credentials.json file
  3. Clone the repo and run npm install, then npm run build
  4. Run npm run auth to complete the OAuth flow and store a token locally
  5. Add the server block to your MCP client config pointing to the built server file
  6. Restart your client and confirm the Drive search and read tools appear

Frequently Asked Questions

What is the Google Drive MCP server?
The Google Drive MCP server is a Model Context Protocol server that gives AI agents tools to search your Drive, list files and folders, and read the contents of documents. It authenticates via OAuth 2.0 using a Google Cloud project credential, so the agent operates under your personal Google account permissions.
Is there an official Google Drive MCP server?
There was. Anthropic included a Google Drive server in the original modelcontextprotocol/servers reference monorepo, but that repo was archived in May 2025. The community fork at isaacphi/mcp-gdrive carries the implementation forward and is the most actively maintained option available in 2026. Google has not published a first-party MCP server.
What OAuth scopes does the Google Drive MCP server use?
The standard setup requests the https://www.googleapis.com/auth/drive.readonly scope, which grants read-only access to everything in your Drive. If you want to limit exposure further, you can restrict to https://www.googleapis.com/auth/drive.file (only files the app created or opened) or https://www.googleapis.com/auth/drive.metadata.readonly for listing only, but the latter prevents content reads. Most people use drive.readonly.
Can the Google Drive MCP server write or create files?
Not in the standard community implementation. The server focuses on read and search operations. If you need write support (creating Docs, uploading files), you would need to extend the server yourself or use a different implementation, and you would need to request the https://www.googleapis.com/auth/drive scope rather than the read-only variant.
How does the Google Drive MCP server handle Google Docs and Sheets?
Google Docs and Sheets are exported as plain text when the agent reads them. The server uses the Google Drive export API to convert the document to a readable format on the fly. You do not get the formatting or formulas from a Sheet, just the cell values as text. For most Q&A and summarization use cases this is sufficient.
Is the Google Drive MCP server safe to use with work accounts?
The OAuth credential is stored locally on your machine after the initial auth flow. The server never sends credentials to a third party. The main risk is that the agent can read any file your account can access, which on a work account may include sensitive documents. Scope control at the Google Cloud level and careful prompting both help. For work use, a service account limited to a specific shared drive is a safer pattern than personal OAuth.
Search