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.
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
Two ways to connect
Drop in as an MCP server for Claude, Cursor, and friends — or use the npm package for full control.
MCP Server
Zero-code for Claude, Cursor & more
Add inbox.dog as a tool server. Your agent gets Gmail read, write, and search as callable tools.
{
"mcpServers": {
"inbox-dog": {
"command": "npx",
"args": ["-y", "inbox.dog", "mcp"],
"env": {
"INBOXDOG_KEY": "YOUR_KEY",
"INBOXDOG_SECRET": "YOUR_SECRET"
}
}
}
} npm Package
Full control in 3 lines
Install the SDK and authenticate users programmatically. You get raw tokens for the Gmail API.
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.
$0.10 Per Auth
Pay per OAuth flow — not per API call. Authenticate once, make unlimited Gmail requests. 10 free credits to start.
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.