@nuntly/sdk-mcp) gives Codex tools to send email, manage domains and webhooks, and read and reply to inbound messages. Check the prerequisites first: an API key and Node.js 20 or later.
Create an API key
In the dashboard, go to API Keys and create a key with the Sending only permission, and leave Restrict to domains empty. Copy it. Pick Full access instead for an agent that manages domains, inboxes, webhooks or agent memory. See API keys.Add the MCP server
Run this in a terminal. Paste your key when the cursor waits, and press Enter:bash or zsh
~/.codex/config.toml, outside your repository, and starts it in every Codex session. Check the configuration:
nuntly line shows NUNTLY_API_KEY=***** and the status enabled. In a Codex session, /mcp lists the tools the server exposes.
Read the key from your environment
To keep the key out ofconfig.toml, for example on a shared machine or in CI, add the server by hand and let Codex pass the variable through. Codex gives an MCP server only a short list of variables from your environment, so env_vars must name the key:
~/.codex/config.toml
NUNTLY_API_KEY in the shell that starts Codex. startup_timeout_sec leaves time for the first npx download.
Send a test email
Ask your agent: “Send a test email from hello@onboarding.nuntly.com to my address.” Use the email address of your Nuntly account (the organization owner), exactly as you signed up. This sender only delivers to that address.Troubleshooting
The server times out at the start of a session. The firstnpx download can outlast the startup timeout. Add startup_timeout_sec = 60 to the [mcp_servers.nuntly] table and start a new session.
NUNTLY_API_KEY environment variable is required. With env_vars, the variable is missing from the shell that started Codex, or env_vars does not name it. Codex does not pass other variables of your environment to the server.
For errors shared by every client, such as a tool that returns isError: true, see Troubleshooting.
Next steps
AI agent inboxes
Give the agent its own inbox and a memory per thread
What an agent can do
See which operations stay with you
