
An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

A Model Context Protocol server that connects AI assistants to Gmail accounts over IMAP for reading, searching, sending, and organizing email.
Gmail IMAP MCP Server is cataloged as an MCP server attributed to tonykipkemboi. A Model Context Protocol server that connects AI assistants to Gmail accounts over IMAP for reading, searching, sending, and organizing email. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Gmail IMAP MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
README.md · 343a81b26cf5 · Fetched 2026-11-13 13:34:18 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Model Context Protocol (MCP) server for Gmail integration using IMAP. This server allows AI assistants to interact with Gmail accounts, providing functionality to read, search, and manage emails.
Before running the Gmail IMAP MCP server, ensure you have the following:
Clone the repository:
git clone https://github.com/yourusername/gmail-imap-mcp.git
cd gmail-imap-mcp
Create and activate a virtual environment:
python -m venv .venv
# On Windows
.venv\Scripts\activate
# On Unix/MacOS
source .venv/bin/activate
Install the package:
pip install -e .
client_secret.json in the credentials directory:
mkdir -p ~/.gmail_imap_mcp_credentials
# Move the downloaded file to ~/.gmail_imap_mcp_credentials/client_secret.json
The Gmail IMAP MCP server stores OAuth2 credentials in the user's home directory at ~/.gmail_imap_mcp_credentials/. This approach offers several advantages:
The credentials directory contains:
client_secret.json: Your OAuth client credentials from Google Cloud Consoletoken_{email_address}.json)The server uses Python's imaplib2 library for IMAP operations with Gmail. Key implementation details include:
imap.gmail.com) on port 993email moduleEmail IDs in the system follow this format:
email://message/{account}_{mailbox}_{id}
Where:
{account}: The Gmail account address{mailbox}: The mailbox/label containing the email{id}: The unique IMAP ID of the emailThis format allows the system to uniquely identify emails across different accounts and mailboxes.
Run the Gmail IMAP MCP server:
gmail-imap-mcp
authenticate-gmail tool with your email addressThe Gmail IMAP MCP server provides a comprehensive set of tools for interacting with Gmail accounts. Below is a detailed list of all available tools along with examples of how to use them.
Authenticate a Gmail account to use with the MCP server.
Parameters:
email: Email address to authenticateExample:
{
"name": "authenticate-gmail",
"arguments": {
"email": "your.email@gmail.com"
}
}
Search for emails in a Gmail account using various search criteria.
Parameters:
account: Email account to search inmailbox: Mailbox to search in (default: INBOX)query: Search querylimit: Maximum number of emails to return (default: 10)Example - Search for emails from a specific sender:
{
"name": "search-emails",
"arguments": {
"account": "your.email@gmail.com",
"mailbox": "INBOX",
"query": "from:sender@example.com",
"limit": 5
}
}
Example - Search for emails with a specific subject:
{
"name": "search-emails",
"arguments": {
"account": "your.email@gmail.com",
"query": "subject:\"Meeting Invitation\""
}
}
Example - Search for emails with specific text in the body:
{
"name": "search-emails",
"arguments": {
"account": "your.email@gmail.com",
"query": "TEXT \"project update\""
}
}
Get unread emails from a Gmail account.
Parameters:
account: Email account to get emails frommailbox: Mailbox to get emails from (default: INBOX)limit: Maximum number of emails to return (default: 10)Example:
{
"name": "get-unread-emails",
"arguments": {
"account": "your.email@gmail.com",
"limit": 20
}
}
Send an email from a Gmail account with optional attachments and HTML content.
Parameters:
account: Email account to send fromto: Recipient email address(es), comma-separated for multiplesubject: Email subjectbody: Plain text email bodycc: Carbon copy recipients (optional)bcc: Blind carbon copy recipients (optional)html_body: HTML version of the email body (optional)attachments: List of attachment objects (optional)
path: Path to the filefilename: Custom filename (optional)content_type: MIME type (optional)Example - Simple email:
{
"name": "send-email",
"arguments": {
"account": "your.email@gmail.com",
"to": "recipient@example.com",
"subject": "Hello from Gmail MCP",
"body": "This is a test email sent via the Gmail IMAP MCP server."
}
}
Example - Email with CC, BCC, and HTML content:
{
"name": "send-email",
"arguments": {
"account": "your.email@gmail.com",
"to": "recipient@example.com",
"subject": "Meeting Agenda",
"body": "Please find the agenda for our upcoming meeting.",
"cc": "manager@example.com",
"bcc": "archive@example.com",
"html_body": "<h1>Meeting Agenda</h1><p>Please find the agenda for our <b>upcoming meeting</b>.</p>"
}
}
Example - Email with attachment:
{
"name": "send-email",
"arguments": {
"account": "your.email@gmail.com",
"to": "recipient@example.com",
"subject": "Document Attached",
"body": "Please find the attached document.",
"attachments": [
{
"path": "/path/to/document.pdf",
"filename": "important_document.pdf",
"content_type": "application/pdf"
}
]
}
}
Create a new label/mailbox in a Gmail account.
Parameters:
account: Email account to create label inlabel_name: Name of the label to createExample:
{
"name": "create-label",
"arguments": {
"account": "your.email@gmail.com",
"label_name": "ProjectX"
}
}
Delete a label/mailbox from a Gmail account.
Parameters:
account: Email account to delete label fromlabel_name: Name of the label to deleteExample:
{
"name": "delete-label",
"arguments": {
"account": "your.email@gmail.com",
"label_name": "OldProject"
}
}
List all labels/mailboxes in a Gmail account.
Parameters:
account: Email account to list labels fromExample:
{
"name": "list-labels",
"arguments": {
"account": "your.email@gmail.com"
}
}
Move an email from one label/mailbox to another.
Parameters:
account: Email accountemail_id: Email ID to move (format: email://message/{account}_{mailbox}_{id})source_mailbox: Source mailboxtarget_mailbox: Target mailboxExample:
{
"name": "move-email",
"arguments": {
"account": "your.email@gmail.com",
"email_id": "email://message/your.email@gmail.com_INBOX_12345",
"source_mailbox": "INBOX",
"target_mailbox": "ProjectX"
}
}
Download an attachment from an email.
Parameters:
account: Email accountemail_id: Email ID (format: email://message/{account}_{mailbox}_{id})attachment_index: Index of the attachment to download (0-based)mailbox: Mailbox containing the email (default: INBOX)download_dir: Directory to save the attachment to (default: "downloads")Example:
{
"name": "download-attachment",
"arguments": {
"account": "your.email@gmail.com",
"email_id": "email://message/your.email@gmail.com_INBOX_12345",
"attachment_index": 0,
"download_dir": "my_attachments"
}
}
Mark an email as read.
Parameters:
account: Email accountemail_id: Email ID (format: email://message/{account}_{mailbox}_{id})mailbox: Mailbox containing the email (default: INBOX)Example:
{
"name": "mark-as-read",
"arguments": {
"account": "your.email@gmail.com",
"email_id": "email://message/your.email@gmail.com_INBOX_12345"
}
}
Mark an email as unread.
Parameters:
account: Email accountemail_id: Email ID (format: email://message/{account}_{mailbox}_{id})mailbox: Mailbox containing the email (default: INBOX)Example:
{
"name": "mark-as-unread",
"arguments": {
"account": "your.email@gmail.com",
"email_id": "email://message/your.email@gmail.com_INBOX_12345"
}
}
The server provides the following prompts for AI assistants to use:
Creates a summary of recent emails.
Parameters:
account: Email account to summarizemailbox: Mailbox to summarize (default: INBOX)count: Number of emails to summarize (default: 5)Example:
{
"name": "summarize-emails",
"arguments": {
"account": "your.email@gmail.com",
"mailbox": "INBOX",
"count": 10
}
}
The Gmail IMAP MCP server can be integrated with AI assistants that support the Model Context Protocol (MCP). Here's a typical workflow:
Authentication: The AI assistant uses the authenticate-gmail tool to authenticate the user's Gmail account.
Email Management: The assistant can retrieve, search, and manage emails using the various tools provided by the server.
Email Composition: The assistant can help draft and send emails based on user instructions.
Email Organization: The assistant can help organize emails by creating labels, moving emails between labels, and marking emails as read/unread.
Email Summarization: The assistant can summarize emails using the summarize-emails prompt.
To connect the Gmail IMAP MCP server with Claude Desktop:
Start the Gmail IMAP MCP server:
python -m gmail_imap_mcp.server
Open Claude Desktop and navigate to Settings (gear icon)
Scroll down to the "Advanced" section and click on "Edit MCP Configuration"
Add the Gmail IMAP MCP server configuration:
{
"servers": [
{
"name": "Gmail IMAP",
"url": "http://localhost:8080",
"tools": [
"list-emails",
"get-email",
"search-emails",
"send-email",
"list-mailboxes",
"create-label",
"move-email",
"mark-as-read",
"download-attachment"
]
}
]
}
Click "Save" and restart Claude Desktop
You can now ask Claude to interact with your Gmail account, for example:
To connect the Gmail IMAP MCP server with Windsurf IDE:
Start the Gmail IMAP MCP server:
python -m gmail_imap_mcp.server
Open Windsurf IDE and navigate to Settings
Find the "AI Flow" or "MCP Configuration" section
Add the Gmail IMAP MCP server configuration:
{
"servers": [
{
"name": "Gmail IMAP",
"url": "http://localhost:8080",
"tools": [
"list-emails",
"get-email",
"search-emails",
"send-email",
"list-mailboxes",
"create-label",
"move-email",
"mark-as-read",
"download-attachment"
]
}
]
}
Save the settings and restart Windsurf if necessary
You can now ask Cascade (Windsurf's AI assistant) to interact with your Gmail account using the same commands as with Claude Desktop
Assistant: I'll help you triage your unread emails.
User: Yes, please check my unread emails.
Assistant: [Uses get-unread-emails tool]
Assistant: You have 5 unread emails. The most urgent appears to be from your boss about the quarterly report due tomorrow.
User: Mark that as read and I'll look at it right away.
Assistant: [Uses mark-as-read tool]
Assistant: Would you like me to find specific emails for you?
User: Yes, find all emails from john@example.com about the project budget.
Assistant: [Uses search-emails tool with query "from:john@example.com project budget"]
Assistant: I found 3 emails from John about the project budget. Would you like me to create a label for these?
User: Yes, create a "Budget" label and move them there.
Assistant: [Uses create-label tool followed by move-email tool for each email]
Assistant: Would you like me to draft an email for you?
User: Yes, write a follow-up email to the marketing team about our campaign results.
Assistant: [Drafts email content]
Assistant: Here's a draft. Would you like me to send it?
User: Yes, but add Sarah in CC.
Assistant: [Uses send-email tool with the drafted content and CC]
Gmail has specific requirements for label names:
The email ID format used by this MCP server is:
email://message/{account}_{mailbox}_{id}
When using tools that require an email ID (like mark-as-read or move-email), make sure to use the complete resource URI returned by email retrieval tools.
~/.gmail_imap_mcp_credentials directoryclient_secret.json or token filesdownloads directory by defaultclient_secret.json is correctly placed in the ~/.gmail_imap_mcp_credentials directoryemail://message/{account}_{mailbox}_{id}For issues and feature requests, please open an issue on the GitHub repository.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Gmail IMAP MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/gmail-imap-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.
Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

A Telegram CLI with background sync that can run an optional MCP server for a personal account using MTProto, not the bot API.