mcpField
M
mailport

mailport

Local
github.com/CloudCorpRecordsCommunication0Updated 2w ago

About mailport

mailport is an MCP server for managing Gmail messages, threads, labels, drafts, and sending through the Gmail API. It offers a defined set of ten core tools.

Key features

  1. 01List and retrieve messages
  2. 02List and retrieve threads
  3. 03List labels
  4. 04Send messages
  5. 05Create drafts
  6. 06Modify or trash messages; create labels

Use cases

  1. 01Review inbox messages and threads
  2. 02Send Gmail messages
  3. 03Prepare messages as drafts
  4. 04Organize mail with labels

MCP support

Exposes ten Gmail API operations as MCP tools, including message and thread access, label listing and creation, sending, draft creation, message modification, and trashing.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-mailport": {
"command": "npx",
"args": [
"-y",
"@reneturcios/mailport"
]
}
}
}
Run commandnpx -y @reneturcios/mailport

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/mailport0.1.0
ocighcr.io/cloudcorprecords/mailport:0.1.0

Tools

10

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
querystringNoOptional Gmail search query to filter messages by.
label_idsarrayNoOptional list of label IDs; only messages carrying all of these labels are returned.
max_resultsnumberNoOptional maximum number of messages to return.

Details

From the project README

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.

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.