mailagent — Claude Code and Codex plugin: temp inboxes for OTP
mailagent hands the agent throwaway inboxes so it can read verification codes and magic links, finish a signup check, then clean up.
MIT ★ 1,596 updated 2026-10-29
/plugin marketplace add hashgraph-online/awesome-codex-plugins
/plugin install mailagent@awesome-codex-pluginsWhat mailagent does
The plugin wires MailAgent's MCP server into your agent. That server opens a temporary mailbox, waits for the message and pulls out the confirmation code or the magic link. A test signup then runs end to end without anyone copying mail by hand.
The bundle ships scripts/run-mailagent-mcp.sh, which starts the stdio package @mailagent/[email protected] through npx, plus a .env.example template. Secrets belong in .env; the API address defaults to https://api.webmailagent.com. The server exposes 23 tools. To confirm the connection, run codex mcp list and look for mailagent_plan_next, mailagent_verify_signup and mailagent_create_inbox.
You need MAILAGENT_API_KEY, either in .env or inherited from the parent process. Without it the server cannot authenticate. Keep the key out of logs and chat. A remote OAuth route also exists at https://api.webmailagent.com/mcp with a short-lived mat_ token, which drops the local subprocess.
What it helps with
- read the OTP out of a signup email
- grab a magic link and follow it
- run a signup flow without touching a real mailbox
- wait for a message matching a subject line
- delete the throwaway inbox once the test ends
Example prompts for the agent
- Create an inbox with
mailagent_create_inbox, label itsignup-test, and put the address into the signup form. - Wait for the mail with
Verifyin the subject throughmailagent_wait_and_extractand pull theotpfield. - Clean up with
mailagent_delete_inboxafter the account is created.
How to install mailagent
Plugin marketplace
/plugin marketplace add hashgraph-online/awesome-codex-plugins/plugin install mailagent@awesome-codex-pluginsStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about mailagent
How do I install mailagent in Claude Code?
Add the marketplace with /plugin marketplace add hashgraph-online/awesome-codex-plugins, then install the plugin: /plugin install mailagent@awesome-codex-plugins.
What does mailagent do?
It gives the agent temporary inboxes: create one, wait for the mail with a code or magic link, extract the value, delete the inbox. The mailagent_verify_signup call does the wait and extract in a single step.
Does mailagent need an API key?
Yes, MAILAGENT_API_KEY goes into .env or comes from the parent process environment; the API address defaults to https://api.webmailagent.com. The OAuth route instead takes a short-lived mat_ token.
Source text
MailAgent · MIT
# MailAgent Codex Plugin MailAgent gives Codex temporary inboxes for signup QA, OTP emails, and magic links. ## Setup ```bash cp .env.example .env chmod +x scripts/run-mailagent-mcp.sh ``` Put secrets in `.env` (gitignored). `MAILAGENT_API_URL` defaults to `https://api.webmailagent.com`. `MAILAGENT_API_KEY` may also come from the parent process environment. Do not log or paste the key. ```dotenv MAILAGENT_API_URL=https://api.webmailagent.com MAILAGENT_API_KEY=ma_or_mak_replace_me ``` ## Check MCP The plugin launches the published npm stdio package via `scripts/run-mailagent-mcp.sh`: ```bash codex mcp list ``` Expected: `mailagent` server with `mailagent_plan_next`, `mailagent_verify_signup`, and `mailagent_create_inbox`. ## Verify signup flow 1. If unsure, call `mailagent_plan_next` and follow `nextTool` / `nextPayload`. 2. `mailagent_create_inbox` with `label` and `service`. 3. Submit returned `address` in the signup form. 4. `mailagent_wait_and_extract` with `inboxId` and `subjectContains`. 5. Use `otp` or `primaryLink` to finish signup. 6. `mailagent_delete_inbox` for cleanup. If the form is already submitted, use `mailagent_verify_signup` to wait and extract in one call. ## Remote MCP (OAuth) For Streamable HTTP without a local subprocess, see [OAuth IdP docs](https://webmailagent.com/docs/oauth-idp.html) and use `https://api.webmailagent.com/mcp` with a short-lived `mat_` bearer token. This bundle keeps stdio MCP via `npx -y -p @mailagent/[email protected] mailagent-mcp`. ## Install from GitHub marketplace ```bash codex plugin marketplace add Alex0nder/MailAgent codex plugin add mailagent@mailagent ``` Docs: https://webmailagent.com/docs/codex.html
© MailAgent · MIT · hashgraph-online/awesome-codex-plugins