send_mailLABSCO SUMMARY
Send-only, which is a feature if that is all you want.
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.
What it is
A Python MCP server for Gmail with a single job: sending new emails from the account you authorize.
What you get
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
Requirements
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.
Setup effort
Build from source — git clone https://github.com/HeurisTech/gmail-mcp-server.git
USE CASES
Mailing a finished report
Have the agent send the summary at the end of the run instead of leaving it in the chat.
Notifying someone outside your tools
Send from your own account so the recipient sees a normal message rather than a system alert.
Keeping the mailbox private
Pick this over a full Gmail integration when the agent should be able to send but never read.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
- uv on PATH
- Python 3.12 or later
- CLIENT_ID in your environment
- CLIENT_SECRET in your environment
- REFRESH_TOKEN in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/HeurisTech/gmail-mcp-server.git
cd gmail-mcp-server
uv venv
uv syncIn Google Cloud Console, create a project and enable the Gmail API. Under APIs and services → Credentials, create an OAuth client ID of type Web application with http://localhost:4321/ as an authorised redirect URI, then download its JSON and save it as credentials.json in the gmail-mcp-server folder.
source .venv/bin/activate
python get_refresh_token.pySign in with Google in the browser window it opens. The script prints the refresh_token and saves it, with client_id and client_secret, in token.json.
MCP Clients
Claude Desktop
{
"mcpServers": {
"gmail-mcp-server": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_GMAIL_MCP_SERVER>",
"run",
"server.py"
],
"env": {
"CLIENT_ID": "google.auth.app.client.id",
"CLIENT_SECRET": "google.auth.app.client.secret",
"REFRESH_TOKEN": "google.auth.app.refresh.token"
}
}
}
}<YOUR_PATH_TO_GMAIL_MCP_SERVER> is the full path of the folder the clone created — uv --directory takes the folder, not server.py. Put in the client_id, client_secret and refresh_token that get_refresh_token.py saved to token.json.