Gmail MCP server

Integrates with Gmail to enable natural language-based email management, including searching, reading, deleting, and sending emails with attachment support and conversation threading.
Back to servers
Provider
Ejb503
Release date
Jan 26, 2025
Language
TypeScript
Package
Stats
1.0K downloads
6 stars

This MCP server allows you to interact with your Gmail account using AI assistance for searching, reading, deleting, and sending emails. It's designed to work with the multimodal-mcp-client as the frontend interface, providing a voice-powered way to manage your emails.

Installation

To install and run the systemprompt-mcp-gmail server, you'll need to set up Google authentication credentials and obtain an API key.

Prerequisites

  1. Get a free API key from systemprompt.io/console
  2. Set up Google authentication credentials

Google Authentication Setup

The server requires two environment variables containing base64 encoded credentials:

  • GOOGLE_CREDENTIALS
  • GOOGLE_TOKEN

To generate these credentials, follow these steps:

  1. Visit the multimodal-mcp-client repository
  2. Follow the detailed instructions at: google-auth/README.md

Running the Server

After generating your base64 encoded Google credentials, you can run the server using npx:

# Make sure to set your environment variables first
export GOOGLE_CREDENTIALS="your-base64-encoded-credentials"
export GOOGLE_TOKEN="your-base64-encoded-token"
export API_KEY="your-systemprompt-api-key"

# Run the server
npx systemprompt-mcp-gmail

Usage

The server provides several Gmail operations that can be performed through the multimodal-mcp-client.

Key Features

  • Search Emails: Find emails using keywords, sender names, or date ranges
  • Read Emails: View email content, attachments, and threading information
  • Delete Emails: Remove unwanted messages from your inbox
  • Send Emails: Compose and send new emails with AI assistance

Usage with Multimodal Client

To use this server with the recommended client:

  1. Set up the multimodal-mcp-client according to its documentation
  2. Ensure both the server and client are running
  3. Connect to the server using voice commands through the client

Example Voice Commands

Once connected to the client, you can use natural language commands like:

  • "Search my emails for messages from John about the project"
  • "Read my latest unread email"
  • "Send an email to [email protected] about tomorrow's meeting"
  • "Delete promotional emails from last week"

Advanced Configuration

Sampling and Notifications

The server supports advanced MCP features including:

  • Sampling: Configure how AI responses are processed and filtered
  • Notifications: Receive real-time updates on email operations

These features require an advanced MCP client that supports these capabilities, such as the recommended multimodal-mcp-client.

Demo

To see the systemprompt-mcp-gmail server in action, check out the demonstration video: Watch Demo Video

The demo shows the voice-controlled interactions, multimodal processing, and real-time voice synthesis capabilities of the system.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later