Cursor: let your AI agent read verification codes
Cursor's agent can write and run code, but when your app sends a confirmation code by email it has to ask you for it. Give it an inbox and it stops asking.
Step 1: get an API key
Create a free QuickInbox account and make a key on the API Keys page. For an agent, make a separate key limited to one namespace, so you can revoke it on its own later.
Step 2: add the server to Cursor
Paste this into ~/.cursor/mcp.json for all projects, or .cursor/mcp.json for one project:
{
"mcpServers": {
"quickinbox": {
"url": "https://quickinbox.net/mcp",
"headers": { "Authorization": "Bearer qk_live_your_key_here" }
}
}
}Then open Cursor Settings, go to MCP and check that quickinbox is enabled and lists its tools. The MCP server page also has an "Add to Cursor" button that fills in the URL for you.
Step 3: use it in a prompt
Write a Playwright test for our signup page. To get a real inbox, call
quickinbox_generate_test_address first. After submitting the form, call
quickinbox_get_verification with the same tag and use the code it returns.You can also use it while you build, without writing a test at all:
I just changed the welcome email template. Sign up with a new QuickInbox
address on localhost:3000 and show me the subject and the links in the email.The tools Cursor gets
quickinbox_generate_test_address: makes a fresh address in your namespace, such asacme7x.signup-test@quickinbox.net.quickinbox_get_verification: finds the code or the link in the newest matching email.quickinbox_get_emails: reads the latest emails, optionally for one address only.quickinbox_list_namespaces,quickinbox_whoamiandquickinbox_about: tell the agent what it can use.
Tips
- Ask for a new address per run. A fresh tag means no leftover emails from earlier tries.
- Name the tag. Telling the agent to use a tag like
signup-testmakes it easy to find the emails later in your workspace. - Turn the run into a real test. Once the agent has proven the flow works, ask it to write the same steps as a Playwright test using the REST API. See email verification in Playwright.
Related guides
- OpenAI Codex: read test emails with an MCP server
- VS Code Copilot agent mode: add an email MCP server
- Test magic link login with an AI agent
- Playwright MCP plus an email inbox: a full signup test run by an agent
- MCP server overview
Try it: the QuickInbox MCP server is included on every plan, including the free plan with 5,000 emails a month. Create a free account, make an API key and connect your agent in two minutes.