Skip to main content
Glama
Themetralla3000

google-drive-mcp-server

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

  1. Clone the repository:

    git clone https://github.com/Themetralla3000/google-drive-mcp-server.git
    cd google-drive-mcp-server
  2. Install dependencies:

    npm install
  3. Copy the environment template and configure your credentials:

    cp .env.example .env
  4. Build 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-token

Usage 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 tools
get_file_metadataA

Returns metadata of a Drive file: name, MIME type, size, owners, modification date, parent folders and view link.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_idYesGoogle Drive file ID

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
folder_idYesGoogle Drive folder ID (works with both My Drive and Shared Drive folders)
page_sizeNoMax items to return (default 50)

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
page_sizeNoMax files to return (default 10)
order_byNoSort order (default: recency)

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_idYesGoogle Drive file ID

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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'").

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (Drive query syntax or plain text)
page_sizeNoMax results (default 10)

TDQS

A3.6/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesFile name including extension
contentYesFile content as text, or base64-encoded for binary files
mime_typeNoMIME type (e.g. text/plain, application/vnd.openxmlformats-officedocument.presentationml.presentation). Defaults to text/plain.
folder_idNoID of the parent folder. Omit to upload to Drive root.
base64NoSet true if content is base64-encoded binary

TDQS

A4.2/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file on disk (e.g. /shared/out/presentation.pptx)
nameNoName to use in Drive. Defaults to the filename from path.
mime_typeNoMIME type. Auto-detected from extension if omitted.
folder_idNoID of the parent folder. Omit to upload to Drive root.

TDQS

A3.7/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 7 tool updatesv1.0.0
    • First observedget_file_metadata
    • First observedlist_folder
    • First observedlist_recent_files
    • First observedread_file_content
    • First observedsearch_files
    • First observedupload_file
    • First observedupload_file_from_path

TDQS

A3.7/5.0

Scored across 7 tools

Disambiguation4/5

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.

Naming Consistency5/5

All tools use consistent verb_noun snake_case naming, with no deviations from the pattern.

Tool Count5/5

Seven tools is well-scoped for a Drive server, covering essential operations without being excessive.

Completeness3/5

Common operations like creating folders, deleting files, and updating metadata are missing, leaving notable gaps for typical Drive workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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