add_chart
Add a chart
A chart over a data range: the first column is the domain (x axis, pie labels), the other columns (or series_columns) the series.
type必填titleaccount必填headersdata_range必填anchor_cell必填series_columnsspreadsheet_id必填com.foreverworks由 foreverworks.com 发布v0.2.0更新于 Nov 7, 2026
在多个 Google 账户中搜索并使用 Gmail、日历、云端硬盘、文档、表格和幻灯片。
AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。
Search and work in Gmail, Calendar, Drive, Docs, Sheets and Slides across several Google accounts.
Google Workspace 的本地 MCP 服务,由 foreverworks.com 发布;无需登录;STDIO;115 个工具。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
Search, read and organise the mail, calendars, Drive files, Docs, Sheets,
Slides, Google Tasks, contacts and Meet transcripts of several Google accounts
at once, from your AI assistant. It writes drafts, labels, filters, events,
tasks, files, documents, comments and sharing. Nothing is money, and nothing
deletes mail or a file for good: Gmail and Drive keep the trash for 30 days.
Mail stays a draft until you say send. Sending, sharing a file and
publishing a revision are write tools that tell your assistant to wait for
your explicit go. The server does not ask you itself; your client can, before
each call. MCP_MAX_ACCESS=read makes the server read-only.
You need one or more Google accounts, a browser, and about ten minutes
for npx -y @foreverworks/mcp-google setup, which walks you through the rest:
an OAuth client of your own in a free Google Cloud project, made with a few
clicks Google lets no program make, and one approval per product and account
(what it does). Nothing to set by hand. The
Workspace directory, Meet transcripts and smart notes, and focus time and out
of office events need a Google Workspace account.
[Install in VS Code] [Install in Cursor] [Download for Claude Desktop]
With Claude Code:
Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:
Each runs the published package on Node 22.19 or newer. VS Code and the Claude Desktop bundle ask for each setting as they add the server; leave an optional one empty. Cursor reads each from your environment instead (${env:CALENDAR_TIME_ZONE} and so on), so set them before you start Cursor. Every setting is optional; Configuration says which ones you need for which tools.
In a JSON configuration, the command is node and its one argument the full path of servers/google/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.
Then run setup once, in a terminal, before your first question:
It asks which products and accounts to connect, opens each Google page you
need, picks up the file you download, and has you approve each product in
your browser. At the end it prints the command above, with GOOGLE_TOOLSETS
added if you chose only some products. Run it again to add an account or a
product; it keeps what is already done.
Over HTTP (MCP_HTTP_PORT), one process serves every session, with one token
cache per grant.
Nothing needs setting. setup saves the OAuth client and every grant in the
server's state directory, ~/.local/state/mcps/google (on Windows
%APPDATA%\mcps\google), and the server finds them there. Each grant records
the address it was approved as, which is how the server knows which Google
account each label stands for. A label is lowercase letters, digits and
hyphens (personal, work, client-a), and stands for one Google identity
in every product.
The variables below are for a deployment that keeps these files elsewhere, or
lists its accounts itself. A variable that is set always wins over what
setup saved, and health says where each value came from.
Everything the server writes (token caches, grants, waiting consents,
downloads) goes under GOOGLE_STATE_DIR: by default systemd's
STATE_DIRECTORY, else $XDG_STATE_HOME/mcps/google, unless a variable below
moves a product's part.
The variables every server shares (MCP_HTTP_PORT, MCP_MAX_ACCESS,
MCP_FILE_ROOTS, MCP_FILE_SCRIPT and the rest) are in
docs/configuration.md.
Every tool definition the server hands your client travels with each request
the client makes, so a client that only needs mail and calendars pays for
Drive, Docs, Sheets and the rest all the same. GOOGLE_TOOLSETS names the
products to load, separated by commas, the way GitHub's MCP server takes
GITHUB_TOOLSETS. The tools of a product not loaded are not there at all:
not in the tool list, not in the server's instructions, not in
list_accounts or health. Unset, empty or all, every product is loaded,
as before.
list_accounts, health, begin_consent and complete_consent are always
loaded: every other tool takes a label list_accounts names, every remedy
points to health, and consent is how any grant is made, including one a
loaded product leans on (Meet reads a calendar event through the Calendar
grant). A name that is not a toolset stops the server at start, with a
message listing the ones there are. Measured with
scripts/measure-tokens.ts on 2026-10-23 (GPT-4 tokenizer), the tool list is
115 tools and about 84,800 tokens with every toolset (39,200 without the
product icons, which a client may not show the model), 43 tools and 35,600
(16,100) with gmail,calendar, and 46 tools and 32,400 (15,200) with
drive,docs,sheets.
To load mail and calendars only, with Claude Code:
Or in Claude Desktop's configuration:
A toolset removes tools; MCP_MAX_ACCESS=read keeps every tool listed and
refuses the writes. The shell's --health checks every product whatever
GOOGLE_TOOLSETS says; name a product to narrow it.
The server reaches Google through an OAuth client that belongs to you, in a Google Cloud project of your own. Google's terms do not let a client ship inside an open-source program, so each person makes one. It costs nothing, and your grants then depend on no one else's project.
npx -y @foreverworks/mcp-google setup makes it with you. Run it in a
terminal on the computer whose browser you use:
personal and work.github.com as the authorized domain.client_secret_....json you downloaded (or takes a path you type), checks
that it is a Desktop app client, and moves it into the state directory,
readable only by you.127.0.0.1, which
checks the grant and saves it. An account's first approval records its
address, and every later one must be approved as that address. If your
browser runs on another computer (setup over SSH), the page it lands on
fails to load: paste that page's address into setup instead.One OAuth client of your own serves every account and product.
In the Google Cloud console, create a project for this server.
Under APIs & Services, Library, enable the APIs of the products you will use: Gmail API, Google Calendar API, Google Drive API, Google Docs API, Google Sheets API, Google Slides API, Google Tasks API, People API (contacts and the directory) and Google Meet REST API.
Open Google Auth Platform. Under Branding, name the app and give your e-mail; for an External app, also fill in App domain (a home page and a privacy policy link on an authorized domain), which Google requires before publishing. Under Audience, pick who may use it, then add every account as a test user or Publish app: Google expires the refresh tokens of an app left in Testing after seven days. A published app can stay unverified for your own accounts; at consent, continue past Google's warning screen.
Under Data Access, add the scopes of the products you will use (each is
https://www.googleapis.com/auth/ followed by the name below):
Every consent also asks for userinfo.email, so the server can check who
approved it.
Under Clients, Create client of application type Desktop app,
and download its JSON (its installed block holds the client_id and
client_secret). Keep the file private: save it as oauth-client.json in
the state directory, or point GOOGLE_OAUTH_CLIENT_FILE at it.
Name your accounts, since the server checks each consent against the address of its label, then make each grant from your assistant (First run):
health. Every grant should refresh as the address you meant, with the
scopes you ticked, and every API it checks should answer. Under config it
says where each setting came from: a variable, or what setup saved.gmail,
calendar, drive, editors, tasks, contacts or meet), open the
URL it returns, and approve as the address it names. The browser then fails
to load http://localhost:8123/?state=...&code=..., as expected: nothing
listens there. Within 15 minutes, copy the whole address from the address
bar and give it to your assistant for complete_consent. The product uses
the grant from its next call, with no restart.Drive holds one grant: setup asks which account's Drive the Drive tools
should reach, and consents drive for that one. That account's Docs, Sheets
and Slides can share it (GOOGLE_EDITORS_DRIVE_ACCOUNT=personal); every other
account consents editors for its own.
From a shell, npx -y @foreverworks/mcp-google --health [gmail|calendar|drive|editors|tasks|contacts|meet]
prints one line per account and grant and exits with the worst line's code,
for a timer. With no product named, it starts with CONFIG: lines saying
where each setting came from.
read changes nothing in your accounts (the download tools save a local
copy); write changes something in one of them. With GOOGLE_TOOLSETS
set, only the tables of the toolsets loaded apply; the accounts
and consent tools are always there.
Every tool takes account, a label from list_accounts, except Drive's (Drive
holds one grant), list_accounts, complete_consent and
editors_api_reference. The reads that make sense across accounts
(search_threads, agenda, free_busy, find_time, list_calendars,
list_tasks, list_task_lists, find_people and health) read every
account when none is named; any other read uses the product's default
account. A write has no default, because mail or an event made as the
wrong identity goes out under that identity.
On any Drive file (a Doc, a Sheet, a deck, a PDF), acting as a Docs, Sheets and Slides account.
A failure comes back as {"error": {"kind", "message", "remedy"}}, and the
remedy names the next step.
config: "credentials at ... are missing or unparseable", "Drive has no
grant", "no mailbox is set up" or "no calendar grant for "work"" (the same for
other products). Run setup again and choose that product and account, or make
the grant from your assistant (First run); the message lists the
accounts that have one.
config: "no address is known for "work"". Nothing has recorded which
Google account work stands for yet. Run setup with that label: its first
approval records the address. Or add work=<address> to GMAIL_ADDRESSES.
""work" is not a mailbox here" means GMAIL_MODIFY_ACCOUNTS is set and does
not list it: add work=<path>. "no OAuth client is known" means setup has not
saved one and GOOGLE_OAUTH_CLIENT_FILE is not set.
setup: "it is a Web application client". The client was created with the wrong type. In Clients, create another of type Desktop app, download its JSON, and give setup that file.
setup: Publish app is greyed out. Google wants the App domain on the Branding page first: a home page, a privacy policy link and the domain they are on, saved. Setup prints values you can use.
setup waits for the client file and nothing happens. Your browser saved it somewhere other than your Downloads folder, or you closed Google's dialog before downloading it. Type the file's path; if you have none, create another Desktop app client, since Google shows a secret only once.
input: "no consent is waiting for that state". The consent expired
after 15 minutes, was already completed, or was begun by a copy of the server
with another state directory. Begin again; each consent URL works once.
auth with code wrong_account or insufficient_scope at consent. You
approved as another address or left a box unticked; nothing was saved. Begin
again as the address named, and tick every box. On a later call,
insufficient_scope means the grant lacks what that call needs (filters need
gmail.settings.basic): consent the product again.
auth with code readonly_grant. The mailbox runs on a read-only grant
from GMAIL_ACCOUNTS, so writes refuse before any request. Consent gmail
for it.
auth with code invalid_grant. The refresh token expired or was
revoked. Consent the product again; if the app is in Testing, publish it to
stop the weekly expiry. A read-only grant from GMAIL_ACCOUNTS is renewed by
whatever made it. deleted_client means the OAuth client itself is gone from
the Cloud console.
api with reason SERVICE_DISABLED or accessNotConfigured. Enable the
API the remedy names in the Cloud project of the grant's OAuth client.
api with status 403 on a file. The account cannot open or change it:
check it is shared with that account. On the editors scopes alone, Drive
lets the client copy only files it created or opened, so
create_deck_from_outline cannot copy a template made by hand; run that
account on Drive's grant (GOOGLE_EDITORS_DRIVE_ACCOUNT).
api with reason outcome_unknown. A write failed after it may have
reached Google (a dropped connection, a 5xx), so it was not retried. Look
first (Sent or Drafts, agenda, list_tasks, read_document, read_rows,
read_deck), and repeat it only if it is not there.
api with reason stale_revision. The document changed since it was
read: read it again and redo the edit.
api with status 404 from list_history. Gmail expired that
historyId: search again with search_threads, and take a new anchor from
health.
quota. Google's per-minute quota held through every retry. Wait a
minute.
ambiguous, with candidates. Two Drive objects answer to that path.
Call again with file_id, one of the ids listed.
<root>/<label>/credentials.json on every call,
and so does Gmail when GMAIL_MODIFY_ACCOUNTS is unset, so a new consent
needs no restart.refresh_token, client_id,
client_secret, token_uri, scopes, account). A stored access token is
ignored: the server refreshes under a lock, so copies sharing a state
directory refresh once.health reads each grant's
real scopes, client and address from Google's tokeninfo, and fails a
read-only Gmail grant that has grown a write scope.prompt=consent (a refresh token every
time), with login_hint set to the account's address. A grant approved as
another address, missing a required scope, or without a refresh token is
refused with nothing written; an optional scope may be left out. Only setup
may consent an account no address is known for yet, because it shows the
person who approved; that address is then the account's. Waiting
consents and grants are written with mode 0600, a replaced grant is kept as
.bak, and no token appears in a result.path inside the server's
file roots (MCP_FILE_ROOTS), or content_base64 with the source's
sha256 from a script, never typed by a model. Capping them at 30 MiB
together lets a message slightly over Gmail's 25 MB get Gmail's own refusal,
and uploads nothing far beyond it.invoice.pdf becomes invoice (2).pdf). Gmail's "download all
attachments" zip silently leaves out parts keyed by message id, so
harvest_attachments walks each message's MIME tree instead.bodySource). Gmail links use
?authuser=<address>, because /u/0/ depends on sign-in order.search_threads fetches thread metadata 16 at a time, only the
headers a summary reads: Gmail's batch endpoint runs its sub-requests one
after another, and measured slower.Busy time comes from events, not from freebusy.query, which does not
accept the calendar.events scope and cannot tell a tentative block or an
all-day event's day. One rule (calendar/domain/events.ts) serves the
agenda's conflicts, free_busy and find_time:
attendees) comes from
freebusy.query, asked through every account; someone nobody can see is
unknown, never free.2026-09-29 is a whole day, and find_time works one local day
at a time, so 09:00 stays 09:00 across a DST change.scope: "series". meet: true sends a request id made for that
write, so a retry makes one Meet call. Focus time and out of office are
checked against Google's rules (primary calendar, not all day, no guests,
always busy), and decline nothing unless auto_decline says so: every
decline is mail to an organiser.resolve_path reports both ids, and move_file refuses to create
such a pair. A name may contain / (Meet writes folders like
Weekly sync - 2030/01/15) and is then reachable only by id. Names created
on macOS are often stored in NFD, so every lookup asks for both spellings.upload_file compares Drive's own checksum
(or the bytes read back) with the source and takes back a difference (a
replacement's new revision deleted, a new file trashed); download_file
checks before writing anything. A converted upload has no bytes to compare,
so the check is that Drive made the Google type asked for.The operations (markdown sections, rows keyed by a header, decks from an
outline) do the arithmetic that goes wrong (Docs' UTF-16 indices, Sheets' grid
coordinates, Slides' object ids) in tested pure functions. The full APIs
(get_*, find_in_document, batch_update_*) reach the rest.
batchUpdate pinned to the
revision it was computed from, or a Sheets batchUpdate that applies whole
or not at all, never retried once it may have reached Google. A file can be
given by its id or its URL.src/<product>/domain/discovery.json (refresh it with
npx tsx scripts/refresh-discovery.ts): kinds, fields, types, enum values,
read-only fields and field masks, with the nearest right name for a typo.
Every problem comes back in one refusal, and nothing is sent.
editors_api_reference reads the same document, so it describes exactly
what the check accepts, where a JSON Schema of Sheets' requests alone would
load hundreds of kilobytes into every session.get_document shows each element's [startIndex, endIndex), with
one U+FFFC per index a non-text element takes. A batch that names an index
needs expected_revision (refused if the document moved on) or
target_revision (Docs carries the positions over later edits).
edit_document_section refuses a section holding what markdown cannot carry
(an image, a footnote: read_document counts them as notShown) unless
drop_hidden is true. A regex in find_in_document runs in a fresh
JavaScript context under a 1.5 second limit, so a backtracking pattern
cannot stall the process.read_rows reads dates in the sheet's time, and a currency
cell as {value, amount, formatted}, amount its exact decimal string.
Writes take "=..." as a formula, "YYYY-MM-DD" as a date and
{"amount": "12.50"} as a number, refused when a double cannot hold it
exactly.images (name to file path) goes to the
account's Drive, shared by link for the batch, then unshared and trashed
whatever the outcome; the result says what became of each copy.include_completed also shows tasks completed in Google's own
apps, which the API otherwise hides.unavailable, never read as nobody.list_meetings finds a calendar event's meeting by its Meet code
(read with the account's Calendar grant) and, for one occurrence, the
sitting that started within an hour of it. Transcripts and notes are Google
Docs, so read_document opens them; get_transcript reads one as
[0:12:05] Ana Popescu: ..., naming each speaker from the participants.The smoke scripts in scripts/ drive the built server (or a running one, with
MCP_URL) against real accounts; those that write take SMOKE_ACCOUNT and
clean up after themselves.
127.0.0.1 itself; a consent begun from your assistant (begin_consent)
has the redirect address copied back by hand, since a server shared over
HTTP cannot listen on your computer's loopback.read_doc reads a Sheet as CSV of its first tab (Drive's export has no
tab selector); read_rows reads any tab.=IMAGE() formula needs a link that stays public).unavailable.free_busy and find_time over at most 62 days.Searched 2026-10-15. Google runs its own servers, and two community servers are maintained and broad:
batchUpdate.
docs/google-gaps.md compares them tool by tool.googleworkspace/cli, Google's command line, has dropped its MCP mode;
its Gemini CLI extension gemini-cli-extensions/workspace is a stdio
server for one signed-in account.workspace-mcp on PyPI: stdio, or Streamable HTTP with OAuth 2.1 for
many users; more than 120 tools over twelve products, including Forms,
Tasks, Chat, Contacts and Apps Script; each call acts for one account.@aaronsb/google-workspace-mcp on npm: stdio, an OAuth token per
account on local disk, so several accounts sit side by side; Gmail,
Calendar, Drive, Docs, Sheets, Tasks, Meet and Contacts, not Slides.The community servers reach more products. This one exists for what none of
them offers: a mail search, the agenda (with conflicts between accounts) and
free/busy read every account in one call, and a write has no default account;
Gmail syncs from a historyId; Drive has a change cursor and revisions; and
Docs, Sheets and Slides come both as operations and as each API's full
batchUpdate, checked against the API's schema before sending, a Docs edit
pinned to the revision it was computed from.
来源:servers/google/README.md,提交 7b93f2f
Add a chart
A chart over a data range: the first column is the domain (x axis, pie labels), the other columns (or series_columns) the series.
type必填titleaccount必填headersdata_range必填anchor_cell必填series_columnsspreadsheet_id必填Comment on a file
A new comment thread on a Drive file, as the account. `quoted` shows the text it is about beside it. Google Docs shows a comment made through the API on the file, not anchored to text (Google's limit); `anchor` is for file types whose viewer reads one. Everyone with access to the file sees it.
anchorquotedaccount必填content必填file_id必填Agenda
Events across EVERY account at once, in time order, for a window: today and the next days by default. Also returns `conflicts` (busy events that overlap, including across accounts, e.g. a work meeting over a dentist appointment), `probableDuplicates` (one appointment booked into both accounts as two events) and `pendingInvites` (invitations not yet answered). Recurring events are expanded into their instances; an event seen through both accounts is listed once, with `alsoOn`. Declined events are left out unless asked for. Each event carries the account, calendarId and eventId that get_event, update_event, delete_event and respond_to_invite need. include_tasks adds `tasksDue`: the Google Tasks not yet done that fall due on the window's days (a task has a due date, never a time).
todaysfromlimitqueryaccountcalendarsinclude_tasksinclude_declinedAppend rows
Rows after the last one holding data, keyed by the header, formatted like the row above. One atomic batch.
rows必填sheetaccount必填header_rowspreadsheet_id必填Append to a Google Doc
Markdown added after the document's last paragraph, in one batch.
tabaccount必填markdown必填document_id必填expected_revisionAppend rows after a table
Rows after the table Sheets finds at an A1 range (values.append), as new rows (INSERT_ROWS) or over empty ones (OVERWRITE). Returns where they went. Not retried after a lost answer, since a retry would add them twice. append_rows is the variant keyed by a header row.
range必填values必填account必填insert_datavalue_inputinclude_valuesspreadsheet_id必填major_dimensionApply Docs API requests
Any Google Docs API batchUpdate: text, styles, bullets, tables (insert, merge, row and column, cell style), images by URL, headers, footers, footnotes, page and section setup, named ranges, tabs, replace all text, and the rest; local images through `images`. One atomic batch, checked against the API's schema before anything is sent (a wrong field is refused with the nearest right name). Requests apply in order, each to the document as the ones before left it: work from the end of the document backwards so earlier indices stay valid. A batch that names an index needs expected_revision (refused if the document changed) or target_revision (Docs carries the positions over later edits), from get_document or find_in_document. In a tab other than the first, put tabId in each location and range. Returns the new revisionId and the replies that carry ids or counts, by request position.
imagesaccount必填requests必填document_id必填target_revisionexpected_revisionApply Slides API requests
Any Google Slides API batchUpdate: slides (create, duplicate, reorder, delete, background), shapes, text boxes, images (by URL, or local files through `images`), videos, lines, tables (rows, columns, merges, cell and border styles), Sheets charts, text and its styles, bullets, replace all text or shapes with images, transforms, z-order, alt text and the rest. One atomic batch, checked against the API's schema before anything is sent. Ids you choose for new objects (5 to 50 characters, starting with a letter or _) can be referred to by later requests in the same batch. expected_revision (from get_presentation) refuses the batch if the deck changed. Returns the new revisionId and the replies that carry ids, by request position.
imagesaccount必填requests必填presentation_id必填expected_revisionApply Sheets API requests
Any Google Sheets API batchUpdate: sheets (add, duplicate, delete, properties), rows and columns (insert, delete, move, resize, group, hide), cells (values with formats, repeat a format, borders, merges, copy/cut/paste, sort, find and replace, data validation, autofill), conditional formatting, filters and filter views, protected, named and banded ranges, charts, slicers, tables, pivots (as cell data) and developer metadata. One atomic batch, checked against the API's schema before anything is sent. Where a request takes a GridRange, GridCoordinate or DimensionRange, A1 naming the sheet works too ("Sheet1!A1:C10", "Sheet1!B3", "Sheet1!3:5" for rows, "Sheet1!B:D" for columns); a sheet added in the same batch is named by the sheetId set in its addSheet. Colours are {red, green, blue} from 0 to 1. Returns the replies that carry ids or counts, by request position.
account必填requests必填spreadsheet_id必填Begin a Google consent
Start granting one product access to one account: gmail (its own gmail.modify grant), calendar, editors (Docs, Sheets, Slides), drive (Drive's one grant), tasks (Google Tasks), contacts (contacts, saved addresses and a Workspace directory, read only) or meet (Meet records and transcripts, read only). Returns the URL to open in a browser, where the user approves as the account named. The redirect then fails to load; pass the URL it tried to complete_consent within 15 minutes. No token ever leaves the server.
grantaccount必填product必填Clear cell values
Empty the values of several A1 ranges (or the cells data_filters choose), keeping their formatting, validation and notes. Returns the ranges cleared.
rangesaccount必填data_filtersspreadsheet_id必填Complete a Google consent
Finish a consent from the URL the approval redirected to (http://localhost:...?state=...&code=...). The grant is checked (the right account, every scope ticked, a refresh token) and saved where the product reads it, and the product uses it from the next call. Returns what was granted, never a token.
redirect_url必填Complete task
Mark a task done, or open again with completed: false. A task already in that state is left as it is.
account必填task_id必填completedtask_listCopy a file
Copy one file to a folder, retaining native Google formats and formulas. Does not copy folders, comments or version history. Refuses existing names; inspect the destination after an uncertain response before retrying. Original is unchanged.
namefile_id必填destination_id必填expected_modifiedCopy a sheet to another spreadsheet
One sheet, with its formats, charts and validation, copied into another spreadsheet (or the same one when destination is empty). It arrives last, titled "Copy of <title>"; returns its sheetId and title.
sheetaccount必填spreadsheet_id必填destination_spreadsheet_idCreate a deck from an outline
Copy a template deck through Drive, then add one slide per outline entry from the named layout, filling its title/subtitle/body placeholders and speaker notes, and delete the template's own slides unless kept. The outline is checked against the template before anything is copied.
title必填account必填outline必填folder_idfolder_pathtemplate_id必填keep_template_slidesCreate a Google Doc
A new Google Doc from markdown, in a Drive folder or My Drive's root. Returns its id and link.
title必填account必填markdownfolder_idfolder_pathCreate draft
Save a NEW message as a draft. The default path for anything addressed to someone: nothing leaves the mailbox, and the result carries the draft's webUrl for the user to review and send. For an answer to an existing message use reply (it drafts by default and threads properly), not this.
cctobccfromaccount必填subjectbody_htmlbody_textattachmentsCreate event
Add an event to one account's calendar. Needs title and start; a timed event with no end lasts an hour. Times without an offset are in UTC. Guests are NOT emailed unless send_updates says so. meet: true gives it a new Google Meet link. event_type makes focus time or an out of office block instead of an appointment (title optional for those).
endbusymeetstarttitleaccount必填locationattendeesevent_typerecurrencecalendar_idchat_status另有 6 个Create filter
Create a Gmail filter for mail that arrives from now on. Actions are labels, by name or id: add a label to file it; remove INBOX to skip the inbox, UNREAD to mark it read; add STARRED or IMPORTANT. Adding TRASH or SPAM needs discard: true, since such mail is never seen. No forwarding. It does not touch mail already there: the result's filter.query is the search to give modify_labels_matching for that. Gmail has no filter update; to change one, create the new one and delete the old. Needs the gmail.settings.basic scope on the account's grant, and says so if it is missing.
toaddfromqueryremoveaccount必填discardsubjectnegated_queryhas_attachmentCreate a folder
Create a folder and every missing folder above it, in one call. Returns which levels it had to create, so a typo shows up as a folder you did not expect to be new.
path必填Create label
Create a user label. Nest it under another with a slash in the name, e.g. 'Clients/Acme'.
name必填account必填text_colorbackground_colorlabel_list_visibilitymessage_list_visibilityCreate a blank deck
A new, blank Google Slides deck in a Drive folder or My Drive's root, to build with batch_update_presentation. Returns its id, link, revisionId and the object id of the title slide Slides gives every new deck.
title必填account必填folder_idfolder_pathCreate a spreadsheet
A new Google Sheet, optionally with named sheets and bold, frozen header rows, in a Drive folder or My Drive's root.
title必填sheetsaccount必填folder_idfolder_pathCreate task
Add a task to one account's list. Needs a title; notes and a due date are optional. parent makes it a subtask of another task in the same list; previous places it after that sibling (first otherwise).
duenotestitle必填parentaccount必填previoustask_listCreate task list
A new Google Tasks list in one account; returns its taskListId.
title必填account必填Delete a comment or reply
Delete a comment thread with its replies, or one reply with reply_id. Drive lets an account delete only what it wrote (owners excepted).
account必填file_id必填reply_idcomment_id必填Delete draft
Delete a draft permanently (drafts do not go to Trash). The draft's message is gone with it.
account必填draft_id必填Delete event
Delete an event (an instance id from agenda deletes that one occurrence; a series id, every occurrence, is refused unless scope is "series"). On an event someone else organised this removes it from this calendar only; to say no, use respond_to_invite with declined.
scopeaccount必填event_id必填calendar_idsend_updatesDelete filter
Delete a Gmail filter by id (list_filters). Mail it already filed keeps its labels.
account必填filter_id必填Delete label
Delete a user label, given by id or name. It is removed from every message that carries it; the messages themselves are untouched. System labels are refused.
label必填account必填Describe one file
Everything Drive reports about a single file or folder, by id or path.
pathfile_idDownload a file from Drive
Save a file from Drive into /home/sandbox/.local/state/mcps/google/drive/downloads, which you can read, and prove it: the bytes are checked against Drive's own checksum before anything is written, so a damaged download is never saved. For a file no local copy has yet, or one known only by its id. A Google Doc, Sheet, Slides deck or Drawing has no bytes and is exported instead (a Doc as pdf, a Sheet as xlsx, Slides as pptx, a Drawing as png, unless format says otherwise). An earlier download of the same name in that folder is replaced. Returns the file with the saved path, size, sha256, md5 and verifiedBy (exportedAs for a Google file).
pathformatfile_idfilenamesave_dirSave an old revision
One revision of a file into the downloads folder: a file with bytes as it was, checked against the revision's MD5; a Google file exported (a Doc as PDF unless `format` says otherwise). Returns the path, size and sha256. To roll back, upload it as a new version.
formataccountfile_id必填filenamesave_dirrevision_id必填What changed since the cursor
Every file created, edited, moved, trashed or removed since the cursor, and a new cursor to use next time. Only the delta comes back, so this costs the same whether the Drive holds 20 files or 20,000. Call it again while exhausted is false to drain the backlog.
limitcursor必填Edit a comment or reply
New text for a comment, or for one of its replies with reply_id. Drive lets an account edit only what it wrote.
account必填content必填file_id必填reply_idcomment_id必填Replace a section of a Google Doc
Replace everything under one heading (its subsections included) with markdown, keeping the heading. Read the section with read_document first and pass its revisionId: the edit is one batch, pinned to that revision. Headings in the new body must be deeper than the section's own. Refused when the section holds images, footnotes or other things read_document does not show (drop_hidden: true deletes them), and for an empty body (clear: true empties the section). Returns the document's title and the section's size before and after, in characters of markdown.
tabclearaccount必填section必填markdown必填document_id必填drop_hiddenexpected_revision必填Docs, Sheets and Slides API reference
What a Google Docs, Sheets or Slides batchUpdate request takes, from the API's own schema (the revision batch_update_document, batch_update_spreadsheet and batch_update_presentation check against): each field's type, allowed values and meaning, with the types it refers to expanded `depth` levels down (`more` lists the rest by name). Name a request kind (updateTextStyle, repeatCell, createShape) or any type (TextStyle, CellFormat, PageElementProperties); with no name, every request kind and its one-line summary. Kinds marked Developer Preview need the Cloud project in Google's preview program.
api必填namedepthFill {{tags}} in a deck
Replace every {{tag}} with its value (exact case) across the deck, or only the slides named. Reports how many of each were found.
values必填account必填slide_idspresentation_id必填Search Drive
Search the whole Drive without listing it. Combine any of name_contains, full_text, mime_type, parent_id and modified_after; they are ANDed. This is the tool to reach for instead of walking folders, or a local copy of the Drive, which costs a full tree scan for the same answer.
limitfull_textmime_typeparent_idname_containsmodified_afterinclude_trashedFind text in a Google Doc
Every place a text appears in one tab of a Google Doc (body, headers, footers and footnotes unless segments is body), as ranges [startIndex, endIndex) to use in batch_update_document (with tabId and, outside the body, segmentId), each with its paragraph's range and named style. Returns the revisionId the ranges are right for. With regex, text is a JavaScript regular expression (run under a time limit); a match never crosses a paragraph.
tabtext必填regexaccountsegmentsmatch_casewhole_worddocument_id必填max_resultsFind people
Find a person's email address by name, across every account at once: each account's contacts, the addresses Gmail saved from mail it sent or received ('other'), and a Workspace domain's directory. The query matches the start of a name, an address, a phone number or an organisation. One entry per person, merged by address, with every account and source it was found in; a source an account cannot read is listed under `unavailable` with the reason. Use it before addressing a draft or an invitation to someone named.
limitquery必填accountsourcesFind time
Candidate slots of `duration_minutes` across EVERY account (and optional `attendees`), inside working hours (default Mon-Fri 09:00-18:00 UTC), after a minimum notice, clear of existing events plus buffers, on a step grid, ranked earliest first or with mornings/afternoons first. Returns `slots` (overlapping candidates, e.g. 09:00 and 09:30 for an hour) and `ranges` (the free stretches they come from). Tentative events block time unless `tentative_is_free`. If some busy time could not be read, `complete` is false and `unknown` says what.
todaysfrompreferaccountattendeescalendarshours_endtime_zonehours_startmax_resultsstep_minutes另有 6 个Format a range
Number format, bold/italic, colours, alignment, wrapping, borders and frozen rows/columns for a range. Only what is given changes.
boldwraprange必填italicaccount必填bordersbackgroundforegroundfreeze_rowsnumber_formatfreeze_columnsspreadsheet_id必填另有 2 个Forward
Forward a message WITH its attachments, under Gmail's 'Forwarded message' block, with an optional note above it (body_text / body_html). Creates a DRAFT unless send is true. Extra attachments can be added.
cctobccfromsendaccount必填subjectbody_htmlbody_textmessage_id必填attachmentsinclude_attachmentsFree/busy
When the user is busy across EVERY account in a window, per calendar, plus one merged, de-duplicated `busy` timeline that also covers any `attendees`. Busy means: not cancelled, not "show as available", not declined; tentative events and "maybe" answers count as busy and are flagged `tentative`; an all-day event left as busy blocks its whole day. Anything that could not be read is listed under `unknown` and `complete` is false.
todaysfromaccountattendeescalendarsDownload attachment
Download one attachment to disk by message_id + attachment_id (both come from get_thread). This is the capability Google's own Gmail MCP server does not have: it reports an attachment's name and id and gives you no way to fetch the bytes. Returns the path, size and sha256; a download whose size differs from the one Gmail reports for the part is refused and nothing is saved. A different file already saved under the name is kept, and this one is saved as "name (2).ext".
accountfilenamesave_dirmessage_id必填attachment_id必填Read a Google Doc's structure
A Google Doc's structure with the indices batch_update_document needs: every tab, and for one tab its body as elements (paragraphs with named style, heading id, bullet, styled runs and objects such as images or footnote marks; tables with each cell's range and content; section breaks; tables of contents), each with range [startIndex, endIndex). A paragraph's `text` holds one U+FFFC per non-text index, so offset k of text is index range[0]+k; its newline is range[1]-1. Styles are shown short ("11pt", "#1a73e8"); in requests write {magnitude: 11, unit: "PT"} and {color: {rgbColor: {red, green, blue}}} (0 to 1). `parts` adds headers, footers, footnotes, lists, named ranges, objects (image sizes and sources) and styles (page setup, named styles); `notShown` says what exists beyond them. A long body is cut at an element (`nextIndex`: read on with start_index). format raw returns the API's JSON, narrowed by `fields`. Returns revisionId for expected_revision. For prose, read_document's markdown is cheaper.
tabpartsfieldsformataccountend_indexmax_charsdocument_id必填start_indexsuggestionsGet draft
One draft: its message (headers, Bcc included, bodies and attachments) and its webUrl.
detailaccountdraft_id必填Get event
One event in full: description, guest list with each answer, reminders, meeting link, recurrence.
accountevent_id必填calendar_idGet message
Fetch a single message by id. See get_thread for the detail levels and the account rule.
detailaccountmessage_id必填Get messages
Fetch several messages of one mailbox in one call, up to 25 ids, in the order given (a repeated id once). Use it after list_history or a search when you need the bodies of messages from different threads. A message that cannot be read comes back as {id, partial: true, reason} in its place and the others still arrive. See get_thread for the detail levels and the account rule; 'metadata' keeps a long list cheap.
detailaccountmessage_ids必填Read a deck's structure
A Google Slides deck's structure with the object ids batch_update_presentation needs: per slide its layout, every element (shapes with type, placeholder and full text, images, tables cell by cell, lines, videos, Sheets charts, groups) with size and transform, and the speaker notes' shape id; plus layouts, masters and the page size. A shape's text is exact, so offset k is index k for insertText and text ranges. Sizes show as "3000000 EMU"; requests take {magnitude, unit}. A long deck is cut at a slide (`nextSlide`: read on with from_slide). format raw returns the API's JSON, narrowed by `fields`. Returns revisionId.
fieldsformataccountmax_charsslide_idsfrom_slidepresentation_id必填Read a spreadsheet's structure
A spreadsheet's structure with the ids batch_update_spreadsheet needs: per sheet its sheetId, size, frozen rows and columns, merges, conditional format rules (with their index), basic filter, filter views, protected and banded ranges, charts, slicers, tables and row/column groups, plus named ranges; ranges as A1. No cell data (get_values, read_rows). format raw returns the API's JSON for `ranges`, with grid data if asked, narrowed by `fields`: the way to read cell formats, notes, validation and pivots.
fieldsformatrangesaccountmax_charsdata_filtersspreadsheet_id必填include_grid_dataGet thread
Fetch one thread with all its messages, their attachment metadata and their bodies. Thread ids are per-mailbox: pass the account that search_threads reported alongside the id.
detailaccountthread_id必填Slide thumbnails
A PNG thumbnail URL per slide, rendered by Google. The URLs expire after about half an hour.
sizeaccountpresentation_id必填Get transcript
A Meet transcript as text, one line per thing said: "[0:12:05] Ana Popescu: ...", the time counted from when the transcript began. Long ones come in parts of about max_chars; pass nextPageToken back to read on. The transcript is the name list_meetings gives (conferenceRecords/.../transcripts/...).
accountmax_charspage_tokentranscript必填Read cell values
Values of several A1 ranges in one read, as Sheets renders them (FORMATTED_VALUE), as numbers (UNFORMATTED_VALUE: a double, so read_rows is the tool for money) or as formulas (FORMULA), chosen by A1 ranges or by data_filters. A large answer is cut at a row (`totalRows` says how many there were).
rangesaccountmax_charsdata_filtersvalue_renderspreadsheet_id必填major_dimensiondate_time_renderHarvest attachments for a query
Every attachment matching a Gmail query, downloaded to a folder in ONE call, with a manifest. Use it for a month of invoices ('has:attachment after:2026/08/01 before:2026/09/01') instead of walking threads and calling get_attachment per file. Do NOT use Gmail's own 'download all attachments' zip as an alternative: it is keyed by thread id and silently omits parts keyed by message id. Returns counts (threadsMatched, attachmentsFound, savedCount) so the harvest can be reconciled against Gmail's own has:attachment count, each saved file with its size and sha256, plus a per-file failure list. Files are named <message id>-<filename>; two of one name both survive. A client that asks for progress hears each attachment saved, out of how many; cancelling stops the harvest, which then ends as cancelled.
queryaccountsave_dirextensionsmax_threadsmax_attachmentsHealth
Check that every grant is alive, per product and per account. Under `gmail`, per grant: the mailbox each credential resolves to, the scope Google actually GRANTED (not the one credentials.json declares), whether it can write, and the OAuth client the live token belongs to; an account may hold its own gmail.modify grant and a gmail.readonly one, and `activeGrant` is the one the tools use. Under `calendar`: that the grant refreshes, which account it resolves to (the consent screen offers every account signed in), and whether it carries the scopes the tools need. Under `drive`: which account the grant acts as and the storage used. Under `editors` (Docs, Sheets, Slides), per account: the address, the granted scopes, and whether each of the three APIs is enabled in the grant's Cloud project. Under `tasks`, `contacts` and `meet`, per account with a grant: the address, the granted scopes, and whether the API answers (`disabled` when its Cloud project has not enabled it); contacts also says which sources it reads. Under `config`: where the state directory, the OAuth client, the mailboxes and each account's address come from (a variable, or what setup or a consent saved; a variable that is set wins). Checks EVERY account by default. Run this before concluding the server is broken, and before retrying a write that refused.
accountLink existing text cells
Add or replace hyperlinks on existing plain text cells in one atomic batch. Keeps their values, validation and all other formatting. Row and column are 1-based. Every cell must still contain expected_text; formulas, rich text and chips are refused before any write.
links必填sheet必填account必填spreadsheet_id必填List accounts
The Google accounts this server reaches, per product. Start here: every other tool takes one of these labels. Under `gmail`: the mailboxes, which one a tool uses when no account is given, and which grant each runs on: `modify` (its own; the write tools work) or `readonly` (a read-only grant; the write tools refuse). Under `calendar`: the accounts whose calendars it reaches, the address each grant must resolve to, and the time zone. Under `drive`: which grant Drive runs on (its own once begin_consent made one, else an rclone remote's when one is configured). Under `editors`: the accounts Docs, Sheets and Slides can act as (one may run on the Drive grant; any other needs a grant made with begin_consent). Under `tasks`, `contacts` and `meet`: the accounts with a grant for Google Tasks, for contacts and the directory, and for Meet's records. Says nothing about whether a grant is alive; that is health, which costs a round trip to Google.
无需输入参数。
List calendars
Every calendar each account can see (its own, shared ones, subscriptions, holidays), with its id, the account's access to it, and whether agenda reads it by default.
accountList a file's comments
The comment threads on a Doc, Sheet, deck or any Drive file, each with its author, time, text, the text it quotes, whether it is resolved, and its replies (with any resolve or reopen action). Counts the open and resolved threads.
accountfile_id必填max_resultsmodified_afterinclude_deletedinclude_resolvedList drafts
The account's drafts, newest first, with recipients, subject, snippet and each draft's webUrl.
queryaccountpage_tokenmax_resultsList filters
The mailbox's Gmail filters: criteria, the labels each adds and removes (by name), and `query`, the search its criteria amount to, for applying it to mail already there with modify_labels_matching.
accountList a folder
The direct children of one folder. Give file_id or path; empty path means the root of My Drive. Google Docs come back with isNative true and bytes null, because a Doc has no stored bytes.
pathlimitfile_idinclude_trashedList history
Messages added since a historyId: incremental sync instead of re-searching the same window. Take the anchor from health's historyId, store it, pass it back next run. Anchors are per-mailbox, so keep one per account. Gmail expires old anchors: a 404 here means the anchor is too old and a full search_threads is needed to re-baseline.
accountpage_tokenmax_resultsstart_history_id必填List labels
List Gmail labels (system and user-defined) for one account.
accountList a deck's layouts
A deck's (or template's) layouts, by name, and the placeholders each has (TITLE, SUBTITLE, BODY, ...).
accountpresentation_id必填List meetings
The Google Meet meetings one account took part in, each with its transcripts, smart notes (Gemini's notes) and recordings, as Meet records them: for a calendar event (event_id from agenda: its Meet call, and for one occurrence the sitting that started within an hour of it), for a Meet link or code (meeting), or else for the last days (at most 30: Meet keeps records 30 days). A transcript or notes is a Google Doc: its document id opens with read_document; get_transcript reads a transcript as lines with who said what. Reading an event needs the account's calendar grant too.
dayslimitaccountmeetingevent_idcalendar_idWho has access to a file
Every permission on a Drive file: each person, group, domain or link with its role, expiry and id, whether it comes from a shared drive, and the link sharing in one line. Read it before share_file, update_permission or remove_permission.
accountfile_id必填List a file's revisions
A Drive file's revisions, oldest first: id, time, who made it, size and checksum for files with bytes, whether it is kept forever or published, and for a Doc, Sheet or deck the formats an old revision can be saved as with download_revision.
accountfile_id必填List a spreadsheet's sheets
A spreadsheet's title, locale, time zone and sheets (id, name, size, frozen rows).
accountspreadsheet_id必填List task lists
Every Google Tasks list of each account (every account by default), with the taskListId the other task tools take; the default list is marked.
accountList tasks
Tasks across every account by default, from every list unless task_list names one, in each list's own order. Open tasks only unless include_completed. due_from and due_to keep the tasks due between those dates (inclusive), which leaves out tasks with no due date. Each task carries account, taskListId and taskId for the write tools, parent when it is a subtask, and its link in Google Tasks. agenda with include_tasks shows the tasks due beside the events.
limitdue_toaccountdue_fromtask_listinclude_completedMark as spam
Report threads or messages as spam: into SPAM and out of the inbox, as Gmail's own button does.
ids必填targetaccount必填Modify labels
Add and remove labels on threads or messages. In Gmail these ARE the everyday actions: archive = remove INBOX; mark read = remove UNREAD (unread = add it); star = add STARRED; important = IMPORTANT. Labels may be given by id or by name, case-insensitively. For threads, ids that failed are listed under `failed` beside the ones changed.
addids必填removetargetaccount必填Modify labels on every match
Add and remove labels on EVERY thread a Gmail search matches, as Gmail's "select all conversations that match this search" does: file a sender under a label and archive it (add the label, remove INBOX), mark old mail read (remove UNREAD). A dry run by default: it returns how many threads match and a sample, and changes nothing. With dry_run false it refuses when the search matches more than `limit`, and otherwise changes every match, listing any thread that failed. To be able to find and reverse a large change later, also add a marker label created for it (e.g. 'cleanup/2026-10').
addlimitquery必填removeaccount必填dry_runMove files
Move one or many files into a folder, optionally renaming a single one. Sources are paths, or "id:<fileId>" to name one directly. Works the same for a Google Doc as for a PDF, which is the reason to use this instead of moving files in a synced local copy: moving a Doc's placeholder there deletes the Doc and uploads a small shortcut file in its place. Call with dry_run first; the plan names every collision.
dry_runsources必填rename_todestination_iddestination_pathMove task
Move a task: under parent (a subtask; top level when omitted), after previous (first among its siblings when omitted), and into another list of the same account with to_list. A repeating task cannot change lists.
parentaccount必填task_id必填to_listprevioustask_listPath of an id
The reverse of resolve_path: where a file sits, as a path, by walking its parents to the root.
file_id必填Read a deck
Every slide's layout, title, other text (tables as rows) and speaker notes, in order.
accountpresentation_id必填Read a Google Doc
Export a Google Doc, Sheet or Slide deck as text and return it. Sheets come back as CSV. A Doc has no bytes to download, and this fetches its words in one request. Binary files are refused on purpose; download_file saves their bytes.
pathformatfile_idmax_charsRead a Google Doc
A Google Doc as markdown (headings, lists, tables, bold/italic/links), with an index of its sections: each heading's stable id and path ("Plan > Risks"). Pass `section` (an id, a path or a unique title) to read one section. Returns revisionId for a later edit's expected_revision. Reads the first tab unless `tab` names another; images, footnotes and the like are left out, and `notShown` counts them.
tabaccountsectionmax_charsdocument_id必填Read rows
Rows as objects keyed by the header row. Values are typed: numbers stay numbers, dates are ISO strings (sheet-local time), and a currency cell is {value, amount, formatted} with `amount` its exact decimal string. Each row has `_row`, its row number. Empty rows are skipped.
limitsheetoffsetaccountheader_rowspreadsheet_id必填Read formulas and linked cells
Sparse cells with entered formulas, shown values, hyperlinks, rich-text links, smart chips and notes. Row and column numbers are 1-based. offset counts physical rows; follow nextOffset until null. Use this before changing a link or formula, rather than inferring it from read_rows display text.
limitsheetoffsetaccountspreadsheet_id必填Remove someone's access
Remove one permission from a file: that person, group, domain or link loses access. Inherited shared-drive access cannot be removed here. It changes who can open the file: do it only on the user's explicit go for this file and these people.
account必填file_id必填permission_id必填Rename a file
Change a file's name in place. Names cannot contain a slash; Drive has no path, only parents.
pathfile_idnew_name必填Reply
Answer a message, threaded properly for every party: the original's threadId, In-Reply-To and References, a 'Re:' subject, and the recipients Gmail's own Reply picks (Reply-To when the original has one, else From; a reply to a message you SENT goes to its recipients). Goes out from the alias the original reached. Creates a DRAFT unless send is true. `to` replaces the computed recipients; `cc` and `bcc` add to them.
cctobccfromsendquoteaccount必填subjectbody_htmlbody_textreply_allmessage_id必填另有 1 个Reply to, resolve or reopen a comment
A reply on a comment thread, and/or its resolve or reopen (`action`), as the account; what the comment box's Reply and Resolve buttons do.
actionaccount必填contentfile_id必填comment_id必填Resolve a path to an id
Walk a path and return the id it names. A path is a QUERY on Drive, not an address: two objects may hold the same name in one folder, and this reports that as an error listing both ids rather than picking one. Use it before any tool that writes. A Drive name may itself contain a slash (Google Meet writes folders like "Weekly sync - 2030/01/15"); those are reachable only by id, which find_files returns.
path必填Respond to invite
Answer an invitation: accepted, declined or tentative. Changes only your own answer. The organiser sees it on the event either way; send_updates=all also emails them.
account必填event_id必填response必填calendar_idsend_updatesFind developer metadata
Developer metadata: key/value tags a program attaches to the spreadsheet, a sheet, or rows and columns (createDeveloperMetadata in batch_update_spreadsheet), which then name those cells in data_filters. One tag by metadata_id, or every tag data_filters match (e.g. [{"developerMetadataLookup": {"metadataKey": "invoice-table"}}]), each with where it is attached as A1.
accountmetadata_iddata_filtersspreadsheet_id必填Search threads
Search threads with Gmail query syntax, e.g. 'from:billing.example.com after:2026/01/01 has:attachment', 'subject:invoice newer_than:30d', 'label:INBOX is:unread'. Searches EVERY registered mailbox by default and tags each result with the account it came from, so a question that does not know which mailbox holds the answer needs one call. Returns summaries; use get_thread for bodies.
queryaccountpage_tokenmax_resultsSend draft
Send an existing draft as it stands. SENDING IS OUTWARD-FACING AND CANNOT BE UNDONE: only send when the user has explicitly approved THIS message (its recipients and its text) in the current conversation. Otherwise create a draft and give the user its webUrl. Returns the sent message's webUrl.
account必填draft_id必填Send message
Send a NEW message immediately. SENDING IS OUTWARD-FACING AND CANNOT BE UNDONE: only send when the user has explicitly approved THIS message (its recipients and its text) in the current conversation. Otherwise create a draft and give the user its webUrl. Prefer create_draft. To answer an existing message use reply, which threads it. Returns the sent message's webUrl.
cctobccfromaccount必填subjectbody_htmlbody_textattachmentsSender breakdown
Who the threads matching a query come from: per sending domain, busiest first, the thread and unread counts, the newest and oldest date, and its busiest addresses. The starting point for sorting a mailbox into labels and filters. A thread's sender is the author of its latest message you did not send. One mailbox per call. A few hundred threads take seconds; past that Gmail's quota allows about 25 threads a second, so a 3000-thread inbox takes about two minutes.
toplimitqueryaccountShare a file
Give a person or group (email_address), a domain, or anyone with the link access to a Drive file, as reader, commenter, writer (organizer roles on shared drives), with an optional expiry. Drive's email goes out only with notify: true, with `message` in it. Making someone the owner needs transfer_ownership: true. It changes who can open the file: do it only on the user's explicit go for this file and these people.
role必填type必填domainnotifyaccount必填file_id必填messagediscoverableemail_addressexpiration_timetransfer_ownershipMint a change cursor
A token meaning "from now on". Keep it, and hand it to drive_changes later. This is the cheap half of keeping anything in step with Drive: one call, no listing.
无需输入参数。
Trash
Move threads or messages to Trash, where Gmail keeps them 30 days. There is no permanent delete here. Returns the ids trashed, and any that failed under `failed`.
ids必填targetaccount必填Move to trash
Send a file to Drive's trash, where it stays recoverable for 30 days. There is deliberately no permanent-delete tool here: the one operation that cannot be undone is the one this server does not expose.
pathfile_idNot spam
Take threads or messages out of SPAM and back into the inbox.
ids必填targetaccount必填Untrash
Bring threads or messages back out of Trash. Returns the ids restored, and any that failed under `failed`.
ids必填targetaccount必填Restore from trash
Take a file back out of the trash. Find it by id; a trashed file no longer answers to its path.
pathfile_idUpdate draft
Change an existing draft. Only the fields you pass change; everything else, including a reply draft's threading, is kept. Passing either body replaces both bodies. Attachments are kept unless you pass a list, and an empty list removes them.
cctobccfromaccount必填subjectdraft_id必填body_htmlbody_textattachmentsUpdate event
Change an event. Only the fields given change; a new start with no end keeps the event's length. On a recurring event, the eventId decides the reach: an instance id from agenda changes that one occurrence, and a series id (every occurrence) is refused unless scope is "series". attendees replaces the guest list, and the result says who that added and removed. Guests are NOT emailed unless send_updates says so. meet: true adds a Meet link to an event without one. An event's type cannot change; a focus time or out of office event takes new auto_decline, decline_message and chat_status.
endbusymeetscopestarttitleaccount必填event_id必填locationattendeesrecurrencecalendar_id另有 7 个Update label
Rename or restyle a user label, given by id or name. System labels (INBOX, SENT, ...) are refused.
namelabel必填account必填text_colorbackground_colorlabel_list_visibilitymessage_list_visibilityChange someone's access
A permission's role or expiry (or its expiry removed). Making someone the owner needs transfer_ownership: true. It changes who can open the file: do it only on the user's explicit go for this file and these people.
roleaccount必填file_id必填permission_id必填expiration_timeremove_expirationtransfer_ownershipKeep or publish a revision
keep_forever stops Drive pruning a revision of a file with bytes. published puts a Doc, Sheet or deck revision on the web for anyone at its publishedLink (publish_auto follows later revisions, published_outside_domain lets people outside the domain read it): only on the user's explicit go.
account必填file_id必填publishedrevision_id必填keep_foreverpublish_autopublished_outside_domainUpdate task
Change a task's title, notes or due date. Only the fields given change, and only when they differ: an empty notes or due clears it. To mark it done use complete_task; to move it, move_task.
duenotestitleaccount必填task_id必填task_listWrite cell values
Values or formulas into several A1 ranges in one call (values.batchUpdate). Returns the cells updated per range (and what they now show, with include_values). write_range is the one-range variant that returns what the cells held before.
data必填account必填value_inputinclude_valuesspreadsheet_id必填major_dimensionUpload a file to Drive
Put a file on Drive byte for byte and prove it: after the upload, Drive's own checksum of what it stored (or the bytes read back, when Drive reports none) is compared with the source's. A difference fails the call and is taken back: a replacement's damaged revision is deleted, a new file is trashed. The file goes as path (a file in your workspace folders (the roots this client shares with the server; without them /workspace/mcp-validate); a bare name is taken from the first) or as content_base64 with its sha256. Never type or paste a file's base64 yourself: a retyped file can arrive changed. Give the path of a file in your workspace folders (the roots this client shares; without them /workspace/mcp-validate), or have a script that read the file send content_base64 with its sha256. The folder is folder_id, else folder_path, else the root. A name already in the folder is refused unless if_exists says what to do. A file given by path keeps its modification time on Drive. Returns the stored file with its link, size, sha256, md5 and verifiedBy. With convert, an Office file (.docx, .doc, .xlsx, .xls, .csv, .pptx, .ppt) becomes a Google Doc, Sheet or deck instead, named without its extension; a converted file keeps no bytes to compare, so the check is that Drive made the Google type, and the result gives the source's size and sha256 under `source`.
pathsha256convertfilenamefolder_idif_existsmime_typefolder_pathcontent_base64Upsert rows by key
Update the rows whose `key` column matches (only the columns given change), append the rest. One atomic batch. A key on two sheet rows is refused.
key必填rows必填sheetaccount必填header_rowspreadsheet_id必填Write a range
Values or formulas into an A1 range that names its sheet ("Invoices!A2:C4"), parsed as if typed (USER_ENTERED): "=SUM(B2:B9)" is a formula, "28/09/2026" a date in the sheet's locale. Returns `before`, what those cells held (formulas as formulas), so the write can be undone by writing it back.
range必填values必填account必填spreadsheet_id必填已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
claude mcp add google -- npx -y @foreverworks/mcp-google{ "mcpServers": { "google": { "command": "npx", "args": ["-y", "@foreverworks/mcp-google"] } }}git clone https://github.com/foreverworks/mcps.git && cd mcpsnpm ci && npm run buildclaude mcp add google -- node "$PWD/servers/google/dist/index.js"npx -y @foreverworks/mcp-google setupclaude mcp add google -e GOOGLE_TOOLSETS=gmail,calendar -e GOOGLE_OAUTH_CLIENT_FILE="<path to OAuth client file>" -e GMAIL_ADDRESSES="<Accounts and their addresses>" -e GMAIL_MODIFY_ACCOUNTS="<Where Gmail grants are kept>" -- npx -y @foreverworks/mcp-google{ "mcpServers": { "google": { "command": "npx", "args": ["-y", "@foreverworks/mcp-google"], "env": { "GOOGLE_TOOLSETS": "gmail,calendar", "GOOGLE_OAUTH_CLIENT_FILE": "/path/to/oauth-client.json", "GMAIL_ADDRESSES": "[email protected],[email protected]", "GMAIL_MODIFY_ACCOUNTS": "personal=/path/to/grants/gmail-personal.json,work=/path/to/grants/gmail-work.json" } } }}