Gmail Server for Model Context Protocol (MCP)
Model Context Protocol (MCP) server for Gmail
Overview
The Gmail MCP Server is a server that enables integration with Gmail through the Model Context Protocol (MCP), allowing clients to access and manage Gmail functionalities.
To use the Gmail MCP Server, set up a Google Cloud Project, install the server, configure it for an MCP client like Claude Desktop, and authorize access through OAuth2.
- View recent emails from your Gmail inbox - Search emails using Gmail's search syntax - Secure OAuth2 authentication with the Gmail API
- Accessing and managing emails via custom desktop applications.
- Automating email searches for specific queries.
- Enhancing productivity by integrating email functions in other applications.
Add to your AI client
Use these steps to connect Gmail Server for Model Context Protocol (MCP) in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"gmail-mcp-server-jasonsum": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-server-jasonsum"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"gmail-mcp-server-jasonsum": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-server-jasonsum"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"gmail-mcp-server-jasonsum": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-server-jasonsum"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"gmail-mcp-server-jasonsum": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-server-jasonsum"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"gmail-mcp-server-jasonsum": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-server-jasonsum"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"gmail-mcp-server-jasonsum": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-server-jasonsum"
]
}
}
}FAQ
What is required to run the Gmail MCP Server?
You need to set up a Google Cloud Project, enable the Gmail API, and create OAuth 2.0 credentials.
Can I manage emails with this server?
Yes! The server supports viewing and searching for emails based on Gmail's search syntax.
Is any personal data stored by the server?
Only OAuth credentials are stored locally; access can be revoked at any time through your Google Account settings.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":236,"uuid":"53a619c5-bf18-4a8a-a579-f71ad55df345","name":"gmail-mcp-server","title":"Gmail Server for Model Context Protocol (MCP)","description":"Model Context Protocol (MCP) server for Gmail","avatar_url":"https://avatars.githubusercontent.com/u/58369680?v=4","created_at":"2024-12-13T10:39:11.661Z","updated_at":"2024-12-13T12:28:10.286Z","status":"created","author_name":"jasonsum","author_avatar_url":"https://avatars.githubusercontent.com/u/58369680?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/jasonsum/gmail-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]