Зміст курсу
Agentic AI for Automating Daily Office Tasks
Agentic AI for Automating Daily Office Tasks
Automating Gmail with Claude
Email management is fundamental to every profession, yet Claude's built-in Google integrations offer limited functionality—such as only checking your inbox without the ability to create drafts or send emails. This chapter demonstrates how to install and configure a free Gmail MCP server that provides comprehensive email automation capabilities.
Google Cloud Console Setup
- Navigate to Google Cloud Console;
- Create a new project or select an existing one;
- Enter project name (e.g., "gmail mcp agent");
- Accept suggested organization and location settings;
- Click Create and wait for project initialization.
- From the side menu, go to "APIs & Services" → "Library";
- Search for "Gmail API";
- Select the first result and click "Enable";
- This grants your project permission to access Gmail functionality.
- Navigate to the "Credentials" tab;
- If prompted, click "Configure consent screen";
- Click "Get started";
- Enter application name (e.g., "gmail agent");
- Input your email address;
- Select "External Audience" for user type, if you use general Gmail account;
- Re-enter your email address when prompted;
- Accept the user data policy;
- Click Continue and Create.
- Click "Create OAuth Client";
- Select "Web Application";
- Accept the suggested name or customize;
- Click "Add URI";
- Enter the redirect URI:
http://localhost:3000/oauth2callback
; - Click the blue Create button;
- Download the JSON credentials file;
- Rename the file to:
gsp-oauth.keys.json
.
Navigate to your root/home directory:
- Mac: Home folder
Users/user_name
or Windows:C:\Users\Your_Username\
; - Use
Command + Shift + .
(Mac) orCtrl + Shift + .
(Windows) to show hidden files; - Create a new folder named:
.gmail-mcp
; - Move the
gsp-oauth.keys.json
file into this folder; - Use
Command + Shift + .
again to hide folders.
The server is configured to automatically locate credentials in this directory.
Smithery is a package manager specifically designed for MCP servers that simplifies installation and management of AI agents through automated setup commands.
For quick setup, use Smithery with the following command:
npx -y @smithery/cli install @gongrzhe/server-gmail-autoauth-mcp --client claude
Update Configuration File
- In Claude Desktop, press
Command + ,
(Mac) orCtrl + ,
(Windows); - Click "Edit Config";
- Open the configuration file in a text editor;
- Copy the configuration block;
{
"mcpServers": {
"desktop-commander": {
"command": "npx",
"args": [
"-y",
"@wonderwhy-er/desktop-commander"
]
},
"gmail": {
"command": "npx",
"args": [
"@gongrzhe/server-gmail-autoauth-mcp"
]
}
}
}
- Paste it into your Claude config file after previous configuration block and before two last closing curly brackets;
- Save the file (
Command/Ctrl + S
); - Completely close and reopen Claude Desktop.
Дякуємо за ваш відгук!