[FEATURE] Gmail MCP Connector: Add gmail_modify_labels tool for archiving, labeling, and inbox management

Status Open
Maintainer reply None cached
Activity 12 comments · opened Mar 20, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The hosted Gmail MCP connector at gmail.mcp.claude.com currently only supports read operations and draft creation. There is no way to modify message labels, which means common inbox management actions are impossible:

  • Archiving emails (removing the INBOX label)
  • Marking as read/unread (removing/adding the UNREAD label)
  • Starring messages (adding/removing the STARRED label)
  • Categorizing messages (adding custom labels)
  • Moving to trash (adding TRASH label)

My use case: I'm running a scheduled Cowork task for automated email triage — it searches for unread emails, classifies them (newsletter/spam vs. relevant), and should archive the noise. Currently, the triage can identify what should be archived but cannot act on it because there's no way to remove the INBOX label.

This is a fundamental gap — the connector can read and create drafts, but cannot manage the inbox itself.

Current available tools (as of March 2026)

| Tool | Type |
|------|------|
| gmail_search_messages | Read |
| gmail_read_message | Read |
| gmail_read_thread | Read |
| gmail_list_labels | Read |
| gmail_list_drafts | Read |
| gmail_get_profile | Read |
| gmail_create_draft | Write |
| gmail_modify_labels | Missing |
| gmail_send_draft | Missing (see #32266) |

Proposed Solution

Add a single gmail_modify_labels tool to the hosted Gmail MCP connector. The Gmail API already supports this via users.messages.modify, which accepts:

{
  "messageId": "string (required)",
  "addLabelIds": ["string"],
  "removeLabelIds": ["string"]
}

This one tool would unlock all of the following workflows:

  • Archive: removeLabelIds: ["INBOX"]
  • Mark as read: removeLabelIds: ["UNREAD"]
  • Mark as unread: addLabelIds: ["UNREAD"]
  • Star: addLabelIds: ["STARRED"]
  • Categorize: addLabelIds: ["Label_123"]
  • Trash: addLabelIds: ["TRASH"]

It's a lightweight, versatile addition — one tool that enables an entire category of inbox management workflows in Cowork and Claude Code.

Alternative Solutions

Currently, the only workaround is to use a third-party Gmail MCP server that provide full Gmail API access including label modification.

However, for Cowork users this means abandoning the official hosted connector in favor of self-hosted alternatives, which defeats the purpose of the seamless built-in integration.

Related issues

  • #28575 — Add file attachment support to gmail_create_draft and add gmail_send_draft tool- #32266 — gmail_send_draft tool missing from hosted server

Priority

High - Significant impact on productivity

Feature Category

MCP server integration

Use Case Example

I have a scheduled Cowork task that runs every hour to triage my inbox:

  1. gmail_search_messages with is:unread in:inbox newer_than:1h to find new emails
  2. gmail_read_message to read each email and classify it (newsletter/spam vs. relevant)
  3. Missing step: gmail_modify_labels with removeLabelIds: ["INBOX"] to archive newsletters and spam
  4. Missing step: gmail_modify_labels with removeLabelIds: ["UNREAD"] to mark triaged emails as read
  5. Generate a summary of remaining relevant emails grouped by project

Currently, steps 3 and 4 are impossible. The triage identifies what should be archived but I have to manually go into Gmail to do it, which defeats the purpose of the automation.

Additional Context

_No response_

View original on GitHub ↗

12 Comments

mwhitehorn07 · 5 months ago

+1 - this is blocking a real workflow for me!

I use Cowork to triage emails into Asana tasks (search for labeled emails → extract action items → create tasks). The workflow works great up until the last step: swapping the Gmail label from "Asana Task" to "Asana Done" so processed emails don't get picked up again on the next run.

More specifically, I label emails in Gmail with "Asana Task" throughout the day as a quick triage step. Then I run a Cowork skill that searches for that label, reads each email, synthesizes an actionable task name and description, infers the correct Asana project, and creates the task. The last step should be swapping the label to "Asana Done" so processed emails don't get picked up on the next run. That step is currently impossible. Without it, the whole workflow requires a full asana/tag search each run, or manual cleanup after every run, which defeats the purpose of automating it.

Without modify_labels, there's no reliable way to close the loop. I've explored every workaround I can think of:

  • Tracker files don't persist across Cowork sessions
  • Google Drive doc with processed IDs works initially but doesn't scale (grows indefinitely - unnecessary complexity)
  • Date-filtered searches (after:YYYY/MM/DD) miss older emails that get labeled after the cutoff, which is a frequent use case, not an edge case. Requires some kind of tracking, mentally other otherwise, to determine appropriate date.
  • Third-party Gmail MCPs (Composio, n8n) route email data through external servers, which is a non-starter for anyone handling sensitive client communications
  • Local MCP servers (pouyanafisi/gmail-mcp, GongRzhe/Gmail-MCP-Server) have full label support but don't work in Cowork mode

A single endpoint covering archive, read/unread, star, and custom labels unlocks the entire category of email automation workflows that currently dead-end at "now do something with the message."

ck-54388 · 4 months ago

I agree, the GMAIL MCP needs to support more native GMAIL functions. I run an hourly Cowork scheduled task that scans my inbox, identifies client inquiries, and creates draft replies with pricing and product info specific to my business. It works well, but there's a gap once the drafts are created.

The problem is stale drafts. If a client replies with new information after the task already created a draft in that thread, the draft is now outdated. The task sees an existing draft and skips the thread, so it never gets refreshed. The only fix is for me to manually delete the old draft so the next run picks up the thread again.

This gets worse because Gmail's desktop interface doesn't support multiple drafts per thread. So even if I wanted to work around it by having the task create a second draft, that's not viable on desktop.

What I'd need to fully close the loop:
gmail_delete_draft -- so the task can remove its own stale draft before creating a fresh one
gmail_update_draft -- alternatively, so the task can revise an existing draft in place
gmail_modify_labels (this issue) -- so the task can mark threads as processed, archive handled emails, or swap labels to prevent re-processing

The modify_labels tool described here would also help my workflow directly.

I want to be clear that what I'm doing here isn't complex. This is a straightforward inbox scan and draft reply workflow. I'm not an advanced user building something exotic. But even for this simple use case, these tools are the missing piece. I'd rather not have to set up a third-party Gmail connector just to get delete, update, and label operations that the Gmail API already supports natively. Adding these to the built-in connector would make it more useful for everyone, not just power users.

wolframarnold · 4 months ago

+1: Critical for Email Triage Workflows

I'm using Claude Cowork to build an automated email inbox triage system and this feature is blocking that workflow entirely.

My Use Case

I want to have Claude analyze my emails and apply temporary triage labels (e.g., flagged_for_deletion, flagged_as_read, needs_response) to mark emails for bulk action. The workflow is:

  1. Claude Cowork searches and analyzes emails by sender, content, age, etc.
  2. Claude applies triage labels to mark emails for action
  3. I execute bulk operations in Gmail (delete, mark as read, archive) on all emails with those labels

Without label-writing capabilities, step 2 is impossible. Claude can read and analyze emails, but cannot mark them for processing, which defeats the purpose of automation.

Impact

  • Current state: Email triage via Claude is blocked at the labeling step
  • With this feature: Claude Cowork becomes a powerful inbox management tool
  • Value: Automated email organization, hands-off bulk cleanup, integration with PKM systems that use labels

Why This Matters for Agentic Workflows

Email triage is a canonical use case for AI agents. Without label-writing, the agent can only analyze emails—it cannot take action to organize them. This is a critical gap in the Gmail connector's capabilities.

The fact that community MCP servers already implement full label management (create, apply, remove, batch operations) shows this is well within scope technically.

This is essential infrastructure for email automation.

ennoucas · 3 months ago

What's weird is that clicking on "Refresh tools list" shows the tools! But they disappear on reloading claude. And Cowork complaining that even if it sees the tools the oauth was not approved for the proper scopes

ck-54388 · 3 months ago

I switched to this service after Claude’s tools weren't cutting it. You can roll your own or pay $10 for his cloud version. https://workspacemcp.com/workspace-mcp-cloud

YorkshireRifleman · 3 months ago

The four label tools label_thread, unlabel_thread, label_message, unlabel_message do register intermittently in Cowork desktop, but every API call returns additional permissions required because the OAuth scope isn't granted. Worse, the tools then disappear from the runtime within seconds of registration.

RFreemanPSC · 3 months ago

Not sure why this hasn't been added yet, would make email organization a breeze.

ck-54388 · 3 months ago
Not sure why this hasn't been added yet, would make email organization a breeze.

Just use the service I mentioned above or roll your own Gmail MCP. I give up on Anthropic fixing this connector.

matuspavliscak · 3 months ago

+1. Worth noting this gap also applies to the consumer claude.ai Gmail connector, not just Cowork — the read-only tool set in the OP matches what the hosted connector exposes in the consumer app too.

Use case from today: I asked Claude to do an inbox sweep and surface unpaid invoices, expiring subscriptions, and items needing follow-up. Worked beautifully on the read side — surfaced ~6 actionable items I'd have missed. Then asked it to archive the obvious noise it had already classified (newsletters, promo, expired security alerts). Couldn't. The triage took 15 minutes, the manual cleanup took another 15.

This isn't a Cowork-specific gap. It's the entire Gmail connector surface across products. gmail_modify_labels would unlock real value for every Claude user.

Two months open, no assignee — would love to know if this is on the roadmap.

ck-54388 · 3 months ago

@matuspavliscak Just switch to this service and your good. You can roll your own or pay $10 for his cloud version. https://workspacemcp.com/workspace-mcp-cloud

tirth97 · 2 months ago

I've built a local workaround to address this issue.
Repository: https://github.com/tirth97/gmail-modify-mcp
Setup: Follow the repository README to generate your Google Cloud credentials and configure the server. Claude can assist you with the local startup process.

Compatibility: Works exclusively with Claude Chat and the Claude CLI. It does not support Cowork at this time.

caioribeiroclw-pixel · 1 month ago

If gmail_modify_labels gets added, I’d strongly separate the read triage phase from the write mutation phase in the approval UX.

A small preflight before archive/label/remove-label would prevent the scary failure mode where “summarize unread mail” silently becomes “mutate the inbox”:

  • account / mailbox identity
  • OAuth scope being used (gmail.modify, not just read)
  • source query or thread ids, with generated-at time
  • thread/message count and max mutation count
  • exact label changes: add/remove/archive/mark-read
  • dry-run summary of examples, with subjects/senders redacted if needed
  • undo/rollback path, or “no rollback” if that is true
  • invalidators: stale search result, changed label state, broad query, ambiguous user intent

That would let the connector unlock real inbox cleanup while still making the boundary visible: read-side classification can be automatic, but write-side label changes need a fresh, scoped confirmation receipt.