LabscoMCP early access ↗
bastienchabalMCP SERVER

Gmail & Calendar Context-Aware MCP

Reply to email with the whole thread in context, and turn what it says into calendar events.

by bastienchabal ↗Email: Mailboxes & DeliveryCommunity

LABSCO SUMMARY

Sending is always two steps.

Drafting and sending are separate tools, so nothing leaves the account without a confirmation — worth knowing before you assume a reply went out. If you enable Calendar after having already authenticated for Gmail only, the existing token lacks the Calendar scopes: delete tokens.json, restart the server and authorise again. The project describes itself as a work in progress in beta.

What it is

A Gmail and Google Calendar server built around one idea: a reply should be drafted with the conversation history, the sender relationship and the entities in the message already loaded, rather than from the last message alone.

What you get

  • Read and search: get_email_overview, list_emails, get_email, search_emails and get_email_count, using Gmail's own search syntax
  • Context-aware replies: prepare_email_reply gathers thread history and communication patterns first, send_email_reply creates the draft, and confirm_send_email is a separate step that actually sends it
  • Calendar: create_calendar_event takes attendees, location and a colour by name or id, detect_events_from_email pulls event details out of a message, list_calendar_events and suggest_meeting_times handle the rest
  • Resources the client can read directly — auth://status, gmail://status, plus email://, thread:// and sender:// context for a specific id
  • Built-in guides as prompts: quickstart, authentication, Gmail search syntax, replies and debugging
  • Authentication tools of its own: authenticate, check_auth_status, login_tool, process_auth_code_tool and logout

Requirements

Python 3.10+, and a Google Cloud project with the Gmail API enabled — the Calendar API too if you want the scheduling half. Create OAuth 2.0 credentials of type Desktop app and add your address as a test user on the consent screen. Install from a checkout with uv: uv venv, then uv pip install -e .. The client launches the project's main.py and supplies GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, CONFIG_FILE_PATH and PYTHONPATH; an optional TOKEN_ENCRYPTION_KEY encrypts the stored token. First use opens a browser to authorise and writes tokens.json.

Setup effort

Build from source — git clone https://github.com/bastienchabal/gmail-mcp.git