Gmail OAuth for AI agents
Give your agents
full Gmail autonomy
Read, write, search, and send — not just read-only. One integration gives your agent every Gmail scope it needs.
Works with
Add Gmail to your agent — click for install
The problem
Your agent can read Gmail.
It can't write to it.
Write scopes are gated
Google requires a CASA Tier 2 security audit before any app can access Gmail write scopes. Read-only isn't enough for real agent work.
Months of process
The audit costs $550+, requires multiple rounds of review, and takes weeks to months. Most projects never ship.
We already passed
inbox.dog is CASA Tier 2 verified. Use our OAuth credentials and skip the audit entirely. Your agents get full write access today.
Integration
Three ways to connect
No code, for agents, or full control with the API — pick your path.
No code
For non-technical users. Go to inbox.dog/connect, link your Gmail — no setup, no code. Your tokens are stored; use them with MCP or the API later.
MCP Server
For agents. Claude, Cursor, Windsurf, and other MCP clients get Gmail as callable tools — add inbox.dog as a tool server.
{
"mcpServers": {
"inbox-dog": {
"command": "npx",
"args": ["-y", "inbox.dog", "mcp"],
"env": {
"INBOX_DOG_CLIENT_ID": "YOUR_CLIENT_ID",
"INBOX_DOG_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
} npm Package
The code way. When you want to build in code — custom apps, backends, or agents that need an API instead of MCP. Install the SDK, handle OAuth, get raw tokens.
import InboxDog from 'inbox.dog';
const dog = new InboxDog();
// Redirect user to authenticate
const authUrl = dog.getAuthUrl({
clientId: 'YOUR_KEY',
redirectUri: 'http://localhost:3000/callback',
});
// Exchange code for tokens
const { access_token, refresh_token, email } =
await dog.exchangeCode(code, 'YOUR_KEY', 'YOUR_SECRET');
// Your agent can now read, write & search Gmail
const response = await fetch(
'https://gmail.googleapis.com/gmail/v1/users/me/messages/send',
{
method: 'POST',
headers: { Authorization: `Bearer ${access_token}` },
body: JSON.stringify({ raw: encodedEmail }),
}
); Built for agents
Everything your agent needs
Full Read + Write + Search
Not just read-only. Your agent can send emails, create drafts, manage labels, and search across entire inboxes.
MCP Native
Ships as an MCP server out of the box. Claude, Cursor, Windsurf, and any MCP-compatible agent can use it directly as a tool.
CASA Tier 2 Verified
We passed Google's security audit so you don't have to. Skip the $550+ cost, months of paperwork, and get write access now.
Auto-Refresh Tokens
Tokens expire. inbox.dog handles refresh automatically so your agent never loses access mid-task. Refresh is free.
Free to Use
Authenticate once, make unlimited Gmail requests. No paywall. Create an API key and start building.
Open Source
MIT licensed. Inspect every line, self-host on your own Cloudflare account, or use the hosted service. Your call.
Give your agents Gmail
Create an API key and your agent can read, write, and search Gmail in minutes.