Skip to main content
Glama

mailport

Gmail messages, threads and labels as MCP tools, talking to the Gmail API. mailport is a clean-room rebuild of the core surface of the Gmail reference MCP server, under a new name: fresh code written from the public Gmail API documentation, no copied branding.

Tools (core subset, 10)

list_messages, get_message, list_threads, get_thread, list_labels, send_message, create_draft, modify_message, trash_message, create_label.

Label update/delete, draft get/update/delete/send, message delete and batchModify, history, profile/settings/watch, and attachment downloads from the wider Gmail surface are not in this subset.

Related MCP server: Moist

Setup

Set a Google OAuth access token:

export GOOGLE_ACCESS_TOKEN=ya29....

Optionally override the API base with GMAIL_API_URL (default https://gmail.googleapis.com/gmail/v1). Without the token, every tool call fails with an error naming the missing variable.

CLI

npx @reneturcios/mailport list_messages '{"query":"in:inbox","max_results":5}'
npx @reneturcios/mailport mcp        # stdio MCP server

Each tool name is a subcommand taking one JSON object argument.

MCP client config

{
  "mcpServers": {
    "mailport": {
      "command": "npx",
      "args": ["-y", "@reneturcios/mailport", "mcp"],
      "env": { "GOOGLE_ACCESS_TOKEN": "ya29...." }
    }
  }
}

Docker

docker run -i -e GOOGLE_ACCESS_TOKEN ghcr.io/cloudcorprecords/mailport

Development

npm install
npm run build
npm test

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Gmail through the MCP protocol, supporting sending, reading, searching, replying, forwarding, managing drafts and labels, and saving attachments.
      6 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Gmail operations such as reading, sending, searching, and managing emails, threads, labels, and drafts via MCP tools.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Gmail accounts via MCP, providing tools for listing labels, searching, reading, drafting, and sending emails with OAuth2 authentication.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables reading, searching, sending, and drafting Gmail emails via MCP tools, with support for multiple accounts and background notifications.
      -