MCP cover image
See in Github
2025-04-14

0

Github Watches

0

Github Forks

0

Github Stars

Gmail AutoAuth MCP Server

Un servidor MCP (Model Context Protocol) para integración con Gmail en Claude Desktop con soporte de autenticación automática. Este servidor permite a los asistentes de IA gestionar Gmail a través de interacciones en lenguaje natural.

smithery badge

Características

  • Enviar correos con asunto, contenido, archivos adjuntos y destinatarios
  • Soporte completo para caracteres internacionales
  • Leer mensajes por ID con manejo avanzado de estructura MIME
  • Ver información de archivos adjuntos
  • Buscar correos con varios criterios
  • Gestión completa de etiquetas
  • Listar todas las etiquetas disponibles
  • Listar correos en bandeja de entrada, enviados o etiquetas personalizadas
  • Marcar correos como leídos/no leídos
  • Mover correos entre etiquetas
  • Eliminar correos
  • Operaciones por lotes para procesar múltiples correos

Instalación y Autenticación

Opción 1: Usando npx (Recomendado para uso personal)

  1. Obtener credenciales de Google Cloud:

    • Ve a Google Cloud Console
    • Crea un nuevo proyecto o selecciona uno existente
    • Habilita la API de Gmail
    • Ve a "APIs & Services" > "Credentials"
    • Crea credenciales OAuth 2.0
    • Descarga el archivo JSON de credenciales
    • Renómbralo a gcp-oauth.keys.json
  2. Configurar autenticación:

    # Crea el directorio de configuración
    mkdir -p ~/.gmail-mcp
    
    # Mueve las credenciales al directorio
    mv gcp-oauth.keys.json ~/.gmail-mcp/
    
    # Ejecuta la autenticación
    npx @gongrzhe/server-gmail-autoauth-mcp auth
    
  3. Configurar en Claude Desktop:

    {
      "mcpServers": {
        "gmail": {
          "command": "npx",
          "args": [
            "@gongrzhe/server-gmail-autoauth-mcp"
          ]
        }
      }
    }
    

Opción 2: Usando Node.js (Recomendado para desarrollo o distribución)

  1. Clonar el repositorio:

    git clone [url-del-repositorio]
    cd Gmail-MCP-Server
    
  2. Instalar dependencias:

    npm install
    
  3. Configurar variables de entorno:

    • Copia el archivo .env.example a .env
    • Edita .env con tus credenciales:
      GOOGLE_CLIENT_ID="tu-client-id"
      GOOGLE_CLIENT_SECRET="tu-client-secret"
      GOOGLE_REFRESH_TOKEN="tu-refresh-token"
      GOOGLE_REDIRECT_URI="http://localhost:3000/oauth2callback"
      
  4. Compilar el proyecto:

    npm run build
    
  5. Configurar en Claude Desktop:

    {
      "mcpServers": {
        "gmail": {
          "command": "node",
          "args": [
            "ruta/al/dist/index.js"
          ],
          "env": {
            "GOOGLE_CLIENT_ID": "tu-client-id",
            "GOOGLE_CLIENT_SECRET": "tu-client-secret",
            "GOOGLE_REFRESH_TOKEN": "tu-refresh-token",
            "GOOGLE_REDIRECT_URI": "http://localhost:3000/oauth2callback"
          }
        }
      }
    }
    

Comparación de Métodos

Método npx

  • ✅ Más fácil de usar
  • ✅ Renovación automática de tokens
  • ✅ Ideal para uso personal
  • ❌ Requiere configuración manual inicial

Método Node.js

  • ✅ Más control sobre la configuración
  • ✅ Ideal para desarrollo y distribución
  • ✅ Fácil de versionar y compartir
  • ❌ Requiere gestión manual de tokens

Solución de Problemas

Problemas de Autenticación

  • Si recibes invalid_grant, necesitas renovar el token:
    • Con npx: npx @gongrzhe/server-gmail-autoauth-mcp auth
    • Con Node: node dist/index.js auth

Problemas de Conexión

  • Verifica que el puerto 3000 esté disponible
  • Asegúrate de que las credenciales sean correctas
  • Verifica que la API de Gmail esté habilitada

Seguridad

  • Nunca compartas tus credenciales
  • Revoca el acceso en Google Cloud Console si ya no lo necesitas
  • Usa diferentes credenciales para desarrollo y producción
  • Mantén tus tokens seguros y actualizados

Contribuir

Las contribuciones son bienvenidas. Por favor, envía un Pull Request.

Licencia

MIT

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

相关推荐

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • Matthieu Savioux
  • Evaluates language quality of texts, responds with a numerical score between 50-150.

  • justben.fyi
  • Your go-to expert for gameplay walkthroughs and cheat codes.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

  • av
  • Effortlessly run LLM backends, APIs, frontends, and services with one command.

  • 1Panel-dev
  • 🔥 1Panel provides an intuitive web interface and MCP Server to manage websites, files, containers, databases, and LLMs on a Linux server.

  • langgenius
  • Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.

  • alibaba
  • an easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.

  • rulego
  • ⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.

  • Byaidu
  • PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

  • lasso-security
  • A plugin-based gateway that orchestrates other MCPs and allows developers to build upon it enterprise-grade agents.

  • hkr04
  • Lightweight C++ MCP (Model Context Protocol) SDK

    Reviews

    4.7 (3)
    Avatar
    user_cicN4rQJ
    2025-04-24

    The mcp-gmail-extension by Escorza07 is an outstanding tool for enhancing Gmail usage. It seamlessly integrates with my daily workflow, boosting productivity and providing essential functionalities right at my fingertips. Highly recommend this to anyone looking to optimize their email experience!

    Avatar
    user_gYAPST7e
    2025-04-24

    The mcp-gmail-extension by Escorza07 is a game-changer for enhancing Gmail functionality. It seamlessly integrates into the Gmail interface, providing additional features that streamline my email management. I particularly appreciate its user-friendly design and how it boosts my productivity. Highly recommend for anyone looking to elevate their Gmail experience!

    Avatar
    user_TZVQSusv
    2025-04-24

    The mcp-gmail-extension by Escorza07 has dramatically improved my email experience. It seamlessly integrates with Gmail, offering enhanced productivity features that are both intuitive and efficient. The extension's performance is rock-solid, and I haven't encountered any issues since I started using it. Highly recommended for anyone looking to streamline their email workflow.