Google Drive MCP Server
Reference MCP server that lets AI agents search Google Drive and read files, with automatic conversion of Google Docs, Sheets, Slides, and Drawings.
The Google Drive MCP server is a reference implementation originally published in the official modelcontextprotocol/servers repository and now maintained under modelcontextprotocol/servers-archived. It integrates with the Google Drive API to let MCP clients (Claude Desktop, Cursor, VS Code, etc.) search for files and read their contents as resources. The server is read-only and scoped to drive.readonly.
Files are exposed as MCP resources via gdrive:///<file_id> URIs. Google Workspace formats are converted automatically when read: Docs become Markdown, Sheets become CSV, Slides become plain text, and Drawings become PNG. All other file types are returned in their native format. Search is exposed as a single search tool that queries Drive and returns matching file names plus MIME types.
This server is now archived by Anthropic and is no longer actively maintained, but it remains the canonical reference implementation. Several community forks (such as isaacphi/mcp-gdrive, felores/gdrive-mcp-server, and piotr-agier/google-drive-mcp) extend it with write capability, Sheets editing, Calendar, or broader Workspace coverage.
Tools
| Tool | Description |
|---|---|
search |
Search for files across the authenticated user's Google Drive. Returns matching file names and their MIME types. |
Prerequisites
You need a Google Cloud project with OAuth set up:
- Create a Google Cloud project
- Enable the Google Drive API
- Configure an OAuth consent screen (set to "internal" if testing within a Workspace org)
- Add the scope
https://www.googleapis.com/auth/drive.readonly - Create an OAuth Client ID of type "Desktop App"
- Download the OAuth keys JSON
Authenticate
Rename the downloaded credentials file to gcp-oauth.keys.json and place it in the server's root directory, then run the auth flow:
npm run build
node ./dist auth
This opens a browser, completes OAuth, and writes .gdrive-server-credentials.json to the project root.
MCP client config (NPX)
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gdrive"],
"env": {
"GDRIVE_CREDENTIALS_PATH": "/path/to/.gdrive-server-credentials.json"
}
}
}
}
MCP client config (Docker)
{
"mcpServers": {
"gdrive": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "mcp-gdrive:/gdrive-server",
"-e", "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json",
"mcp/gdrive"
]
}
}
}
- Search a user's Drive for files matching a topic, project code, or client name and surface the matches to the agent
- Pull the contents of a Google Doc into the conversation as Markdown for summarization, rewriting, or Q&A
- Read a Google Sheet as CSV so the agent can analyze rows, totals, or pivots without an additional Sheets integration
- Extract plain text from Google Slides decks for review, content audits, or generating speaker notes
- Provide read-only Drive grounding context for retrieval workflows where the agent needs to cite internal documents
- "Search my Drive for files containing 'Q3 board deck' and read the most recent one."
- "Find the Google Doc titled 'Onboarding Runbook' and summarize the key steps."
- "Open the sheet at gdrive:///1AbCdEf... and tell me which rows have status = blocked."
- "Pull the latest customer interview notes from Drive and group the insights by theme."
- "Find all Drive files mentioning 'Project Atlas' and list their titles and types."
- Official reference implementation from the Model Context Protocol team
- Automatic conversion of Google Workspace formats (Docs → Markdown, Sheets → CSV, Slides → text) makes content immediately usable by LLMs
- Simple OAuth setup with a single read-only scope, low risk for users
- Available both as an npm package (
@modelcontextprotocol/server-gdrive) and a prebuilt Docker image
- Archived and no longer actively maintained by Anthropic
- Read-only: no creating, updating, deleting, sharing, or moving files
- Exposes only a single
searchtool, no listing by folder, no metadata queries, no permission management - Requires the user to set up their own Google Cloud OAuth client, which is friction for non-developers
- isaacphi/mcp-gdrive: community fork adding Google Sheets read/write
- felores/gdrive-mcp-server: community implementation focused on Drive search, list, and read
- piotr-agier/google-drive-mcp: broader Workspace coverage including Docs, Sheets, Slides, and Calendar