プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

gmail-agent

作者:dremokバージョン 0.3.1i★ –iパソコンで動く
レジストリ名io.github.dremok/gmail-agent

インストール

概要

作者による説明(英語の原文)

Gmail for AI agents: search, read, download attachments, send, reply, drafts, labels.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: チャット・メール

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: GMAIL_AGENT_CONFIG_DIR, GMAIL_AGENT_ALLOWED_DIRS

必要なもの

  • PyPIPythonのuvのインストール(uvxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "gmail-agent": {
      "command": "uvx",
      "args": [
        "gmail-agent",
        "mcp"
      ],
      "env": {
        "GMAIL_AGENT_CONFIG_DIR": "your-value",
        "GMAIL_AGENT_ALLOWED_DIRS": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add gmail-agent --env GMAIL_AGENT_CONFIG_DIR=your-value --env GMAIL_AGENT_ALLOWED_DIRS=your-value -- uvx gmail-agent mcp

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "gmail-agent": {
      "command": "uvx",
      "args": [
        "gmail-agent",
        "mcp"
      ],
      "env": {
        "GMAIL_AGENT_CONFIG_DIR": "your-value",
        "GMAIL_AGENT_ALLOWED_DIRS": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "gmail-agent": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "gmail-agent",
        "mcp"
      ],
      "env": {
        "GMAIL_AGENT_CONFIG_DIR": "your-value",
        "GMAIL_AGENT_ALLOWED_DIRS": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • GMAIL_AGENT_CONFIG_DIR env
    Config dir with credentials.json and token (default ~/.config/gmail-agent)
  • GMAIL_AGENT_ALLOWED_DIRS env
    Extra folders, besides ~/Downloads, the tools may save attachments to and attach files from (separated by :)

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント dremok で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

チャット・メールのほかのサーバーとの比較i

  • このカテゴリのほかの1762件のうち0%よりスターが多い
  • このカテゴリのほかの1762件のうち50%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1762件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

gmail-agentは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.3.1)がレジストリに届いたのは25 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。

代わりに使えるものは?

同じカテゴリには:Vexa, emailmd, MCP WhatsApp Cloud

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Vexa

作者:Vexa-ai

Meeting bot and transcripts for Google Meet, Teams and Zoom. Live or after, speakers labelled.

クラウドで動く★ 2,949Apache-2.02 か月前更新
インストール

emailmd

作者:anypost

Render markdown into email-safe HTML, lint drafts for deliverability problems, and preview emails.

パソコンでもクラウドでも★ 1,385MIT30 日前更新
インストール

MCP WhatsApp Cloud

作者:codespar

MCP server for WhatsApp Cloud API (Meta) — messages, media, and templates via Graph API

パソコンで動く★ 277MIT5 か月前更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

gmail-agent

Gmail for AI agents and the people who run them: search, read, download attachments, send, reply, forward, drafts, labels and trash.

gmail-agent is one small Python package with two faces:

  • a CLI for agents that have a shell (Claude Code, Codex, Aider, your own scripts), with --json output
  • an MCP server over stdio for clients like Claude Desktop and Claude Code

It talks directly to the Gmail API from your machine using your own Google Cloud OAuth client, so there is no third-party server in between. You choose how much access it gets when you log in, from read-only up to full.

Why another one? A lot of real agent work with mail is about attachments: find last quarter's invoices, save them, read the PDFs. The hosted Gmail connectors can't save files to disk, and the most used open-source Gmail MCP server is archived. gmail-agent handles attachments well, shows you any write before it happens, and only offers the tools your login allows. See How it compares.

What it does

Read

  • Search with Gmail syntax (from:, has:attachment, filename:pdf, newer_than:30d, ...), paginated
  • Read a message or a whole thread as plain text (HTML mail is converted)
  • List labels and drafts

Attachments

  • List a message's attachments with name, type, size and part id
  • Download from one message, or every attachment from every message matching a query
  • Extract text from PDF and text attachments without saving them

Downloads never overwrite anything. If invoice.pdf exists, the next one becomes invoice_1.pdf, and you get the real paths back. Names are sanitized, so a file called ../../.ssh/config lands as config inside the folder you picked.

Write

  • Send new mail with attachments, Cc/Bcc, plain text or HTML
  • Reply and reply-all in the same thread (In-Reply-To, References and thread id are set, the original is quoted)
  • Forward, including the original attachments
  • Drafts: create, list, show, update, send, delete
  • Labels: create, rename, delete, add to and remove from messages or threads
  • Mark read or unread, star, archive
  • Trash and untrash; permanent delete behind an explicit flag

Every write command takes --dry-run, which prints the exact API request and, for mail, the MIME message without changing anything. With --json, results include the ids of whatever was sent or created.

Quick start

You need uv (or pipx) and Python 3.11+.

uv tool install gmail-agent      # or: pipx install gmail-agent

For the latest unreleased changes: uv tool install git+https://github.com/dremok/gmail-agent.

Then set it up once (about 5 minutes, guided):

gmail-agent setup       # Google Cloud project, OAuth client and login; default access level is "modify"

gmail-agent status # shows the logged-in account and access level gmail-agent search "has:attachment newer_than:7d"

Then connect your agent. In Claude Code: /plugin install gmail-agent --marketplace dremok/gmail-agent. For Codex, Gemini CLI, VS Code, Cursor and Claude Desktop, see MCP server.

How it compares

Checked against each project's source and docs in October 2026. Corrections are welcome as issues.

gmail-agentClaude's Gmail connectorgoogle_workspace_mcpGongRzhe Gmail-MCP-Server
SetupYour own OAuth client; gmail-agent setup guides you (about 5 minutes)One clickYour own OAuth client, by handYour own OAuth client, by hand
Runs asCLI and stdio MCP, on your machineHosted (web, desktop, mobile)stdio or HTTP, multi-userstdio MCP
Save attachments to diskYes, never overwritesNoYes, to its own folder, deleted after an hourYes, overwrites files with the same name
Every attachment matching a searchYesNoNoNo
Text of PDF attachmentsYesNoNoNo
Forward with original attachmentsYesNot documentedYesNo forward
DraftsCreate, update, send, deleteYesCreate onlyCreate only
Dry run of every write, with the MIME messageYesNo, asks before each write insteadNoNo
Read-only modeYesNo, the grant includes sendingYesNo
Tool list follows the granted scopeYesNoFrom server flagsNo
Permanent deleteOnly with --allow-delete and a full loginNot offeredNot offeredOffered without a guard
Drive, Calendar, DocsNo, Gmail onlySeparate connectorsYesNo
MaintainedYesYesYesArchived in 2025

Use something else if:

  • You want no setup, or use Claude on the web or your phone. The built-in connector is one click away.
  • You need Drive, Calendar and Docs in the same server, or one server for a team over HTTP. google_workspace_mcp covers all of Workspace.
  • You need Gmail filters, sending from an alias, your Gmail signature or inline images in outgoing mail. gmail-agent does none of these yet.
  • You want a plain CLI for all of Google Workspace. googleworkspace/cli (gws) is a good one. It dropped its MCP server in version 0.8.0.

Coming from GongRzhe/Gmail-MCP-Server?

That server is archived. Moving takes a few minutes, and you can keep your Google Cloud project.

  1. Install: uv tool install gmail-agent
  2. Reuse your OAuth client, not your token. Setup checks the client, installs it and logs you in:
   gmail-agent setup --client-file ~/.gmail-mcp/gcp-oauth.keys.json

Do not copy GongRzhe's credentials.json by hand. Despite the name it is your login token, while gmail-agent's credentials.json is the OAuth client, and the token formats differ anyway. gmail-agent needs a Desktop app client. If yours is a Web application client, setup says so; create a Desktop client in the same project and pass that file instead.

  1. Point your MCP client at gmail-agent. Replace npx @gongrzhe/server-gmail-autoauth-mcp with gmail-agent mcp, for example claude mcp add gmail --scope user -- gmail-agent mcp. For Claude Desktop, see MCP server.
  2. Optional cleanup: revoke the old grant at myaccount.google.com/permissions and remove ~/.gmail-mcp.
GongRzhe toolgmail-agent toolNotes
search_emailssearch_messagesAdds paging with page_token
read_emailget_message, get_threadHTML mail comes back as text
send_emailsend_message, reply_to_messageReplies set the threading headers for you
draft_emailcreate_draft, or any send tool with as_draftDrafts can also be updated and sent
modify_email, batch_modify_emailsmodify_labels, mark_messagesLabels by name or id
delete_email, batch_delete_emailstrashPermanent delete needs mcp --allow-delete and a full login
list_email_labelslist_labels
create_label, update_label, delete_labelcreate_label, rename_label, delete_labelNo visibility options
get_or_create_labellist_labels, then create_label
download_attachmentdownload_attachmentsPicks by filename or part id, never overwrites
download_matching_attachments, read_attachment_text, forward_messageNew
create_filter and the other filter toolsNonegmail-agent never touches settings, filters or forwarding

Two behaviours differ on purpose: delete means trash unless you opt in, and the tool list shrinks to what your login allows. If tools seem to be missing, check the level with gmail-agent status.

Google Cloud setup

Gmail has no API keys for personal mail, so you create your own OAuth client in Google Cloud. It is free and you do it once. gmail-agent setup walks you through it and does what Google lets it do for you:

  1. Project and Gmail API. If gcloud is installed and logged in, setup creates a project called gmail-agent- plus six random characters (it asks first) and enables the Gmail API. Without gcloud it opens the two console pages and asks for the project ID. --project ID uses a project you already have.
  2. Consent screen and publishing. Google has no API for these, so setup opens the pages and tells you what to click: app name gmail-agent, audience External, then Publish app so the status is In production. Publishing avoids the 7-day login expiry of Testing mode, and you do not have to add yourself as a test user. Google calls the app unverified, which is expected for your own app and fine for personal use (it is capped at 100 users).
  3. Desktop client. Setup opens the Clients page. Create a client of type Desktop app and click Download JSON (Google shows the secret only then). Setup spots the file in ~/Downloads, checks that it is a Desktop client from the right project, and installs it as ~/.config/gmail-agent/credentials.json, readable only by you. You can also pass --client-file PATH, or press Ctrl-C and paste the client ID and secret.
  4. Login. A browser opens; pick your account. Google says "Google hasn't verified this app": click Continue and keep all boxes ticked. Setup checks the account and prints Set up: logged in as you@example.com with modify access.

Run it again whenever you like; it skips what is already done. Options: --scope LEVEL (see Access levels), --no-gcloud, and --no-browser, which prints the links instead of opening them (the login redirect goes to localhost, so the browser must run on the same machine).

Setting up by hand

The same steps without the wizard:

  1. Create a project at console.cloud.google.com/projectcreate and make sure it is selected in the top bar.
  2. Enable the Gmail API on the Gmail API page.
  3. Configure the consent screen in Google Auth Platform: Get started, app name gmail-agent, your address as support and contact email, audience External, agree, Create.
  4. Publish the app under Audience (Publish app, status In production). If you would rather stay in Testing mode, add your address under Test users instead, and expect to log in again every 7 days.
  5. Create a Desktop client under Clients: Create client, application type Desktop app, Create, and download the JSON from the dialog. If you miss the download, create a new client.
  6. Install it, either with gmail-agent setup --client-file ~/Downloads/client_secret_*.json, which also logs in, or by hand:
   mkdir -p ~/.config/gmail-agent

mv ~/Downloads/client_secret_*.json ~/.config/gmail-agent/credentials.json chmod 600 ~/.config/gmail-agent/credentials.json gmail-agent login # or: gmail-agent login --scope readonly

If something is missing later, the error names the fix: a deleted or expired client points back to gmail-agent setup, a

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く