Headless GmailSAFE
A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/@peakmojo/mcp-server-headless-gmail) [](https://hub.docker.com/r/buryhuang/mcp-headless-gmail) [](https://opensource.org/licenses/MIT)
A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.
Why MCP Headless Gmail Server?
Critical Advantages
- Headless & Remote Operation: Unlike other MCP Gmail solutions that require running outside of docker and local file access, this server can run completely headless in remote environments with no browser no local file access.
- Decoupled Architecture: Any client can complete the OAuth flow independently, then pass credentials as context to this MCP server, creating a complete separation between credential storage and server implementation.
Nice but not critical
- Focused Functionality: In many use cases, especially for marketing applications, only Gmail access is needed without additional Google services like Calendar, making this focused implementation ideal.
- Docker-Ready: Designed with containerization in mind for a well-isolated, environment-independent, one-click setup.
- Reliable Dependencies: Built on the well-maintained google-api-python-client library.
Features
- Get most recent emails from Gmail with the first 1k characters of the body
- Get full email body content in 1k chunks using offset parameter
- Send emails through Gmail
- Refresh access tokens separately
- Automatic refresh token handling
Prer
c22ea50df129OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-server-headless-gmail -- npx -y @peakmojo/[email protected]
{
"mcpServers": {
"mcp-server-headless-gmail": {
"command": "npx",
"args": [
"-y",
"@peakmojo/[email protected]"
]
}
}
}Exposed tools (4)
3 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
gmail_get_email_body_chunk | read | Get a 1k character chunk of an email body starting from the specified offset |
gmail_get_recent_emails | read | Get the most recent emails from Gmail (returns metadata, snippets, and first 1k chars of body) |
gmail_refresh_token | read | Refresh the access token using the refresh token and client credentials |
gmail_send_email | write | Send an email via Gmail |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (4)
@modelcontextprotocol/sdk, googleapis, luxon, zod, node-fetch
A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.
This server requires direct access to your Google API credentials. Always keep your tokens and credentials secure and never share them with untrusted parties.
This server requires direct access to your Google API credentials. Always keep your tokens and credentials secure and never share them with untrusted parties.
Gates applied: no_behavioural_pass.
c22ea50df129full audit observations/trust-audit/mcp-server/baryhuang__headless-gmail.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | c22ea50df129 | SAFE | B | 89 | first audit |
Questions
What is the Headless Gmail MCP server?
A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.
What tools does Headless Gmail expose?
4 in total: 3 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Headless Gmail safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Headless Gmail need?
No credential environment variables were found in its source, so it appears to need none.
How does Headless Gmail run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @peakmojo/mcp-server-headless-gmail at 0.1.0.
How current is this page?
The grade is for one exact copy of the source (c22ea50df129), read on 2026-10-08. The repository is watched and re-audited when it changes.