npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agentcomms/gmail-mcp

v0.37.0

Published

The Gmail MCP server for coding agents: search, read, analyse and draft across inboxes, with sending gated by approval.

Readme

@agentcomms/gmail-mcp

The Gmail MCP server for coding agents, as its own command — so a client configuration can pin it:

{
  "mcpServers": {
    "gmail": { "command": "npx", "args": ["-y", "@agentcomms/[email protected]"] }
  }
}

It is one call into @agentcomms/gmail, which is where the server and the agent-gmail command live. Part of agent-communications.

Set up mailboxes first

This package serves mailboxes; connecting them is @agentcomms/gmail, and one command does all of it — the Google Cloud steps, the client, the first mailbox, and registering this server with your agent:

npx @agentcomms/gmail setup

To register it separately, or to move an existing registration to a new version:

npx @agentcomms/gmail mcp install --client claude-code --launcher npx

It shows what it will register and asks you to type yes; run by an agent, it exits 10 with the preview and an approval id, and registers when run again with --approval <id> once you have agreed.

Connecting a mailbox from the agent instead

An agent asked to "set up Gmail" need not send you to a terminal: gmail_setup says what is missing and, when given profile, adds that organisation profile through its own orgApproval; otherwise it changes nothing. gmail_client_add registers the OAuth client from the path of the JSON you downloaded, gmail_inbox_add returns a sign-in link and stops, and gmail_inbox_finish completes it once Google returns the grant. The grant is still yours to approve in your own browser — this server does not open one and cannot grant it. The client JSON is read from its path on your machine, never pasted into the conversation, and no tool returns its secret.

Everything else agent-gmail does to an account is a tool too, each the same operation as its command:

| Tool | Command | |---|---| | gmail_inbox_show, gmail_inboxes_list | inbox show, inbox list | | gmail_inbox_rename | inbox rename | | gmail_inbox_policy — the send policy and the change policy | inbox policy --send --change | | gmail_inbox_reauth, then gmail_inbox_finish | inbox reauth --start, then --finish | | gmail_inbox_import | inbox import | | gmail_inbox_remove | inbox remove | | gmail_clients_list, gmail_client_add, gmail_client_remove | client list\|add\|remove | | gmail_confirm_clients, gmail_confirm_client_add, gmail_confirm_client_remove | confirm-clients list\|add\|remove |

To move an existing mailbox onto an organisation profile's active client, read the generation name from comms_org_show, then call gmail_inbox_reauth with that client (the terminal form is agent-gmail inbox reauth <name> --client <organisation>-1 --start) and finish it normally.

How a change is approved

A change that loosens a safety setting or cannot be taken back — a looser policy, a wider grant, an OAuth client added or removed, a mailbox imported or removed, a client trusted to show approval forms — does not happen on the first call. The tool returns approvalRequired, a preview of exactly what would change and an approvalId; the agent shows you the preview and asks. Under the chat change policy (the default) your yes is the approval, and the agent calls again with the id. Under confirm you run the approve command the result gives, exactly as given, in your own terminal and type the code it shows first; the agent learns that you have with gmail_send_wait, and calls again. An approval is for the change it previewed, once: it waits ten minutes for a yes in the chat, thirty for your terminal, and holds 24 hours once you approved it there. If anything is different by the time it is claimed, it is refused and the change is prepared again; if you say no, the agent revokes it. Tightening needs nobody. The same approval can be claimed from the command line with --approval <id>, and the other way round.

The writers are withheld from a server started --read-only. One pinned to a single mailbox with --inbox offers, of the tools above, the ones that read, gmail_inbox_policy for its own mailbox, and gmail_confirm_client_remove, since trusting fewer clients needs nobody; it does not rename, re-authorise, import, remove, add or remove an OAuth client, or add a trusted client.

Options

| Option | Effect | |---|---| | --inbox <alias> | serve only that mailbox; the inbox argument becomes optional | | --read-only | register only the tools that cannot change anything |

Sending

No tool here sends mail on its own. A send is prepared, shown to the user in full, and transmitted only after they approve that exact content — the same message, the same recipients, within a short window, once. Every Gmail permission that allows drafting also allows sending, so that rule lives in code rather than in the grant.

Licence

MIT