MCP client and server to hook up Claude to Gmail.
Gmail Mcp Client Server is a project designed to connect the Claude AI model to Gmail, allowing for enhanced email interactions and automation.
To use the project, you need to authenticate with Gmail using OAuth. Run the server.py script with the credentials.json file, authenticate via your browser, and save the session as token.pickle. Then, you can start the client and server using the client.py file.
Use these steps to connect Gmail Mcp Client Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"gmail-mcp-client-server-karimdabbouz": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-client-server-karimdabbouz"
]
}
}
}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-client-server-karimdabbouz": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-client-server-karimdabbouz"
]
}
}
}Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"gmail-mcp-client-server-karimdabbouz": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-client-server-karimdabbouz"
]
}
}
}Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"gmail-mcp-client-server-karimdabbouz": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-client-server-karimdabbouz"
]
}
}
}Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"gmail-mcp-client-server-karimdabbouz": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-client-server-karimdabbouz"
]
}
}
}Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"gmail-mcp-client-server-karimdabbouz": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gmail-mcp-client-server-karimdabbouz"
]
}
}
}You need to run server.py and follow the OAuth authentication process in your browser.
The project is developed in Python, and it is recommended to use Python 3.x.
Yes! The scripts are open for modification to suit your needs.