Thanks to Master Lailton, we are able to manage our gmail account using AI and a MCP server :idea:
These are the steps to do it. We are using vscode (with its builtin MCP support) for free testing.
1. Set the permissions from https://console.cloud.google.com/auth/scopes
2. Click on "Add or remove permits"
3. Select the six first checkboxes and click at the bottom on "update"
4. Click on "create client" from https://console.cloud.google.com/auth/clients
5. Select "web app" as the app type
6. Click on "Add URI" on "authorized redirections URIs"
7. Use this URI: http://localhost:3000/oauth2callback
8. Click on "Create" button
9. It will offer you to save a JSON file, save it
10. Rename the JSON file as gcp-oauth.keys.json
11. Save it in /Users/name/.gmail-mcp
12. Go to /Users/name/.gmail-mcp and run this: npx @gongrzhe/server-gmail-autoauth-mcp auth
(you are installing a node app from https://github.com/GongRzhe/Gmail-MCP-Server)
13. Do the required steps and you will get "Authentication successful! You can close this window."
14. Open vscode and select "Agent" mode (bottom left in Copilot chat)
15. Write in copilot agent chat: "tell me my last gmail email"
These are the steps to do it. We are using vscode (with its builtin MCP support) for free testing.
1. Set the permissions from https://console.cloud.google.com/auth/scopes
2. Click on "Add or remove permits"
3. Select the six first checkboxes and click at the bottom on "update"
4. Click on "create client" from https://console.cloud.google.com/auth/clients
5. Select "web app" as the app type
6. Click on "Add URI" on "authorized redirections URIs"
7. Use this URI: http://localhost:3000/oauth2callback
8. Click on "Create" button
9. It will offer you to save a JSON file, save it
10. Rename the JSON file as gcp-oauth.keys.json
11. Save it in /Users/name/.gmail-mcp
12. Go to /Users/name/.gmail-mcp and run this: npx @gongrzhe/server-gmail-autoauth-mcp auth
(you are installing a node app from https://github.com/GongRzhe/Gmail-MCP-Server)
13. Do the required steps and you will get "Authentication successful! You can close this window."
14. Open vscode and select "Agent" mode (bottom left in Copilot chat)
15. Write in copilot agent chat: "tell me my last gmail email"