Workspace Agent 49 MCP tools

Email verification for CI and AI agents

Disposable inbox per CI run — create, wait, and extract OTP or magic link in one call. Scoped run keys, no shared test mailbox, no human OTP checks.

MCP Playwright API CLI
// Cursor / Codex MCP
await mailagent_verify_signup({
  service: "github",
  runId: "ci-4821",
  deleteAfterSuccess: true,
});

// → agent.primaryAction
// → verification.primaryButton
// → confidence: "high"
  • Cloudflare
  • Resend
  • Neon
  • Model Context Protocol

Verify signup and workspace mail

Disposable inboxes and structured extraction for tests — plus Workspace Agent for MailAgent inbox messages, reminders, and policy-gated replies. One MCP server for QA and autonomous mail.

Verify signup in one call

Create inbox, wait for the message, extract OTP or magic link, return agent.primaryAction — no inbox UI scraping.

Agent docs →

MCP for Cursor & Codex

MCP tools: verify, workspace mail, simulate, scoped keys.

Browse tools →

Playwright & Cypress

Per-worker labels, subjectContains, simulate without SMTP in CI.

QA guide →

Self-host or hosted

MIT on Cloudflare Workers + Resend, or api.webmailagent.com with an API key.

Integration guide →

Scoped run keys

Agents mint short-lived keys per run — no permanent secrets in CI.

Scoped keys →
  • Cloudflare Workers
  • MCP · 49 tools
  • Resend Inbound
  • Forwarded mail
  • DeepSeek · Qwen · Ollama

No SaaS markup
for CI verification

Per-seat QA dashboards charge for UI your CI never opens. MailAgent returns structured OTP and links — not another inbox tab.

Resend Inbound MailAgent

MCP and REST extraction on Workers — self-host with MIT, or api.webmailagent.com when you want hosted speed.

Up and running in 1, 2, 3…

No shared test inbox. No manual OTP checks.
Scoped run keys instead of permanent secrets in CI.

1

Create inbox

Test or agent calls MCP/API. You get an isolated address and optional label tied to the CI run.

2

Wait & extract

Submit the address in signup, then one call returns OTP or magic link as agent.primaryAction — no inbox UI scraping.

3

Ship in CI

Simulate without SMTP in pipelines. Delete the inbox when the run succeeds, or keep it open for debugging.

Return the action, not raw email markup

Tests and agents get structured verification: OTP, magic link, safe HTML CTA, confidence, alternatives, and a recovery path when the email never arrives.

Primary action

agent.primaryAction tells the agent whether to enter an OTP or open a magic link.

Safe HTML buttons

primaryButton exposes buttons like “Verify email” or “Reset password” without scraping raw HTML.

Confidence metadata

Responses include confidence, matchedRule, reason, and alternatives for safer automation.

Diagnose on timeout

diagnose returns failure summary, recommended action, and retry payloads for agents and CI logs.

Run timeline

Trace inbox created, wait started, message received, extraction, callback, notify, and cleanup events by runId.

Cleanup policies

Delete successful inboxes, keep failures for debugging, or clean a whole CI run by labelPrefix.

Short-lived run keys

mailagent_issue_access mints temporary scoped keys for a single agent run. Guide →

Raw MIME + attachments

Full .eml and attachments are available when a preview is not enough. Guide →

MCP OAuth

Browser login for remote MCP — no API key in client config. OIDC guide →

Hosted console

Dashboard for inboxes, domains, team keys, and audit log. Open console →

Workspace Agent

Summarize threads, draft replies, suggest reminders, and execute sends with draft_only or allowlisted auto-send. Autonomy guide →

Forwarded mail workflow

Forward or send mail into a MailAgent inbox. Workspace tools summarize stored messages and draft replies without Gmail API access.

Stop fighting shared test inboxes

Each Playwright worker gets its own address. Filter by label, narrow with subjectContains, keep failed inboxes for debugging, and simulate email without SMTP in CI. Playwright guide → · MCP signup QA →

Parallel runs collide

label=pw-0-… per worker — list and debug inboxes for one CI job without stepping on teammates.

Wrong email in the pile

Service presets, subjectContains, and messageIndex keep the test on the intended email.

Leaked CI secrets

Scoped keys with labelPrefix=ci- limit blast radius if a pipeline secret escapes. Scoped keys →

Playwright open (one-shot)
import { createMailAgentQa, MailAgentQa } from "@mailagent/qa";

