Google-Workspace-MCP

chayan-1906/Google-Workspace-MCP

3.3

If you are the rightful owner of Google-Workspace-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Google Workspace MCP Server is a TypeScript-based server that extends AI agents like Claude with Google Workspace capabilities, including Drive, Spreadsheet, and Docs functionalities.

Tools
5
Resources
0
Prompts
0

🚀 Google Workspace MCP Server

The Ultimate MCP Server for Google Workspace Automation — Seamlessly integrate Google Drive, Sheets, and Docs with Claude AI and other AI agents through the Model Context Protocol (MCP).

TypeScript Google Workspace MCP


Google Workspace MCP

📖 Overview

Google Workspace MCP Server is a TypeScript-based Model Context Protocol server that empowers AI agents like Claude with 76 powerful tools to interact with Google Workspace services. Automate document creation, spreadsheet manipulation, file management, and more—all through natural language conversations with AI.

🌟 Key Features

  • 76 Comprehensive Tools across Google Drive, Sheets, and Docs
  • Production-Ready with OAuth 2.0 authentication
  • Type-Safe implementation using TypeScript and Zod validation
  • Cross-Platform executable support for easy deployment
  • Real-Time Operations with Google Workspace APIs
  • Secure credential management and session handling

⚙️ Quick Start

1. 📁 Clone the Repository

git clone https://github.com/chayan-1906/Google-Workspace-MCP.git
cd Google-Workspace-MCP

2. 📦 Install Dependencies

npm install

3. 🔧 Configure OAuth Credentials

Follow the User Guide for detailed setup instructions.

4. 🚀 Run the Server

npm run dev

Or build and package:

npm run package

🧰 Complete Tool Reference

👤 Profile (1 tool)

Tool NameDescription
myGoogleAccountFetches the authenticated user's email address

📁 Google Drive - Folder Management (8 tools)

Tool NameDescription
getDriveFolderIdsByNameFinds the Google Drive folder IDs by folder name
getDriveFolderContentByIdFinds the Google Drive folder contents by folder ID
createDriveFolderCreates a new folder in Google Drive
copyDriveFolderCopies a folder in Google Drive to a new location with a new name
moveDriveFolderMoves a folder to a different location in Google Drive
deleteDriveFolderPermanently deletes a folder from Google Drive
getDriveStorageQuotaGets Google Drive storage quota and usage information
getDriveSharedWithMeLists files shared with the authenticated user

📄 Google Drive - File Operations (10 tools)

Tool NameDescription
getDriveFileMetadataGets detailed metadata for a Google Drive file
getDriveFilePermissionsGets all permissions for a Google Drive file
updateDriveFilePermissionsUpdates permissions for a specific user on a Google Drive file
copyDriveFileCopies a file in Google Drive to a new location with a new name
moveDriveFileMoves a file to a different folder in Google Drive
deleteDriveFilePermanently deletes a file from Google Drive
searchDriveFilesSearches for files in Google Drive using query parameters
removeDriveFileAccessRemoves access permissions for a specific user from a Google Drive file
setDriveLinkPermissionSets link sharing permissions for a Google Drive file (anyone with link can access)
duplicateDriveFileDuplicates a file in the same folder with "Copy of" prefix

📊 Google Spreadsheets - Document Management (6 tools)

Tool NameDescription
getSheetIdsByNameFinds the Google Spreadsheet IDs by spreadsheet name
createSpreadsheetCreates a new Google Spreadsheet in the specified Drive folder
deleteSpreadsheetDeletes a Google Spreadsheet from Drive permanently
renameSpreadsheetRenames an existing Google Spreadsheet by the spreadsheet ID
shareSpreadsheetShares the Google Spreadsheet with one or more users
unshareSpreadsheetUnshares the spreadsheet from specific email addresses (ignores if not shared)

📝 Google Docs - Document Management (5 tools)

Tool NameDescription
getDocIdsByNameFinds the Google Doc IDs by doc name
getDocMetadataFetches basic metadata for a Google Doc (title, timestamps, owners)
createDocCreates a new Google Doc in the specified Drive folder
deleteDocDeletes a Google Docs document
renameDocRenames a Google Docs document

📈 Google Sheets - Data Manipulation (27 tools)

