Potencialize seu agente
O comando do próprio publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
npx -y [email protected]O Claude Code não tem link de instalação para um comando local. Copie o comando abaixo e execute-o em um terminal.
claude mcp add io.github.imkath-gmail-tidy-mcp -- npx -y gmail-tidy-mcp@0.5.1Execute em um terminal.
{ "mcpServers": { "io.github.imkath-gmail-tidy-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}claude_desktop_config.json
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirAn MCP server that lets your AI assistant read and organize several Gmail accounts at once: search, read, label, archive, set up filters and write drafts.
It cannot send or delete email. Not "it asks first": there is no tool for it, and a test fails the build if a send or delete call ever shows up in the code.
Most Gmail MCP servers hand the model full control of your mailbox, including sending, and keep OAuth tokens in plain text on disk. That is a lot of trust to give a model that also reads emails written by strangers.
This one is built around a smaller promise: the assistant can help you get your inbox in order, but it can't send anything or delete anything.
Each account gets a short label, so you can say things like "archive every newsletter older than a month in work".
Google has no scope that allows drafts but not sending, so the server asks for gmail.modify (which technically includes sending) plus gmail.settings.basic for filters. The guarantee comes from the code, and test/safety.test.js checks it on every run.
~/.config/gmail-tidy-mcp/tokens.enc (mode 600). The key lives in the macOS Keychain, the Linux Secret Service (secret-tool), or a DPAPI-protected file on Windows. You can also provide it yourself with GMAIL_TIDY_KEY (64 hex characters).state, with the redirect on 127.0.0.1 only.display:none, visibility:hidden, font-size:0 or opacity:0 are dropped).get_email and get_attachment add a short list of findings above the untrusted block: phrasing typical of prompt injection, failed SPF, DKIM or DMARC, a Reply-To that sends answers to a free webmail address when the sender didn't pass DMARC, a display name that pretends to be another address, and links that show one site but lead to another (Gmail and Outlook redirect wrappers are unwrapped first; tracking links in mailing lists are not flagged). They are tuned to stay quiet on normal mail, so a note means something.GMAIL_TIDY_ATTACH_DIRS), never in a hidden folder and never this server's own config. Links are resolved before the check, so a shortcut can't point at ~/.ssh. That way a model steered by a malicious email can't slip a private key or token into a draft for you to send.~/.config/gmail-tidy-mcp/audit.log (mode 600), without message bodies, draft text or the signature itself. recent_changes shows them, so if something odd happened in a session you can see exactly what and undo it.factura.pdf.exe, right-to-left override tricks), files whose bytes don't match their extension, and archives that contain any of those are refused unless the call says allow_risky: true. Password-protected archives, macro-enabled Office files and PDFs with JavaScript or auto-run actions are flagged. Saved files never overwrite anything, can't be written outside the downloads folder, and on macOS get the quarantine flag so Gatekeeper checks them before they open.destructiveHint) so clients can ask you before running them.sender_stats, newsletters and searches fetch a few messages at a time and back off when Gmail asks, so a large mailbox slows the scan down instead of breaking it.@modelcontextprotocol/sdk and googleapis), pinned to exact versions, none with install scripts.No server can make prompt injection impossible, and the security notes are heuristics: they catch common tricks, not every one, and a clean result proves nothing. If a malicious email convinces the model, it could still:
skip_inbox: true, and your client can ask you first),allow_risky: true; opening it is still up to you.Two more things worth knowing:
gmail.modify allows. Keep your machine and keyring locked./usr/bin/security, which means any process running as you can read the key without a prompt. That still keeps the key off the disk, but it is not a barrier against malware running under your user.Requires Node.js 22 or newer.
~/.config/gmail-tidy-mcp/oauth-client.json and make it private (chmod 600 on macOS and Linux).When you connect an account, Google warns that the app is unverified. That is expected: the app is yours. Continue through Advanced.
Claude Code:
claude mcp add -s user gmail-tidy -- npx -y gmail-tidy-mcp
Any other MCP client: run npx -y gmail-tidy-mcp over stdio.
Prefer to run it from source? Clone the repo, run npm ci --ignore-scripts, and point your client at node /path/to/gmail-tidy-mcp/bin/gmail-tidy-mcp.js.
On Linux, install libsecret-tools first so the key can go into your keyring.
Ask your assistant to connect an account. It opens Google's sign-in page in your browser. Or do it from the terminal:
npx gmail-tidy-mcp add [email protected] personal
npx gmail-tidy-mcp list
npx gmail-tidy-mcp remove [email protected]
Removing an account deletes its token locally. To revoke access on Google's side too, go to myaccount.google.com/permissions.
Google Workspace accounts may need an admin to allow unverified apps.
npm test
The tests cover the safety guarantee (no send or delete calls, no Trash or Spam, filter actions limited to labels), token encryption and key handling, the sign-in callback (state, errors, timeouts), the post-login checks, draft headers and body decoding. CI runs them on Linux, macOS and Windows, including the real DPAPI path on Windows.
This started from gx-55/multi-gmail-mcp (MIT) by Rogers Xie. Some of its building blocks remain: the label-or-address account lookup, the message search and header helpers, the reply threading and the token-error detection. The storage, sign-in flow, tool set and safety model were redesigned.
MIT. See LICENSE.
Organize Gmail accounts: threads, attachments, labels, filters, drafts. Never sends or deletes.
{ "mcpServers": { "io.github.imkath-gmail-tidy-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
Gmail Tidy roda localmente via stdio.
Última verificação: 2026-11-14. Organize Gmail accounts: threads, attachments, labels, filters, drafts. Never sends or deletes.