const mail = createMailAgentQa();
const { address, id } = await mail.createInbox({
  label: MailAgentQa.runLabel("signup"),
  service: "auth0",
});

// … fill signup form with address …

const { otp } = await mail.waitForVerification(id, {
  subjectContains: "verify",
});

From verification to mail you can act on

After signup QA, agents keep working the thread: summarize context, draft a reply, log actions, and complete reminders. Autonomous sends stay off by default; admins set policy, idempotency keys prevent double-send, and mailagent_workspace_model_status blocks execution when no LLM is configured.

Summarize & draft

mailagent_workspace_summarize and mailagent_workspace_draft_reply load mail from an inbox id or supplied message payload. DeepSeek and Qwen fall back to each other when both keys are set.

Reminders & audit trail

Suggest, create, and complete reminders. Log every agent step with mailagent_workspace_list_actions so open reminders are not drafted twice.

Policy-gated send

mailagent_workspace_execute_reply dry-runs first, then sends at most once per idempotency key. Modes: draft_only, auto_send_safe, or full_auto with domain allowlists.

Local LLM (dev)

WORKSPACE_LLM_PROVIDER=local with Ollama or LM Studio on the same machine as npm run dev — or use npm run dev:docker:ollama for a one-command stack. Local LLM guide →

MCP
// Check LLM before workspace work
await mailagent_workspace_model_status();

// Draft from stored inbound message
await mailagent_workspace_draft_reply({
  inboxId: "inb_…",
  messageId: "msg_…",
  instruction: "Confirm QA review — no new commitments.",
});

// Send only when policy allows + idempotency key
await mailagent_workspace_execute_reply({
  inboxId: "inb_…",
  messageId: "msg_…",
  idempotencyKey: "run-4821-reply",
});

MCP tools. Verify, workspace, simulate

Add mailagent to Cursor or Codex. Signup flows use structured primaryAction; workspace tools summarize MailAgent inbox messages, track reminders, and execute policy-gated replies. Mint scoped run keys and call mailagent_plan_next for recovery when a run stalls.

Tool Description Category
mailagent_workspace_model_status LLM readiness (DeepSeek, Qwen, local) — call before workspace execution Workspace
mailagent_workspace_draft_reply Draft from stored MailAgent inbox message or supplied payload Workspace
mailagent_workspace_execute_reply Policy-checked send with idempotency — default is deny Workspace
mailagent_simulate_message Inject realistic test email without SMTP QA
mailagent_issue_access Short-lived scoped key for one autonomous run Runs
mailagent_plan_next Next MCP tool, payload, and recovery steps Autopilot
mailagent_verify_signup Wait → extract → return agent.primaryAction Recommended
mailagent_create_inbox Temporary address with service preset, TTL, notifyEmail, cleanup
mailagent_simulate_message OTP, magic_link, invite, attachments — no SMTP in CI
mailagent_diagnose_inbox Explain timeouts and return retry payloads

Agents, not burner extensions

Consumer burner mail protects your personal inbox. MailAgent automates verification for code.

MailAgent Mailosaur / QA SaaS Typical burner mail
MCP / API-first Yes REST Browser UI
OTP + link extraction Built-in Built-in Manual
SSE wait Yes Poll
Per-run isolated inbox label + API Yes Shared pool
Sender allowlist Yes Patterns Block in UI
Self-hosted domain Your Resend Their domain Their domain
Workspace summarize / draft MCP + REST
Google Gmail OAuth Disabled Varies
Policy-gated auto-reply Opt-in
Local LLM (Ollama) Self-host dev
Long-lived aliases TTL only Yes Yes

Hosted API when you need speed. Self-host when you need control.

MailAgent ships as a complete stack: Worker, MCP server, QA SDK, docs, and deploy scripts. Use our API now, or run the same architecture on your Cloudflare account.

License MIT free to use, fork, and self-host
Production stack Workers, Queues, Durable Objects, Neon the same pieces used by the hosted service
Hosted endpoint api.webmailagent.com optional API key for teams that do not want to operate infra

The response is already agent-readable

curl
# One-shot (recommended)
curl -X POST https://api.webmailagent.com/v1/inboxes/open \
  -H "Authorization: Bearer $API_KEY" \
  -d '{"service":"github","timeoutSeconds":90}'

# → verification.otp
# → verification.primaryLink
# → verification.primaryButton
# → verification.confidence

Give your agent
an inbox & a workspace

Signup QA: disposable inboxes, OTP extraction, CI simulate. Workspace: summarize, draft, reminders, policy-gated send. Open source — self-host or use the hosted API.