Skip to main content
Glama

Gmail MCP Server

by cskiro

Gmail MCP 服务器

将 Gmail 与 Claude Desktop 集成的模型上下文协议 (MCP) 服务器,使 Claude 能够访问和理解电子邮件内容,同时保持适当的上下文管理和隐私控制。

特征

  • Gmail API 与 OAuth2 身份验证集成
  • 安全令牌管理和存储
  • 注重隐私的数据处理
  • Claude 的上下文窗口管理
  • 全面的日志记录和错误处理
  • Docker 支持,轻松部署

先决条件

  • Node.js >= 18.0.0
  • npm 或 yarn
  • 已启用 Gmail API 的 Google Cloud 项目
  • 克劳德 API 密钥

设置

  1. 克隆存储库:
git clone https://github.com/yourusername/gmail-mcp-server.git cd gmail-mcp-server
  1. 安装依赖项:
npm install
  1. 在根目录中创建一个.env文件,其中包含以下变量:
GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret GOOGLE_REDIRECT_URI=http://localhost:3000/auth/google/callback CLAUDE_API_KEY=your_claude_api_key PORT=3000
  1. 启动开发服务器:
npm run dev

发展

  • npm run dev :使用热重载启动开发服务器
  • npm test :运行测试
  • npm run lint :运行 ESLint

项目结构

gmail-mcp-server/ ├── src/ │ ├── server.js # Main server entry point │ ├── auth.js # Authentication handling │ ├── gmail.js # Gmail API integration │ ├── claude.js # Claude API integration │ ├── logger.js # Logging configuration │ └── utils/ # Utility functions ├── tests/ # Test files ├── .env # Environment variables ├── .gitignore # Git ignore rules ├── package.json # Project dependencies └── README.md # Project documentation

贡献

  1. 分叉存储库
  2. 创建你的功能分支( git checkout -b feature/amazing-feature
  3. 提交您的更改( git commit -m 'Add some amazing feature'
  4. 推送到分支( git push origin feature/amazing-feature
  5. 打开拉取请求

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

集成服务器允许 Claude Desktop 安全地访问和处理 Gmail 内容,同时保持适当的上下文管理和隐私控制。

  1. 特征
    1. 先决条件
      1. 设置
        1. 发展
          1. 项目结构
            1. 贡献
              1. 执照

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.
                  Last updated -
                  3
                  7
                  8
                  JavaScript
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  Server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
                  Last updated -
                  3,632
                  414
                  JavaScript
                  MIT License
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A server that allows Claude to search and retrieve emails from your Gmail account, supporting functions like searching emails, retrieving full content of specific emails, and listing recent messages.
                  Last updated -
                  2
                  Python
                  Apache 2.0
                • -
                  security
                  F
                  license
                  -
                  quality
                  An integration server that provides Claude Desktop access to Gmail, enabling users to view recent emails and search their Gmail inbox using natural language commands.
                  Last updated -
                  6
                  Python

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/cskiro/gmail-mcp-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server