There is no reading, searching or labelling here — the server cannot see your inbox, only add to other people's. That makes it the right piece for an agent that needs to hand something off by email without being handed your entire mailbox. The setup cost is entirely Google's: a Cloud project, an OAuth client and one browser round-trip to mint the refresh token.
A Python MCP server for Gmail with a single job: sending new emails from the account you authorize.
- `send_mail` — sends a new email as the authorized account
- A refresh-token flow, so the client holds long-lived credentials rather than re-authorizing each session
- A helper script that runs the OAuth handshake and writes the token file for you
- An inspector command for testing the server before it goes near a client
Python 3.12+ and uv. In Google Cloud Console, create a project, enable the Gmail API, and create an OAuth client ID of type Web application with http://localhost:4321/ as an authorized redirect URI; save the downloaded JSON as credentials.json in the project root. Run the refresh-token script, complete the browser flow, and put the resulting `CLIENT_ID`, `CLIENT_SECRET` and `REFRESH_TOKEN` into the client's env block.
Build from source — clone the repository and build it, then point your client at the binary
