Skip to main content
Glama
mundume
by mundume

gmail-mcp MCP Server

a gmail mcp server built on top of typescript and the gmail api

This is a TypeScript-based MCP server that implements a simple notes system. It demonstrates core MCP concepts by providing:

  • Resources representing text notes with URIs and metadata

  • Tools for creating new notes

  • Prompts for generating summaries of notes

Features

Resources

  • List and access notes via note:// URIs

  • Each note has a title, content and metadata

  • Plain text mime type for simple content access

Tools

  • create_note - Create new text notes

    • Takes title and content as required parameters

    • Stores note in server state

Prompts

  • summarize_notes - Generate a summary of all stored notes

    • Includes all note contents as embedded resources

    • Returns structured prompt for LLM summarization

Related MCP server: filesystem-mcp

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

Installing via Smithery

To install Gmail Notes Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @mundume/gmail-mcp --client claude

Installing Manually

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "gmail-mcp": {
      "command": "/path/to/gmail-mcp/build/index.js"
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Available Tools

3 tools
getEmailContentC

Retrieve the full content of an email from Gmail.

ParametersJSON Schema
NameRequiredDescriptionDefault
emailIndexYesThe index of the email to retrieve.

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool retrieves email content but doesn't mention important aspects like authentication requirements, rate limits, error conditions, or what format the content is returned in (plain text, HTML, attachments). This leaves significant gaps for an agent to understand how to use it effectively.

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, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple retrieval tool and gets straight to the point.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'full content' includes (body, headers, attachments), doesn't mention authentication needs, and provides no context about how emailIndex is obtained or validated. Given the complexity of email retrieval and lack of structured metadata, more completeness is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents the emailIndex parameter. The description doesn't add any additional parameter context beyond what's in the schema, such as explaining how emailIndex relates to listEmails output or valid index ranges. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Retrieve') and target ('full content of an email from Gmail'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'listEmails' or 'sendEmail' beyond the obvious functional difference.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (like needing to list emails first to get an index), nor does it clarify the relationship with 'listEmails' for obtaining the required emailIndex parameter.

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

listEmailsB

List emails from Gmail with subject, sender, and body in Markdown format. Optionally filter and summarize results.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNoThe search query to filter emails. Use 'in:inbox','in:spam' 'in:unread', 'in:starred', 'in:sent', 'in:all', 'in:category_social', 'in:category_promotions', 'in:category_updates', 'in:category_forums', 'in:primary' or 'in:draft' to filter by label.in:inbox
maxResultsNoThe maximum number of emails to retrieve.

TDQS

B3.3/5.0
Behavior2/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 of behavioral disclosure. It mentions the output format ('Markdown format') and optional filtering/summarizing, but lacks critical details: it doesn't specify authentication needs, rate limits, pagination behavior, whether summaries are generated automatically or require parameters, or what happens if no emails match the query. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 concise and front-loaded: the first sentence clearly states the core functionality, and the second adds optional features without redundancy. Every sentence earns its place by providing essential information, making it efficient and well-structured.

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

Completeness3/5

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

Given the tool's moderate complexity (listing emails with filtering), no annotations, and no output schema, the description is partially complete. It covers the basic purpose and output format but lacks details on authentication, error handling, summarization mechanics, and how results are structured. This is adequate as a minimum but has clear gaps for effective agent use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents both parameters ('query' and 'maxResults') with descriptions and defaults. The description adds marginal value by mentioning 'Optionally filter and summarize results,' which hints at the 'query' parameter's purpose but doesn't provide additional semantic context beyond what's in the schema. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'List emails from Gmail with subject, sender, and body in Markdown format.' It specifies the verb ('List'), resource ('emails from Gmail'), and output format details. However, it doesn't explicitly distinguish this tool from its sibling 'getEmailContent' beyond the listing vs. content retrieval distinction.

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

Usage Guidelines3/5

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

The description provides implied usage guidance through 'Optionally filter and summarize results,' suggesting this tool is for listing with optional filtering. It doesn't explicitly state when to use this vs. 'getEmailContent' (which likely retrieves a single email's full content) or 'sendEmail,' nor does it mention prerequisites like authentication requirements.

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

sendEmailC

Send an email from Gmail.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesRecipient email address.
subjectYesEmail subject.
bodyYesEmail body.

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as authentication requirements, rate limits, whether emails are sent immediately or queued, or potential side effects like saving drafts.

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 extremely concise with a single sentence that directly states the tool's function. It's front-loaded with no wasted words, making it easy to parse quickly.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address important context like authentication needs, error handling, or what happens after sending. Given the complexity of email sending, more behavioral disclosure is needed.

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

Parameters3/5

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

The input schema has 100% description coverage, so parameters are fully documented there. The description adds no additional meaning beyond the schema, which already explains 'to', 'subject', and 'body'. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('Send') and resource ('email from Gmail'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'getEmailContent' or 'listEmails', which are read operations versus this write operation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like authentication, compare to siblings, or specify scenarios where sending is appropriate versus reading emails.

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. 3 tool updatesv0.1.0
    • First observedgetEmailContent
    • First observedlistEmails
    • First observedsendEmail

TDQS

B3.3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: getEmailContent retrieves a specific email's full content, listEmails lists emails with optional filtering/summarization, and sendEmail sends emails. There is no overlap in functionality, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern (getEmailContent, listEmails, sendEmail) with clear, descriptive names. The naming style is uniform throughout the set, enhancing readability and predictability.

Tool Count3/5

With only 3 tools, the set feels thin for a Gmail integration, as it lacks operations like deleting emails, marking as read/unread, or managing labels. While the core functions are present, the scope is limited compared to typical email management needs.

Completeness3/5

The tools cover basic read (get, list) and write (send) operations, but there are notable gaps in the email lifecycle, such as updating email status (e.g., delete, archive, mark as read) or handling attachments. This could lead to agent workarounds for common email tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers