Gmail MCP Server
Enables sending emails through Gmail with support for specifying recipients, subject lines, and plain text message content.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gmail MCP Serversend an email to john@example.com about our meeting tomorrow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Gmail Server
A minimal Model Context Protocol (MCP) server that sends emails through Gmail.
Quick Start
Install dependencies:
npm installSet up Gmail credentials:
cp .env.example .env # Edit .env with your Gmail credentialsBuild and run:
npm run build npm start
Related MCP server: Gmail MCP Server
Configuration
Set these environment variables in .env:
GMAIL_USER: Your Gmail addressGMAIL_PASS: Gmail App Password (not your regular password)
Usage
The server exposes one tool: send_email
Parameters:
to: Recipient email addresssubject: Email subject linebody: Email content (plain text)
Files
src/index.ts- Main MCP server implementation.well-known/mcp.json- MCP server manifest.vscode/mcp.json- VS Code MCP configuration
Testing
# Test with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.js
## How It Works
1. Creates MCP server with Gmail transporter
2. Registers `send_email` tool with input validation
3. Connects via STDIO transport for MCP communication
4. Returns structured responses with success/error statesAvailable Tools
1 toolsend_emailSend EmailB
Send an email using Gmail SMTP
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient email address | |
| subject | Yes | Email subject | |
| body | Yes | Email body content |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | Error message if failed |
| success | Yes | Whether email was sent successfully |
| messageId | No | Message ID from Gmail |
TDQS
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 states 'Send an email using Gmail SMTP,' which implies a write operation but doesn't cover critical aspects like authentication requirements, error handling, rate limits, or whether it's idempotent. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and method, making it easy to scan. Every part of the sentence contributes essential information, earning its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a mutation with 3 parameters), no annotations, and an output schema present, the description is minimally adequate. It covers the basic purpose but lacks details on behavior, usage context, and error handling. The output schema might provide return values, but the description doesn't hint at this, leaving gaps in completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with clear parameter definitions (to, subject, body). The description doesn't add any semantic details beyond what the schema provides, such as formatting examples or constraints. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Send an email using Gmail SMTP' clearly states the action (send) and resource (email), specifying the method (Gmail SMTP). It's specific enough to understand what the tool does, though without sibling tools, differentiation isn't needed. However, it could be more precise about the scope (e.g., whether it's for a single recipient or supports multiple).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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, prerequisites, or contextual constraints. It mentions Gmail SMTP, which implies a specific email service, but doesn't clarify if it's for personal or bulk emails, or if there are rate limits. Without siblings, explicit alternatives aren't required, but usage context is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of confusion or overlap between tools. The tool 'send_email' has a clear and distinct purpose that cannot be mistaken for any other tool in this set.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'send_email' follows a clear verb_noun pattern, which would be consistent if more tools were added.
A Gmail server with only one tool is too limited for its apparent scope. Gmail involves operations like reading, listing, deleting, and managing emails, so a single send tool leaves significant functionality uncovered, making it inappropriate for comprehensive use.
The tool set is severely incomplete for a Gmail server. It only supports sending emails, missing essential operations such as retrieving, listing, deleting, or managing emails and labels. This gap will cause frequent agent failures when trying to perform common Gmail tasks.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Gmail through the Gmail API with OAuth2 authentication. Supports reading, sending, searching emails, and managing read status through natural language.
- FlicenseNot gradedqualityNot gradedmaintenanceEnables interaction with Gmail through the Gmail API, allowing users to list, read, search emails, create and send drafts, and get email summaries through natural language commands with OAuth2 authentication.
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to send, read, list, and reply to emails via the Gmail API.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to send, search, and read emails via Gmail using OAuth2 authentication.1MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PranavMishra28/gmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server