plmail-mcp
Provides access to Gmail mailboxes synced by plMail, enabling email search, reading, sending, organizing with labels/folders, and thread management through plMail's JMAP API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
plmail-mcp
An MCP server that gives an agent (Hermes, Claude, any MCP client) the mail, calendar and contacts of a plMail server — every mailbox plMail syncs (IMAP, Gmail, Outlook) through one URL and one app password. No per-mailbox IMAP/SMTP settings: plMail already holds those, this talks to its JMAP API.
Setup
In plMail: Settings → App passwords → create (e.g. "Hermes"). The secret starts with
plmail_and is shown once.Write
~/.config/plmail-mcp/config.toml, mode 600 (seecontrib/config.example.toml):url = "https://mail.example.org" token = "plmail_…"Environment variables override the file:
PLMAIL_URL,PLMAIL_TOKENorPLMAIL_TOKEN_FILE,PLMAIL_VERIFY_TLS, andPLMAIL_MCP_CONFIGfor another file path. A config file or token file readable by anyone but its owner is refused.Check what the agent will see:
uv run plmail-mcp check
Revoking the app password in plMail cuts the agent off everywhere at once.
Switching tools off
Every tool is on by default. To take one away from the agent, set it to
false in a [tools] table; it then disappears from the tool list the agent
sees:
[tools]
send_email = false
send_draft = false
jmap = falseA name that matches no tool is refused at start-up, so sned_email = false
cannot leave sending on by mistake. Switch jmap off whenever another tool
is off: the raw JMAP tool can do anything the others do, and the server warns
when it is left on. These switches are enforced by this server, not by
plMail: the app password itself can still do everything, so keep it where the
agent cannot read it (see Running).
Related MCP server: AT&T Mail MCP Server
Running
uv run plmail-mcp serve # stdio
uv run plmail-mcp serve --transport streamable-http \
--host 127.0.0.1 --port 9558 # http://127.0.0.1:9558/mcpFor an agent that runs sandboxed (Hermes' gateway), run the HTTP server
outside the sandbox as a user service, so the app password never enters it:
contrib/plmail-mcp.service. Then, in ~/.hermes/config.yaml:
mcp_servers:
plmail:
url: http://127.0.0.1:9558/mcpFor a client that spawns servers itself (stdio):
mcp_servers:
plmail:
command: uv
args: ["run", "--directory", "/path/to/plmail-mcp", "plmail-mcp", "serve"]Tools
Accounts |
|
Reading |
|
Organising |
|
Writing |
|
Contacts |
|
Calendar |
|
Templates |
|
Anything else |
|
Accounts are named by id or address ("3", "me@gmail.com", or a unique
part of it). Every result carries the account it came from.
The agent can send mail unless send_email and send_draft are switched
off. With them on, the tool descriptions tell it to send only when asked, and
create_draft + send_draft leave a step for review.
Behaviour worth knowing
Trash is a move: plMail never hard-deletes.
Waking a snoozed conversation puts it back in the inbox unread (plMail's own snooze semantics).
plMail's Session advertises
urn:plmail:params:jmap:push, which its API then refuses inusing. The client drops any capability the API refuses and retries.Calendars and contacts belong to the plMail user, served from the session's primary account; mail is per account.
Testing
tests/smoke.py starts the server over stdio and calls every tool against a
throwaway plMail (it creates and deletes drafts, contacts and events):
PLMAIL_URL=http://127.0.0.1:8001 PLMAIL_TOKEN_FILE=/path/to/token uv run python tests/smoke.pyA local plMail test stack: compose.test.yaml in the plMail repo, then
bin/console app:test:seed-user --email=demo@plmail.test --password=…,
app:test:seed-demo --email=demo@plmail.test and
app:test:seed-api-token --email=demo@plmail.test -q for the token.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Manage domains, mailboxes, inbox, campaigns and deliverability from any MCP client.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Read, search and manage iCloud Mail, Calendar and Contacts from Claude and other MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceUnified email access via IMAP/SMTP, enabling reading, searching, sending, and deleting messages across multiple accounts through a single MCP server.9AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to read and organize mail, manage drafts, and perform broader mailbox operations under configurable read-only, draft-only, or full-access modes.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to access and manage email over IMAP, POP3, and SMTP, including listing, searching, reading, sending, downloading attachments, and managing flags, moves, and deletions using environment-based credentials and TLS.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to manage multiple email accounts, including searching, reading, organizing, drafting, and sending messages over IMAP/SMTP with encrypted credentials.MIT