Skip to main content

Gmail

Gmail. In your CLI, over MCP, your way.

Search, read, file and draft mail from a terminal or an assistant. Connected once, it answers your terminal and every assistant you already use, under one permission.

Reading is one grant and changing is another, so a client can search a mailbox for months without ever being able to touch it. Sending is a third, and most setups never turn it on: a draft lands in Drafts and waits for a person to press send.

A real command line for gmail

Not a chat window pretending. Every argument is a flag, output is text a pipe can read, and each call lands on your record with the daily ceiling watching.

Connect the account once, in the browser, and the terminal has it from then on. No key on your laptop, nothing in your shell history worth stealing.

Gmail from the command line

brad@macbook · gbrainio
gbrainio auth grant gmailOpening https://gbrain.io/workspace/account/connections/gmailFinish in the browser, then your gmail tools are live.gbrainio tool gmail search -hgbrainio tool gmail search <query>  Search your email  Searches the person's real Gmail, already connected through GBrain (READ  ONLY). Use this for any question about their email, inbox or messages: the  account is connected and no other Gmail or Google connector is needed, so do  not ask them to connect one. Nothing here can send, draft, or modify email.  Search the way you would in Gmail's own search box, or say what you are  after one argument at a time (from, subject, newer_than, unread, ...) and  let this build the query. More than one address can be connected: pass  account to choose, and every answer says which account it came from.  gbrain_permissions lists the connected addresses. Returns message headers  and snippets.  <query>  Free text, the same as typing into Gmail's search box. Optional if you pass the filters instead.  FLAGS    --after <value>       On or after this date, as 2026/08/24    --before <value>      Before this date, as 2026/08/24    --from <value>        Only mail from this sender    --has-attachment      Only mail with something attached    --label <value>       Only mail carrying this label    --limit <value>       How many to return, up to 25 (default 10)    --newer-than <value>  Within this age: 2d, 3w, 6m, 1y    --older-than <value>  Older than this age: 2d, 1y    --subject <value>     Words in the subject line    --to <value>          Only mail sent to this address    --unread              Only mail you have not read  Over MCP this tool is gmail_search.
Their consent screen, once. The credential never touches the laptop.

Or hand it to the assistant you already use

Claude Code, Cursor and Codex all speak MCP. Point any of them at one endpoint and they get the same gmail tools, on the same permission and the same record as your terminal.

Gmail over MCP, tool by tool

claude mcp add gbrain https://gbrain.io/mcp --header "Authorization: Bearer <token>"

Your assistant gets gmail_search, gmail_read_message and 7 more. The token comes from the client's own page in the workspace, minted once and shown once.

Connect it once, use it everywhere

Their consent screen, one click, and one connection answers all of these. No key is pasted anywhere, and nothing runs before you allow it.