Atlas / MCP servers / baryhuang / Headless Gmail

Headless GmailSAFE

mcp/baryhuang/headless-gmail

A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
4 3r · 1w · 0d
Transport
stdio
License
MIT
Stars
55
01

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

Read from source at commit c22ea50df129OBSERVED · 2026-10-08
02

Connect

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-code
claude mcp add mcp-server-headless-gmail -- npx -y @peakmojo/[email protected]
claude-desktop
{
  "mcpServers": {
    "mcp-server-headless-gmail": {
      "command": "npx",
      "args": [
        "-y",
        "@peakmojo/[email protected]"
      ]
    }
  }
}
03

Exposed tools (4)

3 read · 1 write · 0 destructive.

ToolRiskDescription
gmail_get_email_body_chunkreadGet a 1k character chunk of an email body starting from the specified offset
gmail_get_recent_emailsreadGet the most recent emails from Gmail (returns metadata, snippets, and first 1k chars of body)
gmail_refresh_tokenreadRefresh the access token using the refresh token and client credentials
gmail_send_emailwriteSend an email via Gmail
04

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.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, googleapis, luxon, zod, node-fetch
Why it matters. 5 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
README.md:5
A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
README.md:237
This server requires direct access to your Google API credentials. Always keep your tokens and credentials secure and never share them with untrusted parties.
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
README.md:237
This server requires direct access to your Google API credentials. Always keep your tokens and credentials secure and never share them with untrusted parties.
Why it matters. asks the agent to read credentials

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha c22ea50df129full audit observations/trust-audit/mcp-server/baryhuang__headless-gmail.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08c22ea50df129SAFEB89first audit
06

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.

Advertisement