MCP Gmail Server
Enables users to read unread emails and create email drafts directly within their Gmail account via the Gmail API.
Provides access to Google services for managing email workflows, including fetching message content and composing responses.
Integrates with the Google Cloud Platform to manage OAuth 2.0 credentials and enable the Gmail API for secure server authentication.
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., "@MCP Gmail ServerShow me my last 5 unread emails"
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 server that uses model context protocol[https://modelcontextprotocol.io/] to read and create drafts of emails from Gmail.
Project setup
Create Oauth client and add secrets:
Create a Google Cloud Project
In the top-left, open the project dropdown and click New Project
Give your project a name (e.g., Gmail API Demo)
Click Create Your project is now created; make sure it’s selected in the project dropdown.
Enable the Gmail API
Go to the API Library: https://console.cloud.google.com/apis/library
Search for Gmail API
Click it → Enable
Configure OAuth 2.0 Credentials
Navigate to: APIs & Services → Credentials
You’ll be prompted to configure the OAuth Consent Screen (if first time creating OAuth credentials)
Choose External if users outside your Google Workspace will use it
Fill in details
Add test users (email addresses allowed to authorize during development)
Save the configuration
Click Create Credentials → OAuth client ID
Choose the application type: Desktop app (for testing/dev)
Name it
Click Create
You will now receive:
Client ID
Client Secret Download them as JSON for use in your code.
Save the JSON as "client_secret_oauth_gcp.json" in the root of this project. (note this should be stored securely and not commited to github.)
Install and run app
Install uv: https://docs.astral.sh/uv/getting-started/installation/
Install dependencies with uv:
uv sync
Start server:
uv run -m src.mcp_server_gmail
Claude desktop
Install Claude Desktop
Set claude_desktop_config.json file to:
{
"mcpServers": {
"gmail": {
"command": "/Users/myname/Documents/Coding/fac-mcp-gmail-server/.venv/bin/python",
"args": [
"-m",
"mcp_server_gmail"
],
"env": {
"PYTHONPATH": "/Users/myname/Documents/Coding/fac-mcp-gmail-server/src"
},
"cwd": "/Users/myname/Documents/Coding/fac-mcp-gmail-server"
}
}
}Ensuring the directory paths are replaced appropriately with your local directory paths.
Test (manual)
Go to claude desktop
Try the following: "Get last 3 unread emails" "Create draft emails for these"
See /docs/working_examples, for examples screenshots of the mcp server
Related MCP server: Gmail Assistant MCP
Features
Gmail Oauth set up
MCP server for read and drafting emails on gmail
Available Tools
2 toolscreate_draft_replyC
Create a draft reply to an email
| Name | Required | Description | Default |
|---|---|---|---|
| message_content | Yes | ||
| message_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It only states the action without explaining side effects, permissions required, or whether the draft is saved automatically. The agent lacks information about the tool's mutability or safety profile.
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 short sentence, which is concise and front-loaded. However, it may be too terse for the agent to understand context. It earns its place but could benefit from slight expansion.
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 simplicity and the presence of an output schema, the description is minimal but lacks essential context about usage, parameter details, and behavioral traits. It does not fully enable correct selection and invocation.
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?
Schema description coverage is 0%, and the description adds no meaning to the parameters 'message_content' and 'message_id'. It does not clarify what format or content is expected, or how to obtain the message_id. The schema already provides minimal info, but the description should compensate.
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 'Create a draft reply to an email' uses a specific verb and resource, clearly indicating the action and the type of email operation. It distinguishes well from the sibling tool 'get_unread_emails', which is a read operation.
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?
No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, context, or when not to use it. There is no mention of the sibling tool or alternative scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_unread_emailsA
Get a list of unread emails
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears the full burden of behavioral disclosure, but it fails to mention any behavioral traits such as authentication requirements, rate limits, or what happens when no unread emails exist. The output schema exists but the description does not leverage it to clarify return behavior.
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 front-loaded sentence containing no extraneous words. It is concise and immediately communicates the core purpose.
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 has zero parameters and an output schema likely describing the return format, the description is minimally adequate but lacks important context such as whether it returns all unread emails or a subset, and whether pagination is involved. The description could be more complete, e.g., mentioning the scope or ordering.
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 tool has zero parameters, and the input schema coverage is 100% (empty). Baseline for zero parameters is 4, and the description adds no additional parameter details. It is adequate given the lack of parameters.
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 'Get a list of unread emails' uses a specific verb 'Get' and clearly identifies the resource 'unread emails', leaving no ambiguity about the tool's function. It is distinct from the sibling tool 'create_draft_reply', which is a write operation.
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?
No usage guidelines are provided. The description does not state when to use this tool versus alternatives, nor does it offer any context about prerequisites or contraindications. The sibling tool 'create_draft_reply' is mentioned in context but not in the description itself.
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. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
create_draft_reply - First observed
get_unread_emails
TDQS
The two tools have clearly distinct purposes: one retrieves unread emails, the other creates draft replies. No overlap or ambiguity.
Both tools follow the verb_noun pattern with snake_case, consistent and predictable naming.
With only 2 tools for a Gmail server, the surface is too thin. A typical Gmail integration would require many more operations.
The tool set is severely incomplete for email management: missing send, search, archive, delete, label management, and other essential operations.
Maintenance
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 end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceIntegrates Gmail with Claude Desktop to fetch unread emails, generate AI-powered draft replies with customizable tone and style guides, and manage your inbox through natural language commands.MIT
- FlicenseNot gradedqualityDmaintenanceIntegrates Gmail with Claude to fetch unread emails and generate draft replies based on user context and writing style guidelines stored in Google Docs. It enables automated email management and drafting through natural language interactions within the Model Context Protocol framework.-
- FlicenseNot gradedqualityCmaintenanceEnables reading unread emails and creating draft replies in Gmail via Claude Desktop.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables Claude Desktop to interact with Gmail through secure OAuth 2.0 authentication. Send emails, search messages, read emails, and manage multiple Gmail accounts directly from Claude Desktop.215MIT
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/VatsKan/mcp-gmail-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server