Auth Inbox is an open-source, self-hosted email verification code platform built on Cloudflare's free serverless services. It automatically processes incoming emails, filters out promotional mail before hitting the AI, extracts verification codes or links, and stores them in a database. A modern React dashboard lets administrators review extracted codes, inspect raw emails, and render HTML email previews — all protected by Basic Auth.
Don't want ads and spam in your main inbox? Need a bunch of alternative addresses for signups? Try this secure, serverless, lightweight service!
flowchart LR
A([Your Inboxes]) --> B[Email Worker]
B --> C{Promotional?}
C -->|Yes| D[Discard]
C -->|No| E[AI Extraction]
E --> F[(D1 Database)]
F --> G[React Dashboard]
F --> H([Bark iOS Push])
List-Unsubscribe, Precedence: bulk, etc.) before calling the AI — saves tokens.Go to Cloudflare Dashboard → Workers & Pages → D1 SQL Database → Create. Name it inbox-d1.
Open the database → Console, paste and run the contents of db/schema.sql.
Copy the database_id for the next step.
In your forked repository, go to Settings → Secrets and variables → Actions and add:
- CLOUDFLARE_ACCOUNT_ID
- CLOUDFLARE_API_TOKEN
- TOML — use the comment-free template to avoid parse errors.
Then go to Actions → Deploy Auth Inbox to Cloudflare Workers → Run workflow.
After success, delete the workflow logs to avoid leaking your config.
bash
git clone https://github.com/TooonyChen/AuthInbox.git
cd AuthInbox
pnpm install
bash
pnpm wrangler d1 create inbox-d1
pnpm wrangler d1 execute inbox-d1 --remote --file=./db/schema.sql
Copy the database_id from the output.
bash
cp wrangler.toml.example wrangler.toml
Edit wrangler.toml — at minimum fill in:
```toml [vars] FrontEndAdminID = "your-username" FrontEndAdminPassword = "your-password" UseBark = "false"
# AI provider — choose any compatible service AI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta/openai" AI_API_KEY = "your-api-key" AI_API_FORMAT = "openai" AI_MODEL = "gemini-2.0-flash"
[[d1_databases]] binding = "DB" database_name = "inbox-d1" database_id = "" ```
AI_API_FORMAT options:
| Value | Endpoint | Compatible providers |
|---|---|---|
openai |
/v1/chat/completions |
OpenAI, Gemini (OpenAI-compat), DeepSeek, Groq, Mistral, … |
responses |
/v1/responses |
OpenAI Responses API |
anthropic |
/v1/messages |
Anthropic Claude |
Common AI_BASE_URL values:
OpenAI: https://api.openai.com
Gemini (OAI-compat): https://generativelanguage.googleapis.com/v1beta/openai
Anthropic: https://api.anthropic.com
DeepSeek: https://api.deepseek.com
Groq: https://api.groq.com/openai
Optional fallback provider (triggered if primary fails after 3 retries):
toml
# AI_FALLBACK_BASE_URL = "https://api.openai.com"
# AI_FALLBACK_API_KEY = "your-fallback-key"
# AI_FALLBACK_API_FORMAT = "openai"
# AI_FALLBACK_MODEL = "gpt-4o-mini"
Optional Bark vars: barkTokens, barkUrl.
bash
pnpm run deploy
Output: https://auth-inbox.<your-subdomain>.workers.dev
Go to Cloudflare Dashboard → Websites → <your-domain> → Email → Email Routing → Routing Rules.
Catch-all (forwards all addresses to the Worker):
Custom address (forwards a specific address):
Visit your Worker URL, log in with the credentials you set, and start receiving verification emails.



$ claude mcp add AuthInbox \
-- python -m otcore.mcp_server <graph>