Gmail & Google Calendar MCP Server
Combines Gmail and Google Calendar operations with multi-account OAuth, attachments, and email templates in a single MCP server.
README
Gmail & Google Calendar MCP Server
Status: beta
MCP server for Gmail and Google Calendar workflows. It combines email operations, calendar management, multi-account OAuth, attachments, and reusable email templates in a single local server.
Why this exists
Most MCP setups treat inbox and calendar work as separate integrations. This project keeps those workflows together so an assistant can:
- authenticate one or more Google accounts,
- read and send email,
- manage labels and attachments,
- create and update calendar events,
- switch accounts when personal and workspace contexts differ.
What it includes
- 35 MCP tools across account, Gmail, Calendar, attachment, and template workflows
- OAuth2 authentication for personal Gmail and Google Workspace accounts
- Multi-account switching
- Gmail search, send, reply, forward, label, and batch operations
- Calendar listing, event CRUD, availability checks, invitation responses, and quick add
- HTML email template rendering and custom templates
- MCP resources for account-level Gmail and Calendar snapshots
Quickstart
Prerequisites:
- Node.js 18+
- A Google Cloud project with Gmail API and Google Calendar API enabled
- OAuth client credentials created as a Desktop application
- Install dependencies
git clone https://github.com/ftaricano/mcp-gmail-calendar.git
cd mcp-gmail-calendar
npm install
- Configure environment
cp .env.example .env
Set at least these values in .env:
GOOGLE_CREDENTIALS_PATH=/absolute/path/to/credentials.json
OAUTH_CALLBACK_PORT=3000
TOKENS_PATH=./tokens
LOG_LEVEL=info
- Build the server
npm run build
- Add it to your MCP client
{
"mcpServers": {
"gmail-calendar": {
"command": "node",
"args": ["/absolute/path/to/mcp-gmail-calendar/dist/index.js"],
"env": {
"GOOGLE_CREDENTIALS_PATH": "/absolute/path/to/credentials.json",
"OAUTH_CALLBACK_PORT": "3000",
"TOKENS_PATH": "/absolute/path/to/mcp-gmail-calendar/tokens"
}
}
}
}
- Authenticate the first account
Use the authenticate tool from your MCP client:
{
"name": "authenticate",
"arguments": {
"email": "you@example.com",
"accountType": "personal"
}
}
After authentication, use list_accounts or switch_account before Gmail or Calendar actions when needed.
Typical use cases
- triage and reply to inbox messages without leaving the MCP client,
- create calendar events from email context,
- manage separate personal and work Google accounts,
- generate templated outbound email with attachments,
- inspect upcoming events or free/busy windows before scheduling.
Tool groups
Account management
authenticatelist_accountsswitch_accountremove_accountget_current_account
Gmail
email_list,email_read,email_send,email_reply,email_forwardemail_delete,email_mark_read,email_mark_unread,email_searchemail_move,email_label,email_create_label,email_list_labels,email_batch_operations
Attachments
email_list_attachmentsemail_download_attachment
Note: email_download_attachment.savePath is treated as a filename hint only. Attachments are written into the local sandbox under ATTACHMENT_DOWNLOAD_DIR/<account>/ to avoid arbitrary filesystem writes.
Calendar
calendar_listevent_list,event_get,event_create,event_update,event_deletecalendar_get_availability,event_respond,event_search,event_quick_add,event_upcoming
Templates
template_listtemplate_rendertemplate_create
Notes on setup
- The server expects Google OAuth desktop credentials, not a service account.
- Tokens are stored locally using the configured
TOKENS_PATH. - Downloaded attachments are sandboxed under
ATTACHMENT_DOWNLOAD_DIR(default:./attachments/downloads). - Some operations require selecting an authenticated account first.
- The server also exposes
gmail://account/{email}andcalendar://account/{email}resources.
Development
npm run build
npm run lint
npm test
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.