gmail

Gmail API — read, search, send, label, and manage email threads

v1.0.0Base: https://gmail.googleapis.com/gmail/v1Auth: oauth2
Chat with this API

Use this API

Web

Chat in the browser →

CLI (one command)

agentbridge chat gmail

SDK / Agents

fetch("/api/gmail/manifest")

MCP (Claude Desktop / Cursor / Windsurf)

{
  "mcpServers": {
    "gmail": {
      "command": "npx",
      "args": ["@agentbridgeai/mcp", "--api", "gmail"]
    }
  }
}

Add to ~/.claude/claude_desktop_config.json or Cursor/Windsurf MCP settings.

Actions (10)

GET/users/me/profile

get_profile

Get the authenticated Gmail profile details

GET/users/me/messages

list_messages

List messages in the mailbox, optionally filtered by search query or labels

Parameters

qstringGmail search query (e.g. from:boss has:attachment newer_than:7d)
labelIdsstringComma-separated label IDs to filter
maxResultsintegerMaximum results (1-500)
pageTokenstringNext page token
includeSpamTrashbooleanInclude spam and trash folders
GET/users/me/messages/{id}

get_message

Get a message by Gmail message ID

Parameters

idstringrequiredGmail message ID
formatstringMessage format: full, metadata, minimal, raw
GET/users/me/threads

list_threads

List email threads in the mailbox

Parameters

qstringGmail search query
labelIdsstringComma-separated label IDs to filter
maxResultsintegerMaximum results (1-100)
pageTokenstringNext page token
GET/users/me/threads/{id}

get_thread

Get an email thread by thread ID

Parameters

idstringrequiredGmail thread ID
formatstringThread message format: full, metadata, minimal
POST/users/me/messages/send

send_message

Send an email message. You can provide raw (RFC2822) or fields like to/subject/body_text and AgentBridge will build and encode it.

Parameters

rawstringRaw RFC2822 message or base64url-encoded message
tostringRecipient email address
ccstringCC email address(es), comma-separated
bccstringBCC email address(es), comma-separated
subjectstringEmail subject
body_textstringPlain-text email body
fromstringOptional From header (e.g. Rana <[email protected]>)
threadIdstringOptional thread ID to reply in existing thread
POST/users/me/drafts

create_draft

Create an email draft. You can provide raw (RFC2822) or fields like to/subject/body_text and AgentBridge will build and encode it.

Parameters

rawstringRaw RFC2822 message or base64url-encoded message
tostringRecipient email address
ccstringCC email address(es), comma-separated
bccstringBCC email address(es), comma-separated
subjectstringEmail subject
body_textstringPlain-text email body
fromstringOptional From header (e.g. Rana <[email protected]>)
threadIdstringOptional thread ID
GET/users/me/labels

list_labels

List all labels in the mailbox

POST/users/me/labels

create_label

Create a Gmail label

Parameters

namestringrequiredLabel name
labelListVisibilitystringVisibility in label list
messageListVisibilitystringVisibility in message list
POST/users/me/messages/{id}/modify

modify_message_labels

Add or remove labels on a specific message

Parameters

idstringrequiredGmail message ID
addLabelIdsarrayLabel IDs to add
removeLabelIdsarrayLabel IDs to remove