Tool NameDescription
appendSheetTabRowAppends a new row in an existing spreadsheet
deleteRowDeletes one or more rows in a sheet tab
clearRangesClears certain ranges from a Google Spreadsheet
updateRangesUpdates specific ranges in a Google Spreadsheet
getSheetTabContentFetches values from a specific sheet range in given Google Spreadsheet
addSheetTabCreates a new sheet tab in Google Spreadsheet
renameSheetTabRenames a sheet tab in Google Spreadsheet
deleteSheetTabDeletes a sheet tab by its numeric sheet tab ID
addSheetTabContentAdds new content (rows) to a specified range in a Google Spreadsheet
updateSheetTabContentOverwrites content in a specific Google Spreadsheet range
insertColumnInserts a new column in a sheet at a specific position in Google Spreadsheet
deleteColumnDeletes one or more columns in a sheet tab from Google Spreadsheet
addChartAdds a chart to the specified sheet in Google Spreadsheet
sortSheetSorts a row range by one or more column indexes in Google Spreadsheet
filterSheetApplies filter view to a specified cell range in Google Spreadsheet
functionsApplies spreadsheet function formulas (e.g., SUM, AVERAGE) to specific cell in Google Spreadsheet
addConditionalFormattingAdds conditional formatting to a range in a Google Spreadsheet
clearAllConditionalFormattingClears all conditional formatting rules in a sheet tab in Google Spreadsheet
freezeRowsColumnsFreezes specified number of rows and columns in a sheet in Google Spreadsheet
unfreezeRowsColumnsRemoves any frozen rows or columns from the Google Spreadsheet
customCellFormattingApplies custom formatting to a specified cell range in a Google Spreadsheet
clearAllCustomCellFormattingSheetClears all custom cell formatting (like font, color, alignment) from the given Google Spreadsheet
duplicateSheetTabDuplicates a sheet and assigns a new name in given Google Spreadsheet
mergeCellsMerges a specified cell range in a sheet using a selected merge type in Google Spreadsheet
unmergeCellsUnmerges cells in the given range on a Google Spreadsheet
setHeightWidthSets row height or column width in a Google Spreadsheet
protectCellsAdds a protected range to specific cells with a warning in a Google Spreadsheet
insertLinkSheetInserts a hyperlink into a specific cell in Google Spreadsheet

📋 Google Docs - Content & Formatting (18 tools)

Tool NameDescription
getDocContentRetrieves the complete plain text content from a Google Docs document, including text from tables and other elements
appendDocTextAppends text content to the end of a Google Docs document
findTextIndicesFinds all indices of a character or word in a Google Docs document, similar to Google Docs Find tool
insertTextAtPositionInserts text at a specific character position in a Google Docs document
deleteTextRangeDeletes specific content ranges in a Google Docs document using precomputed start and end indices
getParagraphRangesIdentifies paragraph boundaries and returns exact ranges for deletion
insertDocHyperlinkAdds a hyperlink to existing text in a Google Docs document. Links ALL occurrences of searchText or specific range
removeDocHyperlinksRemoves hyperlinks from text in a Google Docs document. Can remove all hyperlinks or only those containing specific text
exportDocExports a Google Doc to specified format and saves it in the same Drive folder
applyTextStyleApplies text styling to a range of text in a Google Doc (bold, italic, color, font, etc.)
applyParagraphStyleApplies paragraph styling to a range of text in a Google Doc (alignment, spacing, indentation, etc.)
setListStyleApplies list formatting (bullets or numbering) to a range of text in a Google Doc
removeAllFormattingDocRemoves all text and paragraph formatting from a range in a Google Doc
getAllCustomFormattingDocRetrieves all custom formatting information from a Google Docs document, including text styles, paragraph styles, lists, and formatting details
insertTableInserts a table with specified rows and columns at a given position in a Google Docs document
updateTableUpdates a table in a Google Docs document by inserting/deleting rows/columns or updating cell content
deleteTableDeletes a table from a Google Docs document by specifying its start and end index
insertImageInserts an image from a URL into a Google Docs document at a specified position. Supports both public URLs and data URIs

💡 Use Cases

📊 Data Analysis & Reporting

  • Automatically generate reports from spreadsheet data
  • Create charts and visualizations programmatically
  • Apply conditional formatting based on data patterns

📝 Document Automation

  • Generate documents from templates
  • Bulk create and format Google Docs
  • Export documents to multiple formats

🗂️ File Management

  • Organize and structure Drive folders
  • Manage permissions and sharing at scale
  • Search and retrieve files based on criteria

🤖 AI-Powered Workflows

  • Let AI agents read and write to your spreadsheets
  • Enable Claude to edit documents based on instructions
  • Automate repetitive Google Workspace tasks

🛠️ Tech Stack

TechnologyPurpose
TypeScriptType-safe application development
Google Drive API v3Folder and file operations (fetch, create, delete, rename, permissions)
Google Sheets API v4Full spreadsheet automation (create, manipulate sheets, rows, columns, charts, formatting)
Google Docs API v1Advanced document operations (content editing, tables, images, formatting, exporting)
MCP SDKModel Context Protocol server framework
ZodSchema-based input validation
googleapisOfficial Google APIs Node.js client
OAuth 2.0Secure authentication and authorization

🔐 Security & Privacy

  • OAuth 2.0 authentication ensures secure access
  • Session tokens stored locally with encryption
  • Scoped permissions - only requested Google Workspace access
  • No data storage - all operations are direct API calls
  • Credential isolation - user credentials never shared

🚀 Deployment

Development Mode

npm run dev

📈 Project Stats

  • 76 Tools - Comprehensive Google Workspace automation
  • 3 APIs - Drive, Sheets, and Docs integration
  • Type-Safe - Built with TypeScript for reliability
  • Production-Ready - Used in real-world applications

🌟 Keywords

Google Workspace, MCP Server, Claude AI, TypeScript, Google Drive API, Google Sheets API, Google Docs API, Automation, AI Integration, Model Context Protocol, OAuth 2.0, Document Automation, Spreadsheet Automation, File Management, AI Agents, LLM Integration, API Integration, Cross-Platform, Node.js, Workspace Productivity