Gmail MCP Server
# MCP Gmail Server
A minimal Model Context Protocol (MCP) server that sends emails through Gmail.
## Quick Start
1. Install dependencies:
```bash
npm install
```
2. Set up Gmail credentials:
```bash
cp .env.example .env
# Edit .env with your Gmail credentials
```
3. Build and run:
```bash
npm run build
npm start
```
## Configuration
Set these environment variables in `.env`:
- `GMAIL_USER`: Your Gmail address
- `GMAIL_PASS`: Gmail App Password (not your regular password)
## Usage
The server exposes one tool: `send_email`
**Parameters:**
- `to`: Recipient email address
- `subject`: Email subject line
- `body`: 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
```bash
# 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 states
TDQS
Scored across 1 tool
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.