mcpField
G
Google Drive MCP Server

Google Drive MCP Server

Local
github.com/festusevFiles & Storage1Updated 74w ago

About Google Drive MCP Server

A FastMCP server for accessing Google Drive, with operations focused on Google Docs. It supports file discovery and paginated document reading and writing using service account authentication.

Key features

  1. 01List and search Drive files
  2. 02Read Google Docs with pagination
  3. 03Write to Docs tabs and ranges
  4. 04Authenticate with a service account
  5. 05Paginate large file lists and documents

Use cases

  1. 01Find Drive files by query or MIME type
  2. 02Read long documents in sections
  3. 03Insert or replace content in a document
  4. 04Access files shared with a service account

MCP support

Exposes Google Drive file listing and search, along with Google Docs reading and writing, as tools for MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Google Drive MCP Server

A Model Context Protocol (MCP) server for Google Drive integration, built with FastMCP. Provides tools for reading, writing, searching, and listing Google Drive files with a focus on Google Docs operations.

Features

  • File Operations: List and search files in Google Drive with pagination
  • Document Reading: Read Google Docs content with pagination and tab selection
  • Document Writing: Write to Google Docs with tab selection and range operations
  • Authentication: Service account authentication for Google Drive API access
  • Pagination: Handle large documents and file lists efficiently

Setup

1. Install Dependencies
uv sync
2. Google API Setup
  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Drive API and Google Docs API
  4. Create a service account and generate a key
  5. Download the service account key file and save it as service-account-key.json in the project root
  6. Share any Google Drive files/folders you want to access with the service account email
3. Running the Server
python -m google_drive_mcp.server

No authentication flow is required - the service account will authenticate automatically using the key file.

Available Tools

list_files

List files in Google Drive with optional filtering and pagination.

Parameters:

  • folder_id (optional): Folder ID to list files from (default: root)
  • page_size (optional): Number of files per page (default: 50, max: 100)
  • page_token (optional): Token for pagination
  • mime_type (optional): Filter by MIME type (e.g., 'application/vnd.google-apps.document')
search_files

Search for files in Google Drive using query syntax.

Parameters:

  • query: Search query (e.g., 'name contains "report"')
  • page_size (optional): Number of files per page (default: 50, max: 100)
  • page_token (optional): Token for pagination
read_document

Read content from a Google Docs document with pagination.

Parameters:

  • document_id: Google Docs document ID
  • tab_id (optional): Specific tab ID to read from
  • start_index (optional): Starting character index (default: 0)
  • length (optional): Number of characters to read (default: 5000, max: 10000)
write_document

Write content to a Google Docs document.

Parameters:

  • document_id: Google Docs document ID
  • content: Content to write
  • tab_id (optional): Specific tab ID to write to
  • insert_index (optional): Index where to insert content (default: end)
  • replace_start (optional): Start index for content replacement
  • replace_end (optional): End index for content replacement

Usage Examples

Search for Google Docs
# Search for documents containing "report"
search_files(query='name contains "report" and mimeType="application/vnd.google-apps.document"')
Read a Document with Pagination
# Read first 5000 characters
read_document(document_id="your_doc_id")

# Read next 5000 characters
read_document(document_id="your_doc_id", start_index=5000)
Write to a Specific Tab
# Write to a specific tab in a document
write_document(
    document_id="your_doc_id",
    content="Hello, World!",
    tab_id="your_tab_id"
)

Development

Project Structure
google_drive_mcp/
├── __init__.py
├── auth.py          # Google Drive authentication
└── server.py        # FastMCP server implementation
Running in Development
# Install in development mode
uv pip install -e .

# Run the server
python -m google_drive_mcp.server

License

This project is licensed under the MIT License.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.