# Clam > Your inbox, safely shared with AI agents. Clam sits between your Gmail inbox and your AI agents: each agent sees and does only what your plain-English rules allow, and you see everything it does. Clam does not store your emails. Clam is for people who want an AI agent to work with their email without handing it the whole mailbox. Agents can do real email work, including drafting, sending and replying, with permissions scoped to the messages and recipients each task needs. How it works: connect Gmail to Clam, create a Shell, and point your agent at the Shell through Clam's hosted MCP (Model Context Protocol) server. You connect Gmail to Clam, not to the agent, so the agent never reaches your mailbox directly. A Shell is one agent's slice of your inbox, with its own rules. You write the rules in plain English; Clam compiles them into Cedar policies and checks every request against them. Access is denied unless a rule permits it, and an explicit denial overrides a permission. You can pause or revoke a Shell without affecting your other Shells or your Gmail connection. Rules work by meaning, not by sender lists. Clam sorts your email into categories with AI, so a rule such as "Read receipts and utility bills" still applies when a bill comes from a new sender or its subject changes. AI classification decides which category an email belongs to; deterministic policy evaluation decides access. You can add sender or recipient restrictions where a task needs them. Example use cases, as the plain-English rules a user would write: - Travel Assistant: "Read flight, hotel and booking emails and build my itinerary. Draft replies to hosts for me to review. Never send." - Family Organizer: "Read email from family, school and events. Forward the urgent ones as soon as they arrive. Never write new messages." - Project Manager: "Watch work email and newsletters for competitor moves, then draft notes I can drop into the project. Do not send." - Investing Assistant: "Read investment alerts and price moves and summarise them for me. Never send or forward." - Shopping Assistant: "Read shopping, promotions and receipts, and pick out the real discounts. Never send." - Expense Tracker: "Read receipts, utility bills and work bills. Draft a note when a charge looks wrong. Never send." Each agent can have its own Shell and purpose. When an email falls into both an allowed and a denied category, the denial wins. Email tools and the permission each needs: - `search`: find messages; each returned message must satisfy `read` permission. - `read`: read an email, including its body and headers. - `create_draft`: create an email draft. - `send`: send an email. - `reply`: reply to an existing email thread. - `reply_all`: reply to everyone on the original To and Cc lines, excluding the mailbox's own address; governed by `reply` permission. - `forward`: forward an email to new recipients, preserving its body and attachments subject to message size limits. - `archive`: remove an email from the inbox without deleting it. - `delete`: move an email to Trash. - `restore`: return an archived or trashed email to the inbox. - `mark_read` and `mark_unread`: change an email's read status. Email attributes rules can inspect: - `from`: the sender's address. A rule can name one address, anyone at a domain (that exact domain), a domain and its subdomains (only when asked for), or an address pattern. - `to`, `cc`, and `bcc`: the sets of recipient addresses, for whole-message rules. - `recipient`: on sending, replying, forwarding and drafting, each recipient is checked in turn: an allow rule must hold for every recipient, a deny rule applies if any recipient matches. - `subject`: email subject text. - `body`: email body text, limited to its first 64 KiB for policy evaluation. - `labels`: semantic categories and Gmail labels. - `date`: when the email was received, in your own local time; "now" for a new outgoing email or draft. A rule can name a rolling window, measured from each action ("received in the last 30 days"), a calendar period ("received today") or a date ("received before 1 January 2024"). Write a date with its month's name: 1/3/2026 is 1 March in most countries and 3 January in the US. - `has_attachment`: whether the email has an attachment. - `is_unread`: whether the email is unread. - `thread_id`: the email thread identifier. Semantic categories use the `clam/` prefix: banking, investments, utilities, receipts, taxes, legal, work, family, friends, medical, insurance, travel, shopping, auth, account, subscriptions, newsletter, promotions, social, events, education, and other. Gmail labels such as INBOX, SENT, DRAFT, TRASH, SPAM, STARRED, IMPORTANT, and UNREAD can also be used in rules. When an action answers or forwards a message (a reply, a forward, or a draft that replies), rules inspect the original message's sender, subject, body, labels and attachment status, together with the outgoing To, Cc and Bcc recipients. This constrains both which messages an agent may act on and where it may send them. Body rules do not inspect the agent's own reply text or forwarding note, but Clam classifies the outgoing email and adds its semantic categories to `labels` (a forward with no note adds none). Those categories can block the action, but a rule that allows it must still be met by the original message. A new email or new draft is evaluated against its outgoing attributes and the semantic categories Clam assigns it. Every draft also carries the DRAFT label. If the outgoing email cannot be classified, the action is blocked. Clam logs every action, allowed and blocked: what the agent did or tried to do, whether it was allowed, and which policy rule decided it. Just-in-time approvals hold an action until you confirm it, and office hours close email access to agents outside the hours you set. Office hours are a schedule, separate from the email's `date` attribute. Clam does not store your emails. Gmail stays the source of truth. Clam reads email content only while classifying a message or enforcing a rule, and does not keep emails or build a copy of your mailbox. It keeps audit records of agent activity and access decisions so you can see what your agents did. Clam works with any agent that can connect to an MCP server, including Claude, ChatGPT, OpenClaw, Gemini, Codex and Grok. Gmail is supported today; Outlook support is planned for general availability. ## Product - [Clam](https://useclam.ai/): What Clam does, use cases, governance and security. - [How it works](https://useclam.ai/#how-it-works): Connect Gmail, create a Shell, and point an agent at it. - [Frequently asked questions](https://useclam.ai/#faq): Email storage, rules, supported agents, revoking access and the audit log. - [MCP for Gmail](https://useclam.ai/gmail-mcp): Clam as a hosted Gmail MCP server over Streamable HTTP: twelve Gmail tools behind rules on sender and content, with approvals, office hours, an audit log and setup for Claude Code or any MCP client; several accounts, attachments and undo send are being built. Markdown: https://useclam.ai/gmail-mcp.md - [Pricing](https://useclam.ai/pricing): Two plans after a 14-day free trial (no card): Starter at $2.99 a month and Pro at $6.99 a month. Annual plans signed up for before the end of 2026 get 2 months free ($29.90 for the first year of Starter, $69.90 for Pro). Markdown: https://useclam.ai/pricing.md - [Get started](https://console.useclam.ai/login): Sign up or sign in with Google. The Clam console is where you connect Gmail and configure each agent's Shell. ## Business - [Clam for Business](https://useclam.ai/business): Coming soon. Company-wide rules, approvals, audit trails and a kill switch for AI agents on company email (Google Workspace and Microsoft 365). Companies that join the waitlist with a work email get 50% off their first year. Markdown: https://useclam.ai/business.md ## Security - [Security manifesto](https://useclam.ai/security): How Clam protects your inbox, the master key to your accounts: least privilege, deterministic authorization, minimal data and user control. Markdown: https://useclam.ai/security.md ## Docs - [What is Clam?](https://useclam.ai/docs): Clam sits between your AI agent and your Gmail, checks every request against rules you wrote in plain English, and logs what happened. Markdown: https://useclam.ai/docs.md - [Quickstart](https://useclam.ai/docs/get-started/quickstart): Connect your inbox, create a Shell with rules you choose, and connect your AI agent to Gmail. About 10 minutes, no credit card. Markdown: https://useclam.ai/docs/get-started/quickstart.md - [Connect Clam to Claude](https://useclam.ai/docs/agents/claude): Add Clam to Claude from its connector directory in two clicks, so Claude reads and writes your Gmail only within your Shell's rules. Markdown: https://useclam.ai/docs/agents/claude.md - [Connect Clam to Claude Code](https://useclam.ai/docs/agents/claude-code): One terminal command adds your Shell to Claude Code. Sign in to Clam, click Allow, and Claude Code uses your Gmail only as far as your rules allow. Markdown: https://useclam.ai/docs/agents/claude-code.md - [Connect Clam to ChatGPT](https://useclam.ai/docs/agents/chatgpt): Add Clam to ChatGPT from its Plugins page, so ChatGPT reads and writes your Gmail only within your Shell's rules. Markdown: https://useclam.ai/docs/agents/chatgpt.md - [Connect Clam to Codex](https://useclam.ai/docs/agents/codex): One terminal command adds your Shell to Codex. Sign in to Clam, click Allow, and Codex uses your Gmail only as far as your rules allow. Markdown: https://useclam.ai/docs/agents/codex.md - [Connect Clam to Hermes](https://useclam.ai/docs/agents/hermes): One terminal command adds your Shell to Hermes. Sign in to Clam, click Allow, and Hermes uses your Gmail only as far as your rules allow. Markdown: https://useclam.ai/docs/agents/hermes.md - [Connect Clam to Grok](https://useclam.ai/docs/agents/grok): Add your Clam Shell to Grok as a custom connector and sign in once, so Grok reads and writes your Gmail only within your Shell's rules. Markdown: https://useclam.ai/docs/agents/grok.md - [Connect Clam to OpenClaw](https://useclam.ai/docs/agents/openclaw): Add your Clam Shell to OpenClaw from the terminal, so OpenClaw can work in your Gmail within your rules. Markdown: https://useclam.ai/docs/agents/openclaw.md - [Connect Clam to Gemini CLI](https://useclam.ai/docs/agents/gemini-cli): Add your Clam Shell to Gemini CLI with one command and a key, so Gemini can work in your Gmail within your rules. Markdown: https://useclam.ai/docs/agents/gemini-cli.md - [Connect any other MCP client](https://useclam.ai/docs/agents/other-mcp-client): Any app that speaks MCP over HTTP can use Clam: give it your Shell's address and a key, and your rules decide what it may do. Markdown: https://useclam.ai/docs/agents/other-mcp-client.md - [How rules work](https://useclam.ai/docs/policies/how-rules-work): A Shell's policy is plain-English rules. Clam checks every request against them before it runs, and anything not allowed is blocked. Markdown: https://useclam.ai/docs/policies/how-rules-work.md - [Writing effective policies](https://useclam.ai/docs/policies/writing-effective-policies): Say which emails, name the action, block the sensitive labels, and ask before anything is sent. A good and a bad example for each tip. Markdown: https://useclam.ai/docs/policies/writing-effective-policies.md - [Policy recipes](https://useclam.ai/docs/policies/recipes): Four starter policies for your AI agent's Gmail access. Three are console templates, one you paste in. Each says what it allows and what it blocks. Markdown: https://useclam.ai/docs/policies/recipes.md - [What your agent can do](https://useclam.ai/docs/trust/what-your-agent-can-do): Your agent gets 12 Gmail tools plus one for approvals. Clam checks every call against your Shell's rules before it runs, so available never means allowed. Markdown: https://useclam.ai/docs/trust/what-your-agent-can-do.md - [Approvals](https://useclam.ai/docs/trust/approvals): A rule that says ask me before holds your agent's action until you decide. An approved action runs once, exactly as asked. A denied one never runs. Markdown: https://useclam.ai/docs/trust/approvals.md - [Remove access](https://useclam.ai/docs/trust/remove-access): Remove one agent, regenerate a key, pause or delete a Shell, or stop Clam's Gmail access entirely. Every step takes effect at once. Markdown: https://useclam.ai/docs/trust/remove-access.md - [Privacy and security](https://useclam.ai/docs/trust/privacy-and-security): We read email only to label it and to run allowed actions, store no email content, and never use your Google data to train AI models. Markdown: https://useclam.ai/docs/trust/privacy-and-security.md - [Common issues & solutions](https://useclam.ai/docs/troubleshooting): What each Clam message means, why your agent sees it, and the one to three steps that fix it. Markdown: https://useclam.ai/docs/troubleshooting.md ## Blog - [Blog](https://useclam.ai/blog): Announcements and notes from the team building Clam, the security layer between AI agents and your inbox. Markdown: https://useclam.ai/blog.md - [What do we actually let AI agents do?](https://useclam.ai/blog/what-do-we-actually-let-ai-agents-do): Calendar, shopping, software, and ring-fenced investments are safe to delegate to AI agents. Email is the exception — until you add the right containment. Markdown: https://useclam.ai/blog/what-do-we-actually-let-ai-agents-do.md - [Introducing Clam: Your Inbox, safely shared with agents.](https://useclam.ai/blog/introducing-clam): Why we built Clam: plain-English rules decide exactly what each AI agent can see and do in your inbox, with every request checked and logged. Markdown: https://useclam.ai/blog/introducing-clam.md ## Company - [About](https://useclam.ai/about): The team building Clam. Markdown: https://useclam.ai/about.md - [Contact](https://useclam.ai/contact): Questions about setting up Clam or rolling it out to a team. Email: support@useclam.ai Markdown: https://useclam.ai/contact.md ## Optional - [Legal](https://useclam.ai/legal): The agreements and notices that govern Clam, a product of Sunny Side Labs P.C. Markdown: https://useclam.ai/legal.md - [Privacy Policy](https://useclam.ai/legal/privacy-policy): What personal data Clam collects, how it is used, and the rights you have over it. Markdown: https://useclam.ai/legal/privacy-policy.md - [Terms of Service](https://useclam.ai/legal/terms): The terms that govern use of Clam. Markdown: https://useclam.ai/legal/terms.md - [Cookie Policy](https://useclam.ai/legal/cookie-policy): What Clam stores in your browser, and why. Markdown: https://useclam.ai/legal/cookie-policy.md - [Data Processing Agreement](https://useclam.ai/legal/dpa): How Clam processes personal data on your behalf, and on what terms. Markdown: https://useclam.ai/legal/dpa.md