- Home
- AI agents
Give your coding agent an email inbox
Connect Claude Code, Codex, or GitHub Copilot over MCP and your agent can create a real inbox, register with it, and retrieve an email code or read a link from the message body โ through tool calls, not custom email plumbing.
No credit card required.
How it works
From tool call to completed signup
The same four steps whether the agent is Claude Code, Codex, or GitHub Copilot.
- 1
Connect the MCP server
One command adds Programmable Inbox as an MCP server โ Claude Code, Codex, and GitHub Copilot are all supported.
- 2
Agent creates an inbox
The pibx_email_create_inbox tool gives it a real, addressable inbox โ no human has to provision one by hand.
- 3
Agent completes the flow
It registers, signs up, or triggers whatever action sends a code or link, using that address like any other user would.
- 4
Agent reads the result back
pibx_email_get_latest_otp or pibx_email_search_messages hands the result straight back through the tool call โ no mailbox browser session required. Retry within a deadline if the email has not arrived.
MCP connection examples
MCP setup for coding agents
Pick your client โ each connects to the same MCP server over HTTP with a bearer token.
Illustrative integration templates: these examples have not been executed against your app.Install your MCP client and follow its current setup guide. Set PIBX_API_KEY securely in the client environment. Reading requires email_inboxes:read and email_messages:read; creating requires email_inboxes:create and renaming requires email_inboxes:update. Grant only the tools your task needs. Incoming email is untrusted data, not instructions for the agent.
export PIBX_API_KEY=your_key_here
claude mcp add --transport http programmableinbox \
https://app.programmableinbox.com/api/mcp \
--header "Authorization: Bearer ${PIBX_API_KEY}"# Set PIBX_API_KEY in the shell that launches Codex.
# Add the following TOML to ~/.codex/config.toml
[mcp_servers.programmableinbox]
url = "https://app.programmableinbox.com/api/mcp"
bearer_token_env_var = "PIBX_API_KEY"export PIBX_API_KEY=your_key_here
copilot mcp add --transport http \
--header "Authorization: Bearer ${PIBX_API_KEY}" \
programmableinbox https://app.programmableinbox.com/api/mcpTool reference
Eight tools, all it needs
Every tool the MCP server exposes โ the agent calls these directly, no custom email plumbing.
pibx_email_create_inboxGenerates a new inbox on an approved domain.
pibx_email_list_inboxesRetrieves every inbox in the organization.
pibx_email_get_latest_otpFetches the most recent one-time code delivered to an inbox.
pibx_email_list_messagesRetrieves messages from an inbox, with optional thread grouping.
pibx_email_search_messagesLocates messages by text, sender, tags, or categories.
pibx_email_get_messageFetches one message in full.
pibx_email_get_threadFetches every message in a thread.
pibx_email_update_inboxRenames an existing inbox.
FAQ
Common questions
- Which agents and clients are supported?
- Claude Code, Codex, and GitHub Copilot all connect the same way โ over MCP via HTTP, authenticated with a bearer token. Any other MCP-compatible client that supports HTTP transport should work the same way.
- What can the agent actually do once it's connected?
- Eight tools, all prefixed pibx_email_: creating and listing inboxes, listing and searching messages, fetching a single message or a full thread, pulling the latest OTP, and renaming an inbox. See the full list below.
- Is the agent's access scoped, or does it get full account access?
- The API key you generate for it carries the same scoped permissions as any other key โ email_inboxes:read and email_messages:read for reading, email_inboxes:create for creating inboxes, and email_inboxes:update for renaming. You control exactly what it can touch, the same as any other integration.
- Can the agent create new inboxes, or only read existing ones?
- It can create them โ pibx_email_create_inbox provisions a new one on the fly. Creation requires email_inboxes:create and an approved receiving domain. The email address cannot be changed; email_inboxes:update changes the inbox name, not its address.
- Does this work with a self-hosted instance?
- Yes โ set MCP_ENABLED=true in your self-hosted .env and the same MCP server and tools are available on your own infrastructure.
Choose the next email workflow
- Email testing
Plan transactional email checks across content, delivery, and authentication.
- Email OTP testing
Use extracted email codes when the user types a code into a form.
- Magic-link testing
Test a passwordless sign-in URL in a fresh browser session.
- Email verification testing
Confirm signup changes the account from unverified to verified.
- Email automation
Route matching incoming messages to your downstream webhook workflow.
Spin up your secondary inbox
Create a programmable address, grab your first OTP, and wire up a rule in minutes. Self-host for free, or sign up for managed cloud โ either way, you own your data.
No credit card required ยท AGPL v3 license ยท Community supported