google-drive-mcp-server
Allows interaction with Google Drive, providing tools to read, search, list folders, and upload files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-drive-mcp-servershow me my recent documents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Drive MCP Server
A Model Context Protocol (MCP) server for Google Drive integration. This server allows AI assistants to interact directly with your Google Drive, providing tools to read, search, list folders, and upload files.
Built with TypeScript and utilizing the official Google APIs Node.js Client.
Available Modules & Tools
Files & Folders
Manage and search your Google Drive contents.
list_recent_files: Lists recent files from Google Drive, ordered by recency, modification date, or name.search_files: Searches for files and folders in Google Drive by name or content. Accepts plain text or Drive query syntax.list_folder: Lists the contents (files and subfolders) of a specific Google Drive folder by its ID. Works with both My Drive and Shared Drives.read_file_content: Reads the text content of a Google Drive file (Docs, Sheets, PDFs, plain text).get_file_metadata: Returns metadata of a Drive file: name, MIME type, size, owners, modification date, parent folders, and view link.upload_file: Uploads a file to Google Drive. Pass text content directly or base64-encoded content for binary files.upload_file_from_path: Uploads a file from a local path on the server to Google Drive. Useful for processing generated files.
Related MCP server: MCP Google Drive Server
Setup & Installation
Clone the repository:
git clone https://github.com/Themetralla3000/google-drive-mcp-server.git cd google-drive-mcp-serverInstall dependencies:
npm installCopy the environment template and configure your credentials:
cp .env.example .envBuild the project:
npm run build
Configuration
You must provide Google Drive API credentials via the .env file. These can be obtained from the Google Cloud Console by creating an OAuth 2.0 Client ID.
GOOGLE_DRIVE_CLIENT_ID=your-client-id
GOOGLE_DRIVE_CLIENT_SECRET=your-client-secret
GOOGLE_DRIVE_REFRESH_TOKEN=your-refresh-tokenUsage with Claude Desktop / Cursor
To use this MCP with Claude Desktop or Cursor, add the following configuration to your MCP config file (e.g., claude_desktop_config.json):
{
"mcpServers": {
"google-drive": {
"command": "node",
"args": ["/absolute/path/to/google-drive-mcp-server/build/src/index.js"],
"env": {
"GOOGLE_DRIVE_CLIENT_ID": "your-client-id",
"GOOGLE_DRIVE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_DRIVE_REFRESH_TOKEN": "your-refresh-token"
}
}
}
}License
MIT License
Available Tools
7 toolsget_file_metadataA
Returns metadata of a Drive file: name, MIME type, size, owners, modification date, parent folders and view link.
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | Google Drive file ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries burden. It only lists return fields, omitting that it's read-only, auth requirements, error conditions, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no wasted words. Front-loaded with purpose and explicit return fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one parameter and no output schema, description adequately lists metadata fields but lacks completeness on permissions, error handling, or return structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with parameter description, so description adds no extra meaning beyond what schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns metadata of a Drive file, listing specific fields like name, MIME type, size, etc. It distinguishes from siblings that list, search, or read content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for metadata retrieval, but provides no explicit when-to-use or when-not-to-use guidance relative to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_folderA
Lists the contents (files and subfolders) of a specific Google Drive folder by its ID. Works with both My Drive and Shared Drive folders. Use get_file_metadata or search_files to find folder IDs first.
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes | Google Drive folder ID (works with both My Drive and Shared Drive folders) | |
| page_size | No | Max items to return (default 50) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must cover behavioral traits. It mentions compatibility with My Drive and Shared Drive but does not disclose return format, error handling, or pagination details beyond the page_size parameter.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences; first defines the operation, second provides actionable prerequisite. No wasted words; appropriately sized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no output schema, the description covers purpose and usage well. Lacks details on return format and next-page handling, but is otherwise sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description does not add meaning beyond the schema descriptions; folder_id's dual-drive support is already in the schema, and page_size default is not mentioned in description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists files and subfolders of a specific Google Drive folder by ID, distinguishing it from siblings like search_files and list_recent_files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides context on when to use this tool (requires folder ID) and suggests using get_file_metadata or search_files to obtain folder IDs, giving clear guidance without needing exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_recent_filesC
Lists recent files from Google Drive, ordered by recency, modification date or name.
| Name | Required | Description | Default |
|---|---|---|---|
| page_size | No | Max files to return (default 10) | |
| order_by | No | Sort order (default: recency) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fails to disclose behavioral traits such as what constitutes 'recent', authentication requirements, or rate limits. It only states the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no unnecessary words. It efficiently conveys the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema is provided, and the description does not mention what the tool returns (e.g., file names, IDs, metadata). This omission reduces completeness for a simple list tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds minimal value beyond the schema. It repeats the enumeration for 'order_by' but does not explain nuances like default values or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists recent files from Google Drive with ordering options. However, it does not differentiate itself from siblings like 'list_folder' or 'search_files', which could cause confusion about when to use this tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., 'search_files' for more flexible queries). The description lacks context on prerequisites or optimal use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_file_contentA
Reads the text content of a Google Drive file (Docs, Sheets, PDFs, plain text). Returns up to 20,000 characters.
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | Google Drive file ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses character limit (20,000) and supported file types, which adds value beyond the schema. However, since annotations are absent, full burden falls on description. It does not state whether operation is read-only, required permissions, or behavior for unsupported files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with action verb, no wasted words. Every piece (action, resource, types, limit) earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, description covers core purpose and constraint (20,000 char limit). Missing error handling details, but overall adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already documents file_id with description 'Google Drive file ID' (100% coverage). Description adds no additional meaning for the parameter beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it reads text content of Google Drive files and lists supported types (Docs, Sheets, PDFs, plain text). This distinguishes it from sibling tools like get_file_metadata (metadata only) and upload_file (upload).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied for reading text content, but no explicit guidance on when to use this tool versus alternatives like get_file_metadata (for metadata) or upload_file (for uploading). No when-not-to-use or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_filesA
Searches for files and folders in Google Drive by name or content. Accepts plain text or Drive query syntax (e.g. "mimeType='application/vnd.google-apps.folder'").
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query (Drive query syntax or plain text) | |
| page_size | No | Max results (default 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Only states the search capability. Does not disclose whether search is recursive, how results are sorted, auth requirements, rate limits, or side effects. For a search tool, behavioral details are important but missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: first states primary action, second adds acceptable input formats. No unnecessary words, appropriately front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is functional for a basic search tool with two parameters. It doesn't explain output format or pagination fully, but given no output schema and no annotations, it covers the essential behavior. Could be more complete but meets minimum needs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with adequate descriptions for both parameters. The description adds no new information beyond the schema (already mentions plain text and Drive query syntax). Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action (searches), resource (files and folders in Google Drive), and scope (by name or content). It distinguishes from sibling tools like list_folder (lists folder contents) and read_file_content (reads file text).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool over alternatives. The description implies searching across Drive, but doesn't contrast with list_folder (for browsing a specific folder) or get_file_metadata (for a single file's info). No when-not-to-use or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
upload_fileA
Uploads a file to Google Drive. Pass text content directly or base64-encoded content for binary files (e.g. PPTX, PDF). Use folder_id to place the file in a specific folder — obtain it with search_files first.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name including extension | |
| content | Yes | File content as text, or base64-encoded for binary files | |
| mime_type | No | MIME type (e.g. text/plain, application/vnd.openxmlformats-officedocument.presentationml.presentation). Defaults to text/plain. | |
| folder_id | No | ID of the parent folder. Omit to upload to Drive root. | |
| base64 | No | Set true if content is base64-encoded binary |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Mentions base64 for binary files and folder_id behavior, but does not disclose permission requirements, size limits, or what happens on conflict. Adequate but with gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short, front-loaded sentences with zero redundancy. Every sentence provides actionable information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers essential usage for upload tool: content type handling and folder placement. Lacks return value description (no output schema), but otherwise complete for primary use case.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but description adds value by clarifying base64 usage for binary files and directing to search_files for folder_id retrieval, beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Uploads a file to Google Drive' and distinguishes from siblings like upload_file_from_path by mentioning base64 encoding for binary files. Includes guidance on folder placement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides context on when to use base64 vs text content, and how to obtain folder_id. Lacks explicit exclusion of alternative tools like upload_file_from_path, but usage is well implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
upload_file_from_pathA
Uploads a file from a local path on the server to Google Drive. Use this after generating a file with another tool (e.g. PPTX at /shared/out/). The MIME type is auto-detected from the extension.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file on disk (e.g. /shared/out/presentation.pptx) | |
| name | No | Name to use in Drive. Defaults to the filename from path. | |
| mime_type | No | MIME type. Auto-detected from extension if omitted. | |
| folder_id | No | ID of the parent folder. Omit to upload to Drive root. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It mentions auto-detection of MIME type from extension, which is a useful behavioral detail. However, it omits other behaviors like error handling if path doesn't exist, size limits, permission requirements, or whether it overwrites existing files. Adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences long, concise and front-loaded with the main action, followed by usage context, then additional detail on MIME detection. Every sentence adds value; no wasted words. Could be slightly more structured but very efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description lacks essential context such as return value (e.g., file ID), error conditions, or behavior when the path is invalid. Given no output schema, this information is critical for the agent. Also, it does not clarify if the upload is synchronous or any rate limits. Incomplete for a mutation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description reinforces parameter roles (e.g., 'Name defaults to the filename from path', 'MIME type auto-detected from extension if omitted') but does not add new semantic details beyond the schema. It provides useful examples but no deeper semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool uploads a file from a local path to Google Drive, distinguishing it from sibling tools like upload_file by emphasizing the source is a local server path. It uses specific verb 'uploads' and resource 'file from a local path', making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this after generating a file with another tool', providing a clear use case. It does not explicitly state when not to use or mention alternatives, but the sibling list implies alternatives exist. Lacks full exclusions but gives adequate context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v1.0.0- First observed
get_file_metadata - First observed
list_folder - First observed
list_recent_files - First observed
read_file_content - First observed
search_files - First observed
upload_file - First observed
upload_file_from_path
TDQS
Scored across 7 tools
Most tools have distinct purposes, but the two upload tools ('upload_file' and 'upload_file_from_path') could cause confusion since they differ only in how content is provided.
All tools use consistent verb_noun snake_case naming, with no deviations from the pattern.
Seven tools is well-scoped for a Drive server, covering essential operations without being excessive.
Common operations like creating folders, deleting files, and updating metadata are missing, leaving notable gaps for typical Drive workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Give Claude only the Google Drive files you choose. Every action logged.
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Search, read, preview, create, update, rename, arrange and trash sketches in your Google Drive.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceIntegrates with Google Drive to enable listing, searching, and reading files, plus reading and writing to Google Sheets.1,033283MIT
- FlicenseNot gradedqualityNot gradedmaintenanceConnects AI assistants like Claude to Google Drive, enabling them to browse, read, search, create, and edit files and folders using Google's official API with secure authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables AI models to search, list, and read files from Google Drive with automatic format conversion for Google Workspace documents.3,241MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Google Drive, supporting file operations like list, search, read, create, update, delete, share, and manage permissions.77754MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Themetralla3000/google-drive-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server