gdrive_searchLABSCO SUMMARY
Drive as a readable source, not a file blob.
The thoughtful part is the format handling: a model asking for a Google Doc gets Markdown, a Sheet gets CSV — text it can actually reason over instead of a raw export. Access is read-only by design, scoped to drive.readonly, so it can find and read but never change your files. The setup is the standard Google OAuth chore: a Cloud project, Desktop credentials, and a one-time browser auth to mint the token.
What it is
An MCP server for Google Drive that lets an AI model search, list and read files. It handles Google Workspace formats by converting them on read — Docs to Markdown, Sheets to CSV, Slides to plain text — so what comes back is usable text rather than an export blob.
What you get
- Files found by full-text search, returned with name, MIME type, file ID, last-modified time and size —
gdrive_search - A file's contents read by its Google Drive file ID —
gdrive_read_file - Google Workspace files converted on read — Docs to Markdown, Sheets to CSV, Slides to plain text, Drawings to PNG — with text and JSON as UTF-8 and other types base64-encoded
- Read-only access to Drive
Requirements
A Google Cloud project with the Google Drive API enabled and OAuth 2.0 Desktop-app credentials, using the drive.readonly scope. The downloaded OAuth JSON goes into a credentials/ directory as gcp-oauth.keys.json; running node dist/index.js auth completes the browser OAuth flow and saves the token beside it. Node.js v16 or higher; install is a clone plus npm install and npm run build. The package.json names it @modelcontextprotocol/server-gdrive at 0.6.2.
Setup effort
Build from source — git clone https://github.com/felores/gdrive-mcp-server.git
USE CASES
Finding a document by what is in it
Run a full-text search and get back the matching files with their IDs and metadata.
Reading a Google Doc as text
Read the file by ID and receive it as Markdown rather than an export blob.
Pulling a spreadsheet into a conversation
Read a Google Sheet by ID and get CSV the model can work with.
Giving an assistant safe access to Drive
Rely on the read-only scope so it can search and read but never modify your files.
2 tools
Listed in project docs. Your client may show a different list.
gdrive_read_fileBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- node on PATH
- Node.js
- GOOGLE_APPLICATION_CREDENTIALS in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/felores/gdrive-mcp-server.git
cd gdrive-mcp-server
npm install
npm run buildIn Google Cloud Console, enable the Google Drive API, configure the OAuth consent screen with the https://www.googleapis.com/auth/drive.readonly scope, and create an OAuth client ID of type Desktop app; download its JSON file
mkdir credentials
mv <YOUR_PATH_TO_DOWNLOADED>/client_secret_*.json credentials/gcp-oauth.keys.json
node dist/index.js authComplete the OAuth flow in your browser; the token is saved to credentials/.gdrive-server-credentials.json
MCP Clients
Claude Desktop
{
"mcpServers": {
"gdrive": {
"command": "node",
"args": [
"<YOUR_PATH_TO_GDRIVE_MCP_SERVER>/dist/index.js"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_PATH_TO_GDRIVE_MCP_SERVER>/credentials/gcp-oauth.keys.json",
"MCP_GDRIVE_CREDENTIALS": "<YOUR_PATH_TO_GDRIVE_MCP_SERVER>/credentials/.gdrive-server-credentials.json"
}
}
}
}<YOUR_PATH_TO_GDRIVE_MCP_SERVER> is the full path to your clone, in all three places.