MCP.so
ログイン

MCP Headless Gmail Server

@baryhuang

基本情報

カテゴリ

コミュニケーション

ライセンス

MIT

トランスポート

stdio

作者

baryhuang

MCP Headless Gmail Server について

A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.

#mcp#gmail#google-suite#gmail-bot#ai-assistant#mcp-server

MCP Headless Gmail Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-headless-gmail": {
      "command": "docker",
      "args": [
        "build",
        "-t",
        "mcp-headless-gmail",
        "."
      ]
    }
  }
}

MCP Headless Gmail Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Headless Gmail Server?

A Model Context Protocol (MCP) server that provides get, send, and refresh Gmail functionality without requiring local credential or token setup. It is designed for headless, remote environments and decouples credential storage from server implementation.

How to use MCP Headless Gmail Server?

Install via pip install -e . or use the Docker image buryhuang/mcp-headless-gmail:latest. Configure an MCP client like Claude Desktop with either the Docker or npx command shown in the README. Provide your Google API credentials (client ID, client secret, access token, refresh token) via tool calls. Start by refreshing the token with gmail_refresh_token, then use tools such as get_recent_emails, get_email_body, and send_email.

Key features of MCP Headless Gmail Server

  • Get recent emails with first 1k characters of body.
  • Retrieve full email body in 1k-character chunks via offset.
  • Send emails through Gmail with plain text or HTML body.
  • Refresh access tokens separately or automatically when expired.
  • Run completely headless in remote environments (no browser, no local files).
  • Docker-ready for isolated, one-click deployment.

Use cases of MCP Headless Gmail Server

  • Automate reading and responding to emails from an AI assistant.
  • Send Gmail messages directly from MCP-enabled clients like Claude Desktop.
  • Integrate Gmail access into marketing or notification workflows without local credential storage.
  • Deploy a stateless Gmail service in containerised or cloud environments.

よくある質問

1

What are the prerequisites?

Python 3.10 or higher and Google API credentials (client ID, client secret, access token, and refresh token).

2

How do I obtain Google API credentials?

Create a project in the Google Cloud Console, enable the Gmail API, configure the OAuth consent screen, create an OAuth client ID (Desktop app type), and use OAuth 2.0 to obtain tokens with scopes `gmail.readonly` and `gmail.send`.

3

How does token refresh work?

The server provides a `gmail_refresh_token` tool that accepts either full credentials or just a refresh token with client ID/secret. It returns a new access token. Automatic refresh is also handled by the underlying Google API client when the access token expires.

4

Can this server run inside Docker?

Yes. The Docker image can be built with `docker build -t mcp-headless-gmail .` and run with a `docker run` command. Configuration for Claude Desktop using Docker is provided in the README.

5

What scopes are required for the Gmail API?

The server requires `https://www.googleapis.com/auth/gmail.readonly` for reading emails and `https://www.googleapis.com/auth/gmail.send` for sending emails.

コメント

「コミュニケーション」の他のコンテンツ