Gmail MCP Server

MIT License

Integrations

  • Provides access to email content from Gmail accounts using OAuth2 authentication, allowing Claude to read and understand emails while maintaining context and privacy controls.

  • Integrates with Google Cloud Project for Gmail API access, handling authentication and token management for secure access to email data.

Gmail MCP サーバー

Gmail と Claude Desktop を統合するモデル コンテキスト プロトコル (MCP) サーバー。これにより、Claude は適切なコンテキスト管理とプライバシー制御を維持しながら、メールの内容にアクセスして理解できるようになります。

特徴

  • OAuth2認証によるGmail API統合
  • 安全なトークン管理と保管
  • プライバシー重視のデータ処理
  • クロードのコンテキストウィンドウ管理
  • 包括的なログ記録とエラー処理
  • 簡単に導入できる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

適切なコンテキスト管理とプライバシー制御を維持しながら、Claude Desktop が Gmail コンテンツに安全にアクセスして処理できるようにする統合サーバー。

  1. Features
    1. Prerequisites
      1. Setup
        1. Development
          1. Project Structure
            1. Contributing
              1. License
                ID: 89f8mrxo7p