
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
gmail-mcp-server
Advanced tools
Gmail MCP Server with on-demand authentication for SIYA/Claude Desktop. Complete Gmail integration with multi-user support and OAuth2 security.
A comprehensive Model Context Protocol (MCP) server for Gmail integration with SIYA/Claude Desktop and other MCP-compatible clients. Features on-demand authentication, multi-user support, and complete Gmail API access.
Add to your siya_desktop_config.json or claude_desktop_config.json:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"gmail-mcp-server@latest",
"--client-id", "your-google-oauth2-client-id",
"--client-secret", "your-google-oauth2-client-secret"
]
}
}
}
Optional: Add custom redirect URI if needed:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"gmail-mcp-server@latest",
"--client-id", "your-google-oauth2-client-id",
"--client-secret", "your-google-oauth2-client-secret",
"--redirect-uri", "http://localhost:8080/oauth2callback"
]
}
}
}
⚠️ macOS with NVM Users: If you get "spawn npx ENOENT" error, see NPX Troubleshooting.
npx gmail-mcp-server@latest --help
http://localhost:44000/oauth2callback to authorized redirect URIs--redirect-uri or GMAIL_REDIRECT_URI, add your custom URIhttp://localhost:44000/oauth2callback through http://localhost:44010/oauth2callbackExamples of redirect URIs to add:
http://localhost:44000/oauth2callback (default)
http://localhost:8080/oauth2callback (custom port)
https://yourdomain.com/oauth2callback (production)
The server supports three ways to provide credentials:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"gmail-mcp-server@latest",
"--client-id", "676239218521-example.apps.googleusercontent.com",
"--client-secret", "GOCSPX-example-secret",
"--redirect-uri", "http://localhost:8080/oauth2callback"
]
}
}
}
Note: The --redirect-uri is optional and defaults to http://localhost:44000/oauth2callback.
export GMAIL_CLIENT_ID="your-client-id"
export GMAIL_CLIENT_SECRET="your-client-secret"
export GMAIL_REDIRECT_URI="http://localhost:8080/oauth2callback" # Optional, defaults to http://localhost:44000/oauth2callback
npx gmail-mcp-server@latest
# Download OAuth2 JSON from Google Cloud Console
mkdir -p ~/.gmail-mcp
cp /path/to/credentials.json ~/.gmail-mcp/credentials.json
npx gmail-mcp-server@latest
Once authenticated, you stay signed in for months! The server automatically:
This means you authenticate once and use Gmail tools seamlessly for months without interruption.
The server starts immediately without requiring authentication upfront:
📧 Gmail MCP Server starting...
🔐 Authentication will be handled when you use Gmail tools or call "quick_authenticate"
First time you try any Gmail operation, you'll see:
🔐 **Authentication Required**
To use Gmail tools, please authenticate first:
**Option 1:** Use the `gmail_authenticate` tool with mode='auto' for automatic authentication
**Option 2:** Use the `gmail_authenticate` tool with mode='manual' to get a clickable authentication link
After authentication, you can use all Gmail tools!
Once authenticated, you have access to:
--multi-user){
"tool": "gmail_send_email",
"arguments": {
"to": ["recipient@example.com"],
"subject": "Hello from SIYA!",
"text": "This is a plain text email.",
"html": "<h1>Hello!</h1><p>This is an <strong>HTML</strong> email.</p>"
}
}
{
"tool": "gmail_draft",
"arguments": {
"action": "create",
"to": ["recipient@example.com"],
"subject": "Draft Email",
"text": "This will be saved as a draft.",
"attachments": [
{
"filename": "document.pdf",
"content": "base64-encoded-content",
"contentType": "application/pdf"
}
]
}
}
{
"tool": "gmail_search_emails",
"arguments": {
"query": "is:unread has:attachment",
"maxResults": 10
}
}
{
"tool": "gmail_draft",
"arguments": {
"action": "list",
"maxResults": 20
}
}
{
"tool": "gmail_draft",
"arguments": {
"action": "update",
"draftId": "draft_id_here",
"to": ["updated@example.com"],
"subject": "Updated Draft Subject",
"text": "Updated draft content"
}
}
{
"tool": "gmail_draft",
"arguments": {
"action": "send",
"draftId": "draft_id_here"
}
}
Enable multiple Gmail accounts with the --multi-user flag:
npx gmail-mcp-server@latest --multi-user --client-id "your-id" --client-secret "your-secret"
--multi-user flaggmail_authenticate_useruserId parameter for each operationgmail_manage_session{
"tool": "gmail_authenticate_user",
"arguments": {
"userEmail": "user1@gmail.com"
}
}
After authentication, use the returned userId for operations:
{
"tool": "gmail_send_email",
"arguments": {
"userId": "user_12345",
"to": ["recipient@example.com"],
"subject": "Email from User 1",
"text": "This email is sent from user1@gmail.com account"
}
}
If you get "spawn npx ENOENT" error on macOS with NVM:
# Create wrapper directory
mkdir -p ~/bin
# Create NPX wrapper script
echo '#!/bin/bash' > ~/bin/npx
echo 'exec ~/.nvm/versions/node/v22.14.0/bin/npx "$@"' >> ~/bin/npx
chmod +x ~/bin/npx
# Update SIYA/Claude Desktop config
Updated SIYA/Claude Desktop Config:
{
"mcpServers": {
"gmail": {
"command": "/Users/yourusername/bin/npx",
"args": [
"gmail-mcp-server@latest",
"--client-id", "your-client-id",
"--client-secret", "your-client-secret"
]
}
}
}
Replace /Users/yourusername/ with your actual home directory path.
node --version # e.g., v22.14.0
ls ~/.nvm/versions/node/ # List available versions
npx gmail-mcp-server@latest --debug --client-id "your-id" --client-secret "your-secret"
"Gmail credentials not configured"
npm uninstall -g gmail-mcp-server to clear cachenpx gmail-mcp-server@latest to force latest version"spawn npx ENOENT"
"Duplicate tools showing up"
npx gmail-mcp-server@latest to get latest versionAuthentication popup on startup
npx gmail-mcp-server@latest to get latest versionnpx gmail-mcp-server@latest --help # Shows current version info
npx gmail-mcp-server@latest [options]
Options:
--client-id <id> OAuth2 client ID
--client-secret <secret> OAuth2 client secret
--redirect-uri <uri> OAuth2 redirect URI (default: http://localhost:44000/oauth2callback)
--multi-user Enable multi-user mode
--setup-auth Interactive credential setup
--reset-auth Clear stored authentication
--debug Enable debug logging
--non-interactive Run without prompts
--help Show help information
# Custom port
npx gmail-mcp-server@latest --client-id "your-id" --client-secret "your-secret" --redirect-uri "http://localhost:8080/oauth2callback"
# Production domain
npx gmail-mcp-server@latest --client-id "your-id" --client-secret "your-secret" --redirect-uri "https://myapp.com/gmail/callback"
# Environment variable (alternative)
export GMAIL_REDIRECT_URI="http://localhost:3000/auth/callback"
npx gmail-mcp-server@latest --client-id "your-id" --client-secret "your-secret"
~/.gmail-mcp/The server supports flexible redirect URI configuration for different deployment scenarios:
Default Configuration:
http://localhost:44000/oauth2callbackCustom Port Example:
# Command line
npx gmail-mcp-server@latest --redirect-uri "http://localhost:8080/oauth2callback"
# Environment variable
export GMAIL_REDIRECT_URI="http://localhost:8080/oauth2callback"
npx gmail-mcp-server@latest
Production Deployment:
# For production with custom domain
npx gmail-mcp-server@latest --redirect-uri "https://myapp.com/gmail/callback"
Key Features:
/oauth2callback)export GMAIL_TOKEN_DIR="/custom/path/to/tokens"
npx gmail-mcp-server@latest
npx gmail-mcp-server@latest --non-interactive --client-id "id" --client-secret "secret"
npx gmail-mcp-server@latest --reset-auth
userId parameteris:unread, has:attachment, etc.)after:2024/01/01, before:2024/12/31)MIT License - see LICENSE file for details.
@latest tag for newest features📧 Happy emailing with SIYA/Claude Desktop! 🚀
FAQs
Gmail MCP Server with on-demand authentication for SIYA/Claude Desktop. Complete Gmail integration with multi-user support and OAuth2 security.
The npm package gmail-mcp-server receives a total of 45 weekly downloads. As such, gmail-mcp-server popularity was classified as not popular.
We found that gmail-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.