mcp-google
This MCP server gives an LLM agent read/write access to Gmail and Google Calendar across multiple Google accounts.
List unread Gmail emails with subject, sender, date, and snippet (up to 100 results, default 20)
Fetch a full email's content by message ID
Send plain-text emails (recipient, subject, body)
View today's calendar events
View this week's agenda (Monday through Sunday)
Create calendar events using a title and ISO 8601 start/end times
Target any configured Google account via the optional
accountparameter (defaults to the first account inGOOGLE_ACCOUNTS_JSON)
Allows reading unread emails, fetching full email content by ID, and sending emails via Gmail API.
Allows retrieving today's events, this week's agenda, and creating calendar events via Google Calendar API.
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., "@mcp-google Show my unread emails"
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.
mcp-google
MCP server for Google APIs — Gmail and Calendar tools for LLM agents.
Install
# Run directly with uvx (no install needed)
uvx mcp-google
# Or install with pip
pip install mcp-googleRelated MCP server: google-cli-mcp
Environment Variables
Variable | Description |
| OAuth2 client ID from Google Cloud Console |
| OAuth2 client secret |
| JSON array of account configs (see below) |
GOOGLE_ACCOUNTS_JSON format
[
{"email": "personal@gmail.com", "refresh_token": "1//..."},
{"email": "work@company.com", "refresh_token": "1//..."}
]The first account in the array is used as default when no account parameter is specified.
Tools
Phase 1 — Read-only
Tool | Parameters | Description |
|
| List unread emails (subject, sender, date, snippet) |
|
| Get full email content by ID |
|
| Today's events |
|
| This week's agenda |
Phase 2 — Write
Tool | Parameters | Description |
|
| Send an email |
|
| Create a calendar event |
OAuth Setup
Go to Google Cloud Console
Create a project (or select existing)
Enable Gmail API and Google Calendar API
Go to Credentials > Create Credentials > OAuth 2.0 Client ID
Application type: Desktop app
Note the Client ID and Client Secret
Configure OAuth consent screen with required scopes:
https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/calendar.readonlyhttps://www.googleapis.com/auth/calendar.events
Obtain refresh tokens for each account using the OAuth2 flow
Set environment variables (copy
.env.exampleto.envand fill in values)
Obtaining Refresh Tokens
Use the Google OAuth Playground or a local OAuth flow created for a Desktop app client. Refresh tokens are credentials: keep them out of repository files, issues, terminal transcripts, shell history and shared logs. Store the resulting configuration in a local secret source and inject it through the environment at runtime.
A first-class setup helper that avoids unsafe output by default is tracked in Issue #5.
Running
# As MCP server (stdio transport)
mcp-google
# Or directly
python -m mcp_google.serverClaude Desktop config
{
"mcpServers": {
"google": {
"command": "mcp-google",
"env": {
"GOOGLE_CLIENT_ID": "...",
"GOOGLE_CLIENT_SECRET": "...",
"GOOGLE_ACCOUNTS_JSON": "[{\"email\": \"me@gmail.com\", \"refresh_token\": \"...\"}]"
}
}
}
}License
MIT
Documentation and roadmap
Priorities live in GitHub Issues and Projects. Delivery history lives in closed Issues, pull requests and GitHub Releases.
Available Tools
6 toolscalendar_create_eventA
Create a calendar event.
Args: title: Event title/summary. start: Start time in ISO 8601 format (e.g. "2025-03-20T10:00:00-03:00"). end: End time in ISO 8601 format (e.g. "2025-03-20T11:00:00-03:00"). account: Email address of the account to use. Omit for default account.
Inputs: end (required), start (required), title (required), account.
calendar_todayA
Get today's calendar events.
Args: account: Email address of the account to use. Omit for default account.
Inputs: account. Returns: result
calendar_weekA
Get this week's calendar events (Monday through Sunday).
Args: account: Email address of the account to use. Omit for default account.
Inputs: account. Returns: result
gmail_get_messageA
Get full email content by message ID.
Args: message_id: The Gmail message ID (from gmail_list_unread). account: Email address of the account to use. Omit for default account.
Inputs: message_id (required), account.
gmail_list_unreadA
List unread emails with subject, sender, date, and snippet.
Args: account: Email address of the account to use. Omit for default account. max_results: Maximum number of messages to return (default 20, max 100).
Inputs: account, max_results. Returns: result
gmail_sendB
Send an email.
Args: to: Recipient email address. subject: Email subject line. body: Plain text email body. account: Email address of the account to use. Omit for default account.
Inputs: to (required), body (required), subject (required), account.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource and action: calendar lookups vs. creation, and Gmail listing vs. reading vs. sending. There is no overlap or ambiguity between tool purposes.
All tools follow a consistent snake_case pattern with a clear service prefix (`calendar_` for calendar actions, `gmail_` for email actions). The naming is predictable and easy to infer.
With 6 tools split across two Google services, the count is well-scoped and each tool provides essential functionality without unnecessary bloat. This is a focused, practical surface.
Core workflows are covered: viewing calendar events, creating events, listing/reading/sending email. Minor gaps exist such as no calendar update/delete or Gmail search/mark-as-read, but these are workable for most common use cases.
Maintenance
Related MCP Connectors
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that connects AI agents to Google Workspace (Gmail, Calendar, Drive, Docs, Sheets, and Slides).302MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that exposes 17 Google Workspace APIs (e.g., Gmail, Drive, Calendar) as auto-generated tools for AI assistants, enabling natural language control of Google services.-
- AlicenseNot gradedqualityCmaintenanceLocal MCP server for reading/sending email via Gmail and managing Google Calendar events, enabling an AI agent to handle email and calendar operations through natural language.MIT
- AlicenseBqualityDmaintenanceA generic MCP server that exposes Gmail and Google Docs capabilities as tools for AI agents. Enables sending emails and appending content to Google Docs.2ISC