# Connect Gmail to your AI agent

> Yes — ClawLink is a hosted Gmail MCP server. 60 tools your agent can call from chat, with one-click hosted OAuth and nothing to run locally.

Web version: https://claw-link.dev/hub/gmail

ClawLink hosts a managed Gmail MCP server that exposes 60 tools to your AI agent. You connect Gmail in one click, and your agent can read, create, and update Gmail data from chat without you building or running a local MCP server.

## Quick facts

- 60 tools callable from chat
- One-click hosted OAuth
- Works with OpenClaw, Hermes, Claude Code, Cursor, Codex, and any MCP client
- No local server or config files

## Overview

The usual path is: build auth, handle token refresh, wire up the tools. With ClawLink you connect Gmail once and start using the real actions from the agent.

## Setup

Gmail uses OAuth. You connect it in the browser: click Connect, sign in, approve. ClawLink stores the token and refreshes it on its own. You never touch a key or wire up a redirect URL.

Authentication: hosted OAuth

## What you can do

- **Read and write from chat** — Query, create, and update Gmail items the moment a question comes up. No export step.
- **Go from insight to action** — The agent reads Gmail, sums up what matters, and helps you decide the next step.
- **Keep analysis close to the work** — Turning Gmail data into a follow-up task happens inside one flow.

## Gmail tools

60 Gmail tools, ready the moment you connect.

- `gmail_add_label_to_email` — Add a label to a Gmail message
- `gmail_create_email_draft` — Create a Gmail draft
- `gmail_create_label` — Create a Gmail label
- `gmail_fetch_emails` — Search and fetch Gmail messages
- `gmail_fetch_message_by_message_id` — Get a Gmail message by ID
- `gmail_fetch_message_by_thread_id` — Get a Gmail message by thread ID
- `gmail_forward_message` — Forward a Gmail message
- `gmail_get_attachment` — Get a Gmail attachment
- `gmail_get_profile` — Get the connected Gmail account profile
- `gmail_list_drafts` — List Gmail drafts
- `gmail_list_labels` — List Gmail labels
- `gmail_list_send_as` — List Gmail send-as aliases
- `gmail_list_threads` — List Gmail threads
- `gmail_reply_to_thread` — Reply to a Gmail thread
- `gmail_send_email` — Send a Gmail message
- `gmail_create_prompt_post` — Send a one-shot prompt to the Sanity Content Agent
- `gmail_get_auto_forwarding` — Get the auto-forwarding setting for the specified account
- `gmail_get_contacts` — Fetches contacts (connections) for the authenticated Google account, allowing selection of
- `gmail_get_draft` — Retrieves a single Gmail draft by its ID
- `gmail_get_filter` — Retrieve a specific Gmail filter by its ID
- `gmail_get_label` — Gets details for a specified Gmail label
- `gmail_get_language_settings` — Retrieve the language settings for a Gmail user
- `gmail_get_people` — Retrieves either a specific person's details (using `resource_name`) or lists 'Other Contacts'
- `gmail_get_vacation_settings` — Retrieve vacation responder settings for a Gmail user
- `gmail_list_filters` — List all Gmail filters (rules) in the mailbox
- `gmail_list_forwarding_addresses` — List all forwarding addresses for the specified Gmail account
- `gmail_list_history` — List Gmail mailbox change history since a known startHistoryId
- `gmail_search_people` — Searches contacts by matching the query against names, nicknames, emails, phone numbers, and
- `gmail_settings_send_as_get` — Retrieve a specific send-as alias configuration for a Gmail user
- `gmail_batch_modify_messages` — Modify labels on multiple Gmail messages in one efficient API call

## Example prompts

- **Add label to email:** Use Gmail to add label to email and walk me through it.
- **Create email draft:** Create it in Gmail. Confirm the key fields with me before you finish.
- **Create label:** Create it in Gmail. Confirm the key fields with me before you finish.
- **Fetch emails:** Pull the data from Gmail. Sum it up and flag anything I need to look at.

## ClawLink vs. building it yourself

| | Manual | ClawLink |
|---|---|---|
| Connection | Build it yourself. You register a developer app with Gmail, set up redirect URLs, handle the consent screen, store and refresh access tokens, and redo the wiring when scopes change. | Hosted hosted OAuth. Connect once in the browser. ClawLink owns the lifecycle. |
| Maintenance | Token refresh, permission debugging, env config, every edge case. All yours. | ClawLink handles the plumbing. You focus on the workflow. |
| Time to first call | Days to weeks. Auth, storage, tool wiring, testing. Then the agent can act. | About two minutes from sign-up to the agent calling Gmail. |

## FAQ

### How do I connect Gmail to my AI agent?

Install ClawLink, open the dashboard, click Connect next to Gmail, and finish the hosted OAuth flow. Your agent can call Gmail from the next message. Two minutes, total.

### Is there a Gmail MCP server I can use?

Yes. ClawLink exposes Gmail as 60 tools your agent calls through a hosted MCP-compatible runtime. You don't run a local server or edit a config file. The tools are there the moment you connect.

### Do I need Gmail API credentials?

No separate API key. You sign in to Gmail through the normal OAuth flow and ClawLink handles the token after that.

### How much does it cost?

Your first integration is free, plus a 7-day trial of the full catalog. Paid plans unlock the rest of the library.

### Can I set this up from the terminal instead of the dashboard?

Yes. Run npx -y @useclawlink/cli login, then npx -y @useclawlink/cli connect gmail. The first opens a browser to sign in to ClawLink. The second opens a browser to authorize Gmail. No API keys to create. Works with OpenClaw, Hermes, Claude Code, Cursor, Codex, and any agent that runs shell commands.
