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 henry@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

An MCP-compliant server built with TypeScript to extend Claude and other AI agents with Google Workspace (Drive, Spreadsheet, Docs) capabilities


logo

โš™๏ธ Quick Start

1. ๐Ÿ“ Clone the repo

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

2. ๐Ÿ“ฆ Install dependencies

npm install

User Guide -- https://versed-blinker-33e.notion.site/Google-Workspace-MCP-User-Guide-20f0c027172280c8b84fd90fbe67596c

๐Ÿงฐ Available Tools

Tool NameDescription
myDetailsFetches the authenticated user's email address
getDriveFolderIdsByNameFinds the Google Drive folder IDs by folder name
getDriveFolderContentByIdFinds the Google Drive folder contents by folder ID
getSheetIdsByNameFinds the Google Spreadsheet IDs by spreadsheet name
createSpreadsheetCreates a new Google Spreadsheet in the specified Drive folder
deleteSpreadsheetThe ID of the spreadsheet to delete
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)
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
appendSheetTabRowAppends a new row to an existing sheet
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
addSheetTabCreates a new sheet tab in a Google Spreadsheet
renameSheetTabRenames a sheet tab in Google Spreadsheet
deleteSheetTabDeletes a sheet tab by its numeric sheet ID
addSheetTabContentAdds new content (rows) to a specified range in a Google Spreadsheet
updateSheetTabContentOverwrites content in a specific Google Spreadsheet ranges
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 filterSheet 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 Sheet
clearAllConditionalFormattingClears all conditional formatting rules in a sheet
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
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
getDocContentRetrieves the plain text content of a Google Docs document
appendDocTextAppends text to the end of a Google Docs document
findTextIndices
insertTextAtPositionInserts text at a specific position in a Google Docs document'
findAndReplaceTextDocFinds and replaces a specific or all occurrences of a string in a Google Doc
deleteTextRangeDeletes specific content ranges in a Google Docs document using precomputed start and end indices
insertLinkDocInserts a hyperlink into a Google Docs document at a specified position
unLinkDoc
insertImage
insertTable
deleteElement
applyTextStyle
applyParagraphStyle
applyNamedStyle
setBackgroundColor
setListStyle
clearAllFormattingDoc
addCommentDoc
deleteCommentDoc
listCommentsDoc
copyDoc
exportDoc
shareDoc
unshareDoc

๐Ÿงช Run the MCP Server

npm run dev

Or compile and run:

npm run package

๐Ÿ‘จโ€๐Ÿ’ป Tech Stack

โ€ข ๐ŸŸฆ TypeScript โ€“ Type-safe application development

  • ๐Ÿ“ Google Drive API v1 โ€“ Folder and file operations (fetch folders/files, create, delete, rename)

โ€ข ๐Ÿ“„ Google Sheets API v4 โ€“ Full spreadsheet automation: create/delete/rename spreadsheets, manipulate sheets, rows, columns, charts, formatting, and access control

โ€ข ๐Ÿ“„ Google Docs API v3 โ€“ Advanced document operations: content editing, structure manipulation (tabs, tables, images), formatting, commenting, sharing, and exporting

โ€ข ๐Ÿง  MCP SDK โ€“ Model Context Protocol server framework

โ€ข โœ… Zod โ€“ Schema-based input validation

โ€ข ๐ŸŒฑ dotenv โ€“ Environment variable management

for /f "tokens=5" %a in ('netstat -aon ^| findstr :20251') do taskkill /F /PID %a