Labsco
MCP SERVER

Gmail MCP Server

by kushal45

Search, read, label and answer Gmail from an agent, with thread reconstruction that pulls out participants, deadlines and follow-ups.

Email: Mailboxes & DeliveryVerified
Summary
Mailbox operations plus a thread reader that produces a summary, not a message dump.

Most Gmail servers stop at search and read. This one adds analyze_conversation, which reconstructs a full thread from a single email — forwards and replies included — and comes back with participants, a timeline, and per-message ratings for importance, urgency and deadlines. Attachments follow a deliberate two-step path: list them, then download, which is what stops an agent from guessing attachment IDs.

What it is

A Gmail server that runs against your own Google Cloud OAuth credentials. It covers the mailbox operations — search, read, send, label, delete, drafts, attachments — plus a conversation analyzer that reads a whole thread at once.

What you get
  • Search that accepts ordinary phrasing — 'income tax notice from May' — alongside structured filters for sender, label, date range, unread state and attachments
  • Full message reads with MIME handling, returning headers, body and attachment information
  • Thread analysis over one email: the reconstructed conversation including forwards and replies, its participants, timeline and topics, with each message rated for importance, urgency and deadlines
  • Sending with plain-text or HTML bodies, cc/bcc, reply-to and attachments supplied as base64 or absolute file paths
  • Drafts through one tool — create, list, get, update, delete and send
  • Attachments listed first, then downloaded to disk and returned as a file path and file:// URL
  • Mark read or unread, move between labels while removing old ones in the same call, and permanent delete
  • Sign-in and sign-out, plus system status and performance metrics covering cache hit rates, memory use and connection pool statistics
Requirements

A Google Cloud project with the Gmail API enabled and OAuth2 desktop credentials of your own — download credentials.json into the project root and set GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET and GOOGLE_REDIRECT_URI. Its package.json is marked private, so you install from source: clone it, run npm install and npm run build, then point your client at node build/index.js over stdio. Node.js 18+. STORAGE_PATH, CACHE_TTL and LOG_LEVEL are optional. The first call to gmail_authenticate returns a clickable link that completes the OAuth flow.

Setup effort

One command plus a key — npx -y gmail-mcp-server, then supply credentials