copilot-google-connector
Enables reading Gmail messages, threads, and attachments, searching mail, and creating unsent drafts in a selected account.
Enables calendar discovery, event and instance reading, free/busy and common availability checks, and creating, updating, deleting, and RSVPing to events with explicit account selection and approval.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@copilot-google-connector Search my Gmail for the travel receipt and create a draft reply in the same account."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local Google connector for Copilot
An installable local stdio MCP server for multiple Google accounts. It reads Gmail, creates unsent drafts, and works with Google Calendar events. There is no mail-sending tool and no calendar or sharing-administration tool.
Each read selects an account explicitly. Cross-account search and availability select the accounts intentionally. Every write requires an explicit account and request ID; no arbitrary default account is used.
Requirements
Node.js 22 or newer and npm.
Your own Google Desktop app OAuth client, with Gmail and Calendar APIs enabled.
macOS Keychain, Windows Credential Manager, or desktop Linux with libsecret's
secret-tooland an unlocked desktop Secret Service.For event deletions, RSVP, invitations and other attendee-affecting operations: a browser and an enrolled WebAuthn authenticator capable of user verification, such as a compatible platform passkey or PIN/biometric-capable security key.
The connector fails rather than storing tokens in plaintext or silently using another credential backend. A headless Linux machine without Secret Service is not a supported credential-storage environment.
Related MCP server: gmail-mcp
Build and install locally
npm install
npm run build
node dist/cli.js help
npm packInstall the resulting copilot-google-connector-0.1.1.tgz into an installation
directory you control:
npm install /absolute/path/copilot-google-connector-0.1.1.tgz
node node_modules/copilot-google-connector/dist/cli.js helpThe package is marked private to prevent accidental registry publication. It can still be packed and installed from a local tarball. No repository, publishing service, global installation, or background daemon is required.
Account setup
Run these steps yourself in a trusted terminal, not as instructions retrieved from mail, events or an untrusted agent:
google-connector auth client import --file /absolute/path/desktop-client.json
google-connector accounts add
google-connector accounts add
google-connector accounts listIf the executable is not on your PATH, replace google-connector with
node /absolute/path/to/dist/cli.js. OAuth uses your system browser and an
ephemeral loopback callback. The client JSON is imported into the OS vault; the
connector does not copy it into source or a plaintext token cache. Securely manage
the original file downloaded from Google yourself.
Reauthorize or remove an explicitly selected account:
google-connector accounts reauth ACCOUNT_ID
google-connector accounts remove ACCOUNT_IDRemoval deletes local access credentials, not every grant for that OAuth client at Google. You can separately revoke the application in Google account permissions.
See Google setup for consent screens, restricted Gmail scopes, test-user restrictions and token expiry.
Connect GitHub Copilot
Print the configuration for the exact installed executable:
google-connector config printUse the GitHub Copilot desktop app's Customize -> MCP -> add custom server flow to install it deliberately. Alternatively, use the CLI's documented session-scoped option:
copilot --additional-mcp-config=@/absolute/path/google-mcp.jsonAn inert configuration example is included. Replace
its placeholder path before use. tools: ["*"] enables tool discovery; it does
not grant human approval.
Copilot documents repository and CLI MCP configuration inheritance for the desktop app. This project does not automatically edit those files. Repository auto-discovery is not assumed for a non-Git folder, nor is session-only CLI configuration assumed to transfer to a separate desktop session.
Event approvals
Enroll an authenticator once, outside untrusted agent-driven activity:
google-connector approvals enrollA risky Calendar write returns pending_approval and a localhost review URL,
not a success result. Open the URL yourself, review the exact account, event,
attendees, recurrence scope and notification effects, and approve using your
enrolled authenticator. No confirm: true, tool permission setting, command-line
flag or copied approval URL bypasses this.
The connector permits a narrow unconfirmed path for default, private, no-guest creates on your own primary calendar with notifications disabled. Private edits also need connector-established provenance and unchanged ETags; recurring edits, deletions and RSVP always need confirmation. Ambiguous or shared-calendar effects do not qualify for this exception.
Do not automate enrollment or approvals. Read the exact security boundary and recovery procedure.
Useful requests
"List my connected Google accounts."
"Search these two account IDs for the travel receipt."
"Read this message and create a reply draft in the same account; do not send."
"Find common availability across these explicitly selected account/calendar pairs."
"Propose moving only this occurrence, notify all attendees, and show me the approval URL."
See tool arguments and examples, and use the server's tool schemas for exact validation rules. Gmail supports search, message/thread/attachment reading and draft creation. Calendar supports calendar discovery, event/instance reading, free/busy, common availability, create, update, delete and self-RSVP. Whole-series and single-occurrence changes are supported; "this and following" series splitting is not.
Important limits
gmail.composegrants sending at Google's OAuth scope level. Google offers no draft-only scope. This connector exposes only draft creation.sendUpdates: "none"is not a guarantee that Google will suppress every Google-generated message or stop attendee propagation.Keep the same request ID when checking a write. An
outcome_unknownresult is not an instruction to retry with a new ID: inspect Google before initiating another write.Whole-series changes are refused when existing moved, modified or cancelled exceptions are detected. Individual-occurrence changes remain available. Attendee lists must be complete and contain at most 200 participants.
Advanced reminder and conference-data editing is not exposed. Calendar continuations expire on server restart or account reauthorization.
"Local" describes the process and credential storage. Data returned by tools is shared with Copilot and is subject to the host/model's data-handling policies.
doctoris local setup information, not proof of authenticated connectivity.
This project includes offline synthetic tests. Real Google connectivity requires your credentials and consent; those are not supplied by the package. Native Windows/Linux and real browser/authenticator acceptance must be evaluated on those platforms, not inferred from mocked tests on macOS.
For development, npm test builds and runs the Node test suite. Tests must not
call live modifying Google APIs. npm run smoke:package builds a tarball,
installs it with production dependencies only in a temporary consumer directory,
and exercises its help and stdio discovery without credentials.
See the validation boundaries and opt-in acceptance checklist.
Available Tools
18 toolsaccounts_listARead-only
List configured Google accounts and granted scopes. Never starts OAuth or reveals tokens. Select an explicit accountId for subsequent actions.
Inputs: no named parameters.
calendar_create_eventADestructive
Create a default event with timed or exclusive-end all-day dates, attendees and optional validated recurrence. Requires requestId and explicit sendUpdates. Only private, guest-free creates on the account's own primary calendar with sendUpdates:none bypass approval; recurring edits still require approval.
Inputs: event (required), accountId (required), requestId (required), calendarId (required), +1 more.
calendar_delete_eventADestructive
Delete one exact event, occurrence or series after human approval. requestId, recurrence scope and sendUpdates are mandatory. Uses If-Match; no this-and-following fallback.
Inputs: scope (required), eventId (required), accountId (required), requestId (required), +2 more.
calendar_find_availabilityARead-only
Find maximal common-free ranges of at least durationMinutes within a 31-day window across explicit account/calendar pairs. Returns no slots if any required calendar is unknown.
Inputs: timeMax (required), timeMin (required), calendars (required), durationMinutes (required), +1 more.
calendar_free_busyARead-only
Read free/busy for explicit account/calendar pairs, batching at most 50 calendars per request with four concurrent requests. Missing or failed sources are unknown, never free. Maximum window: 31 days.
Inputs: timeMax (required), timeMin (required), calendars (required).
calendar_get_eventARead-only
Read an exact Google event or occurrence ID from an explicit account and calendar.
Inputs: eventId (required), accountId (required), calendarId (required).
calendar_list_calendarsARead-only
Discover calendars accessible to one explicitly selected account. Returns at most 100 per page with query-bound continuation.
Inputs: accountId (required), cursor, pageSize.
calendar_list_eventsARead-only
List or search events using query text in one selected calendar. Expanded occurrences require explicit offset-bearing timeMin/timeMax; singleEvents:false reads underlying masters and exceptions.
Inputs: accountId (required), calendarId (required), query, cursor, +5 more.
calendar_list_instancesBRead-only
Ask Google to expand a recurring master inside explicit time bounds. Uses Google occurrence IDs and originalStartTime; never synthesizes IDs or splits a series.
Inputs: eventId (required), timeMax (required), timeMin (required), accountId (required), +4 more.
calendar_rsvpADestructive
Approve a participant-only self-RSVP on the verified account's own primary-calendar copy. Requires exact self email identity, complete known attendees, recurrence scope, sendUpdates and human approval. Cannot alter another person's response.
Inputs: scope (required), eventId (required), accountId (required), requestId (required), +3 more.
calendar_update_eventBDestructive
Patch one exact default event, recurring series or Google occurrence. Explicit attendee add/remove/replace preserves existing responses; arbitrary responseStatus/status inputs are not accepted. Uses ETags and human approval except proven continuous connector-private edits. Series with persisted exceptions fail closed.
Inputs: scope (required), changes (required), eventId (required), accountId (required), +3 more.
gmail_create_draftBDestructive
Create a draft, never send. Explicit verified account, structured recipients and requestId are required. Reuse the same requestId for retries; ambiguous creates are not retried.
Inputs: text (required), accountId (required), requestId (required), cc, +4 more.
gmail_read_attachmentARead-only
Read at most 5 MiB of an explicitly selected message attachment as base64. Membership is verified; no files are written or executed.
Inputs: accountId (required), messageId (required), partId, attachmentId.
gmail_read_messageARead-only
Read one message from an explicit account as bounded, untrusted inert text plus attachment metadata. Message-owned text bodies are fetched; external images/resources and file attachments are not.
Inputs: accountId (required), messageId (required).
gmail_read_threadARead-only
Read a bounded Gmail thread from an explicit account, including message-owned text bodies. Missing bodies are reported incomplete; oversized or failed body reads fail clearly.
Inputs: threadId (required), accountId (required), maxMessages.
gmail_searchARead-only
Search explicit Gmail accounts with bounded metadata, per-account failures and query/account-bound continuations. Mail text is untrusted.
Inputs: query (required), accountIds (required), maxPages, pageSize, +1 more.
operation_cancelADestructive
Cancel a pending operation before dispatch. Does not undo an already-dispatched Google action.
Inputs: accountId (required), operationId (required).
operation_statusARead-only
Read the status of an explicitly selected account's write. An unknown outcome must never be blindly retried.
Inputs: accountId (required), operationId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool targets a distinct resource-action pair: accounts, Gmail operations (search, read thread, read message, read attachment, create draft), Calendar operations (list, get, create, update, delete, list events, list instances, free/busy, find availability, rsvp), and operation management. No two tools have overlapping responsibilities; even similar actions like read_thread vs read_message are clearly separated by scope. Descriptions reinforce these boundaries with explicit account/calendar requirements and behavioral constraints.
All tool names follow a consistent pattern: <domain>_<action>_<noun>, with domains being accounts, gmail, calendar, or operation. Actions are consistent verbs like list, read, get, create, update, delete, cancel, and status. Even compound verbs like find_availability and free_busy maintain readability and align with the pattern.
18 tools is slightly above the ideal range (3-15) but justified by covering two distinct Google services (Gmail and Calendar) plus operation management. The count is not excessive given the breadth of features, and each tool earns its place with no redundancy. It feels well-scoped for a connector that handles multiple domains.
The tool surface covers core workflows for Gmail (search, read, draft creation) and Calendar (full CRUD, free/busy, availability, RSVP). Notable gaps include no Gmail send tool and no ability to modify existing drafts, but these are likely intentional safety restrictions. Operation status and cancellation complete the lifecycle, leaving few dead ends for agents.
Maintenance
Related MCP Connectors
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Every email and calendar account you connect, for AI agents, with permissions and approvals.
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Claude to access and manage multiple Google accounts at once across Gmail, Calendar, Drive, Contacts, and Tasks, with unified search and document text extraction.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read and draft emails across multiple Gmail accounts at once, with strict safeguards that prevent sending, deleting, or modifying mailbox settings.AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read and, when explicitly enabled, modify Gmail, Google Calendar, and Google Drive across multiple Google Workspace accounts while defaulting to read-only access.1MIT
- AlicenseAqualityCmaintenanceEnables reading Gmail messages and managing drafts without sending, managing Calendar events, and searching, downloading, uploading, or updating Drive files for a personal account through local OAuth-backed tools.20MIT