Skip to main content
Glama
gaberogan

gmail-read-mcp

by gaberogan

gmail-read-mcp

Read-only Gmail MCP server scoped to a single mailbox. Exposes two tools over stdio:

  • list_emails - list emails received in a date range: metadata + snippet, oldest-first (max 500)

  • read_email - read one email's full headers and body text by id

No write, send, label, or delete capabilities. Every result carries a jump_url deep link (rfc822msgid: search) that opens the email for anyone signed into the mailbox. Mail sent from the mailbox itself (the team's replies) is excluded by default; spam and trash are always excluded.

Google OAuth setup

  1. Create a Google Cloud project (separate from any production project — the consent screen is per-project) and enable the Gmail API.

  2. Set the OAuth consent screen to Internal (skips restricted-scope verification for the gmail.readonly scope).

  3. Create an OAuth client of type Desktop app and download the client JSON.

  4. Run the one-time consent flow signed in as the target mailbox:

    node scripts/gmail-oauth-once.mjs <path-to-client-secret.json>

    It prints the refresh token and which mailbox it is bound to.

The refresh token has no expiry, but Google revokes Gmail-scope tokens when the account password changes. If the server starts failing with invalid_grant, re-run step 4 and replace GMAIL_REFRESH_TOKEN.

Related MCP server: Gmail MCP Server

Local setup

cp .env.example .env
# Fill in GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REFRESH_TOKEN
npm install
npm start

Testing

npm test

Available Tools

2 tools
list_emailsList emailsA

List emails received in a date range: metadata + snippet, oldest-first, capped at 500 with no truncation flag. Spam and trash are excluded. Mail sent from the mailbox itself (i.e. the team's replies) is excluded unless include_sent is true. Each result has a jump_url deep link that opens the email for anyone signed into the mailbox. Use read_email for the full body.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNoOptional Gmail search query to filter by, e.g. 'subject:refund'
end_timeYesInclusive end of the range (ISO 8601, e.g. 2026-08-26T00:00:00Z)
start_timeYesInclusive start of the range (ISO 8601, e.g. 2026-08-25T00:00:00Z)
include_sentNoInclude mail sent from the mailbox itself (default false)

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden — and it delivers. It discloses the 500-cap with no truncation flag, ordering (oldest-first), exclusions (spam/trash/sent), the include_sent behavior, and the jump_url deep-link per result. Exceptionally rich behavioral disclosure for an un-annotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five dense sentences, each earning its place: return format/ordering/cap, exclusions, sent behavior, jump_url, and sibling routing. Core function is front-loaded and there is zero fluff or repetition of schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-param list tool with no output schema and no annotations, everything an agent needs is covered: return shape (metadata + snippet + jump_url), ordering, cap and absence of pagination, filters, and auth context ('anyone signed into the mailbox'). No material gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds genuine meaning beyond the schema for include_sent — explaining that team replies are excluded by default and why the flag exists. The start_time/end_time and query semantics rest on the schema, but the include_sent elaboration justifies a modest bump.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List emails received in a date range') with concrete behavioral detail — metadata + snippet, oldest-first, capped at 500 with no truncation flag. This precise scope distinguishes it from read_email without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes to the sibling: 'Use read_email for the full body.' It also tells the agent when this tool will NOT capture emails (spam/trash excluded, sent excluded unless include_sent is true), so an agent can predict results before calling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_emailRead an emailA

Read one email by id (from list_emails): full headers and body text (HTML converted to text, capped at 50k chars).

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe Gmail message id to read

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. It reveals two key behaviors: body text is HTML converted to text, and the output is capped at 50k characters. This is useful context that goes beyond a simple 'read email' and does not contradict any annotations (since there are none).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the verb and resource, then adds the key behavioral notes in a parenthetical. Every piece of information earns its place, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter, a clear sibling relationship, and no output schema, the description covers everything an agent needs: what the tool does, where the id comes from, and what the output looks like (headers, body, HTML conversion, size cap). The simplicity of the tool means the description is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with the parameter 'id' documented, giving a baseline of 3. The description adds meaningful context by stating the id comes from list_emails, which clarifies that the id is not arbitrary and likely a Gmail message identifier. This exceeds the schema's minimal description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'read', the resource 'one email by id', and adds a pointer to the sibling tool 'list_emails' for obtaining the id. This distinguishes it from the listing operation and leaves no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly mentions that the id comes from list_emails, which tells the agent when this tool is appropriate (after listing emails). It doesn't explicitly exclude alternatives, but the dependency on a prior call makes the usage context clear without being verbose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedlist_emails
    • First observedread_email

TDQS

A4.7/5.0

Scored across 2 tools

Disambiguation5/5

The two tools, list_emails and read_email, have clearly distinct purposes—one for enumerating emails and the other for fetching full details of a specific email. There is no overlap or confusion possible.

Naming Consistency5/5

Both tool names follow the consistent verb_noun pattern: 'list_emails' and 'read_email'. The naming is predictable and aligns with the server's read-only scope.

Tool Count4/5

With only two tools, the server is minimal but well-suited for a read-only Gmail interface. While the count feels thin relative to typical multi-purpose servers, the narrow scope justifies the small surface.

Completeness5/5

For a read-only mail server, the two tools cover the core workflow: listing emails with metadata and reading a full email by ID. There are no apparent gaps that would impede an agent from retrieving email data.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides access to Gmail functionalities including listing unread emails, searching via query syntax, and managing messages through archiving or marking as read. It enables MCP clients to securely interact with and organize email data using the Gmail API.
    5
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables reading Gmail emails through the Model Context Protocol, supporting listing, searching, and retrieving email details with OAuth 2.0 authentication.
    4
    11 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides read-only access to Gmail, enabling email search, unread listing, message and thread retrieval, and draft reply preparation without sending.
    89 npm
    MIT