Gmail Server for Model Context Protocol (MCP) logo

Gmail Server for Model Context Protocol (MCP)

by jasonsum

This MCP server integrates with Gmail to enable sending, removing, reading, drafting, and responding to emails. It allows an MCP client to interact with a user's Gmail account, with user prompts before actions are taken.

View on GitHub

Last updated: N/A

What is Gmail Server for Model Context Protocol (MCP)?

This is a Gmail server designed for use with the Model Context Protocol (MCP). It provides a set of tools to interact with a Gmail account, enabling functionalities like sending emails, trashing emails, marking emails as read, retrieving unread emails, and reading email content.

How to use Gmail Server for Model Context Protocol (MCP)?

To use this server, you need to set up the Gmail API in Google Cloud, configure an OAuth consent screen, enable the Gmail API, and create an OAuth Client ID. After setting up the Gmail API, you need to configure the server with the credentials file path and token path. The server can then be integrated with an MCP client, such as Claude Desktop, by adding the server configuration to the client's configuration file. You can also test the server using MCP Inspector.

Key features of Gmail Server for Model Context Protocol (MCP)

  • Send emails to recipients

  • Move emails to trash

  • Mark emails as read

  • Retrieve unread emails

  • Retrieve email content

  • Open email in browser

Use cases of Gmail Server for Model Context Protocol (MCP)

  • Automated email sending from applications

  • Email management through a custom interface

  • Integration of email functionality into AI assistants

  • Building custom email workflows

FAQ from Gmail Server for Model Context Protocol (MCP)

What is the purpose of this server?

The server allows MCP clients to interact with a Gmail account programmatically.

What Gmail API scopes are required?

The https://www.googleapis.com/auth/gmail/modify scope is required.

How do I authenticate with the Gmail API?

You need to create an OAuth Client ID in Google Cloud and use the downloaded JSON file as the credentials file.

Where are the access tokens stored?

Access tokens are stored in the file path specified by the --token-path parameter.

How can I test the server?

You can test the server using MCP Inspector.