google-mcp
google-mcp
MCP server for Google Drive, Docs, and Sheets — built for Claude Code.
Gives Claude Code direct read/write access to Google Drive (file management, sharing, comments), Google Docs (full editing, formatting, tables, lists, hyperlinks), and Google Sheets (cell-level edits, formatting, structure).
Setup
Prerequisites
Node.js 18+ (
brew install nodeon macOS)A Google Cloud project with the Drive, Docs, and Sheets APIs enabled
An OAuth 2.0 Client ID (Desktop app type) — download as
credentials.json
Install
git clone git@github.com:ztgluis/google-mcp.git ~/dev/google-mcp
cd ~/dev/google-mcp
npm installAuthenticate
Place your credentials.json in the project root, then:
npm run authThis opens your browser for Google sign-in and saves token.json locally (never committed).
Register with Claude Code
claude mcp add google -s user -- node "$HOME/dev/google-mcp/index.js"Use -s user (not -s project) so the registration is stored locally in ~/.claude.json. If your project directory is on a synced drive (e.g., Google Drive), -s project would create a .mcp.json with a machine-specific absolute path that breaks on other machines.
Restart Claude Code to load the server.
Tools (131)
Drive — Files
search_drive— search files by name or contentget_file_metadata— file info (name, type, size, owner, dates, parents)rename_file— rename any file or foldermove_file— move a file to a different foldercopy_file— copy any file, optionally rename and relocatecreate_folder— create a new foldertrash_file— move to trash or permanently deletelist_folder— list contents of a folderupload_file— upload a local file to Google Drivedownload_file— download a Drive file to local filesystemcreate_doc_from_markdown— create a formatted Google Doc from markdown or HTML (one call)about— account info and storage quota
Drive — Permissions
list_permissions— list who has access to a filecreate_permission— share a file with a user, group, domain, or anyoneupdate_permission— change a permission's roledelete_permission— remove access
Drive — Comments & Replies
add_comment— add a comment, optionally anchored to quoted textlist_comments— list comments on a fileresolve_comment— resolve a commentupdate_comment— edit a commentdelete_comment— delete a commentlist_replies— list replies on a commentcreate_reply— reply to a comment (with optional resolve/reopen action)delete_reply— delete a reply
Drive — Revisions
list_revisions— list revision historyget_revision— get details of a specific revision
Docs — Content
create_doc— create a new Google Docread_doc— read a Google Doc as plain text / markdownread_doc_structure— read full structure with indices, formatting, object IDs, stylesedit_doc— insert, delete, replace, or append textcopy_doc— copy a Google Docrename_doc— rename a Google Docexport_doc— export to PDF, DOCX, TXT, HTML, RTF, or EPUB
Docs — Formatting
format_doc— bold, italic, underline, font, colors, headings, alignment, hyperlinksupdate_document_style— page margins, size, background colorupdate_named_style— modify heading/paragraph styles globallyupdate_section_style— section-level columns, margins, headers/footersupdate_list— apply or remove bulleted/numbered list formatting
Docs — Tables
insert_table— insert a tablemodify_table— insert/delete rows and columnsmerge_table_cells— merge cells in a tableunmerge_table_cells— unmerge cells in a tableformat_table— cell borders, backgrounds, padding, column widths, row heightspin_table_header_rows— pin header rows in a table
Docs — Special Elements
insert_image— insert an inline image from a URLreplace_image— replace an existing imagedelete_positioned_object— delete a floating image or objectinsert_page_break— insert a page breakinsert_section_break— insert a section break (next page or continuous)insert_date— insert a date chipinsert_person— insert a person mention (@ chip)insert_rich_link— insert a smart chip linking to a Google filecreate_footnote— create a footnote
Docs — Named Ranges
create_named_range— create a named range (bookmark)delete_named_range— delete a named rangelist_named_ranges— list all named rangesreplace_named_range_content— replace content in a named range (templates)
Docs — Headers, Footers & Tabs
update_header_footer— create or replace headers/footersdelete_header— delete a headerdelete_footer— delete a footerlist_doc_tabs— list tabs in a docrename_doc_tab— rename a doc tabadd_doc_tab— add a new tabdelete_doc_tab— delete a tab
Sheets — Data
read_sheet— read a rangebatch_read_sheet— read multiple ranges in one callappend_sheet_row— append a row after the last data rowupdate_sheet_cell— update a single cell or rangebatch_update_sheet— write to multiple ranges in one callclear_sheet— clear values in a rangebatch_clear_sheet— clear multiple ranges in one callinsert_rows— insert rows at a position, optionally with datadelete_rows— delete rowsdelete_columns— delete columnsfind_replace— find and replace textsort_range— sort a range by one or more columnsexport_sheet— export to CSV, TSV, XLSX, PDF, or HTMLread_cell_format— read cell formatting, borders, validation, notes, hyperlinks, rich text runsset_data_validation— set dropdowns, number rules, or custom formulasclear_data_validation— clear validation rules from a rangetext_to_columns— split text into columns by delimiterset_cell_note— set, update, or clear a note on a cellset_cell_rich_text— per-character formatting within a cell (mixed bold/color/links)copy_paste— copy a range with paste options (values, format, all, transpose)cut_paste— cut and paste a rangeauto_fill— extend a pattern or formula (fill handle)trim_whitespace— trim leading/trailing whitespace from cellsupdate_spreadsheet_properties— update title, locale, timezone, recalculationappend_dimension— add empty rows or columns at the end of a sheetset_dimension_size— set specific row height or column width in pixelsadd_pivot_table— create a pivot table from a data range
Sheets — Formatting
format_cells— colors, fonts, alignment, number formats, wrap strategyupdate_borders— cell borders (solid, dashed, dotted, thick, double)merge_cells— merge a rangeunmerge_cells— unmerge a rangeadd_conditional_formatting— boolean or gradient rulesread_conditional_formats— read full rule details (conditions, values, formats, gradients)update_conditional_formatting— update an existing rule by indexdelete_conditional_formatting— delete a rule by indexadd_banding— alternating row colorsupdate_banding— update banding colorsdelete_banding— remove bandingfreeze— freeze rows/columnsauto_resize— auto-fit columns or rows to content
Sheets — Objects & Charts
list_sheet_objects— list all charts (with full specs), filters, banding, protected ranges, named rangesadd_chart— create a chart (bar, line, pie, column, area, scatter, combo)update_chart— update an existing chart (type, data, colors, title, axes)delete_embedded_object— delete a chart or embedded objectset_basic_filter— set auto-filter on a rangeclear_basic_filter— remove auto-filteradd_filter_view— create a named filter viewupdate_filter_view— update filter view (title, range, criteria, sort)delete_filter_view— delete a filter viewadd_slicer— add an interactive slicer (filter control)
Sheets — Named Ranges
add_sheet_named_range— create a named range (e.g. "SalesData" -> Sheet1!A1:D100)update_sheet_named_range— rename or change a named range referencedelete_sheet_named_range— delete a named range
Sheets — Structure
get_sheet_metadata— title, URL, sheet names, IDs, dimensions, frozen rows/colscreate_spreadsheet— create a new spreadsheetinsert_sheet— add a tabdelete_sheet— remove a tabrename_sheet— rename a tabduplicate_sheet— duplicate a tab within the same spreadsheetcopy_sheet_to— copy a tab to a different spreadsheetupdate_sheet_properties— change tab title, color, grid size, frozen rows/colsadd_protected_range— protect a range (with optional warning-only mode)update_protected_range— modify a protected rangedelete_protected_range— remove range protectionmove_dimension— move rows or columns to a new positionadd_dimension_group— create collapsible row/column groupsdelete_dimension_group— remove row/column groups
Security
credentials.json and token.json are gitignored and must never be committed. Each machine generates its own token.json via npm run auth.