Replit Agent can build a complete app from a prompt, but you’ll still need an email provider to send welcome messages, password resets, or order confirmations. Replit doesn’t offer its own email service; instead, it provides connectors you can enable once and reuse across all your apps. Brevo is one of those connectors.
This guide walks you through how to enable the Brevo connector, ask Agent to build a sending flow, and check that your transactional emails arrive. You’ll also learn how to add Brevo's MCP server so Replit Agent can manage templates, contacts, and campaigns right from the chat. We tested each step in a new Replit project, and the code below is what Agent generated.
The information in this article was last updated on October 14, 2026.
Table of Contents
- How the Brevo connector works in Replit
- What you need before you start
- Step 1: Create a Brevo API key
- Step 2: Enable the Brevo connector in Replit
- Step 3: Ask Replit Agent to build the email flow
- Step 4: Test and check delivery in Brevo
- Step 5: Publish your app
- Optional: Let Replit Agent manage your Brevo account with the MCP server
- Alternative: use your Brevo API key in Secrets
- Troubleshooting Replit email with Brevo
- Start sending email from Replit
How the Brevo connector works in Replit
When you enable the Brevo connector, you only need to give Replit your Brevo API key once, as Replit stores it at the account level, not at the project level. Your app can then connect to Brevo via Replit's connector proxy, which automatically adds the key to each outgoing request.
- No key in your code or Secrets. The app never sees the API key, so it can't leak through a commit, a shared project, or the browser.
- One setup for every app. The connection belongs to your Replit account, so new projects can use it right away.
- Agent can use it while building. In our test, Agent found the connection on its own and read the Brevo account, for example, to list verified senders.

Behind the connector is the standard Brevo API (here's what an email API is if you're new to it), so your app can use everything the API offers, from templates to contacts.
What you need before you start
- A Brevo account. The free plan includes 300 emails per day with API access, no credit card needed.
- A verified sender in Brevo. Brevo only sends from addresses you have verified. For production, also authenticate your domain, as explained in our guide to SPF, DKIM, and DMARC.
- A Replit account. We ran this test on the free Starter plan, where Agent works in Free Mode with usage limits. Replit's documentation says most connectors require a Core, Pro, or Enterprise subscription, but the Brevo connector was available on the free plan when we tested it.
Step 1: Create a Brevo API key
In Brevo, go to Settings > SMTP & API, open the API keys & MCP tab, and click Generate API key. Brevo will ask for a verification code, then a name and an optional expiry date (7 days to 1 year). Name the key "Replit" so you can recognise it and revoke it later. Keys with no activity for 90 days are deactivated.
Copy the key as soon as it appears, because Brevo only shows it once. Make sure it's an API key (it starts with xkeysib-), not an SMTP key.
Step 2: Enable the Brevo connector in Replit
In Replit, open Integrations from the left sidebar, search for Brevo, and click Enable. Paste your key in the API Key field and click Configure.

The Brevo card now shows Enabled, with the type Connector and API key authentication. You only do this once. To rotate the key later, generate a new one in Brevo and update it here. Apps that use the connector pick it up without code changes.

Step 3: Ask Replit Agent to build the email flow
Create a new app and describe what you want. We used this prompt, but you can always tailor it to your needs:
Replit Agent detected the Brevo connection without asking for the key again and confirmed that it would use the connection only through Replit's managed setup, keeping the app’s credentials private.

Here is the server route it generated (artifacts/api-server/src/routes/send-test-email.ts), trimmed to the essentials:
The key line is connectors.proxy("brevo", "/smtp/email", ...). It sends the request to Brevo's transactional email endpoint, and Replit adds your API key on the way. The route also logs Brevo's error response rather than hiding it, which saves time when a sender isn't verified.
From there, ask Replit Agent to adapt the route to your real flows, such as a welcome email on signup or a receipt after payment. To send a Brevo template instead of inline HTML, replace subject and htmlContent with templateId and params. For the content itself, see these tips on effective welcome emails.
Step 4: Test and check delivery in Brevo
Open the preview, enter your own address, and send a test. Then open Brevo > Transactional > Logs, where each message shows its status, from Sent to Delivered and Opened.

To test without sending real emails, add "headers": { "X-Sib-Sandbox": "drop" } to the JSON body. Brevo validates the request and returns a success response, but delivers no emails. For more ways to test, see our roundup of email testing tools.
Step 5: Publish your app
When you publish, the connector goes with the app. Replit's connector SDK detects when it runs in a published app and authenticates it, so you don't need to copy your Brevo key into production secrets.
Check whether your app reads anything else from Secrets, such as a sender address or template ID. Development and production secrets are managed separately, so add those values under Publishing > Adjust settings > Production app secrets, then publish your app again. Secrets work with every deployment type except Static, so if your app sends email, it will need a backend (Autoscale works well).
Optional: Let Replit Agent manage your Brevo account with the MCP server
Brevo also offers an MCP server with ready-made tools that let Replit Agent work with your Brevo account right from the chat, including templates, contacts, lists, campaigns, and CRM data. Transactional emails aren’t sent through the MCP server; your app and the connector manage them, as the connector handles sending.
This is useful when you want Replit Agent to configure Brevo as it builds—for example, by creating a welcome template or a beta-user list—without adding that logic to your app.
Create an MCP key in Brevo
In Settings > SMTP & API, open the API keys & MCP tab, click Generate API key, then turn on Create MCP server API key in the confirmation window. Brevo will then provide you with an MCP version of the key, which can't be used for API calls. Keep it separate from the key in your connector.
Add the server in Replit
To add the server, go to Integrations, open Your integrations, click Add custom, then Add personal MCP server:
- Display name: a name Agent will use in the chat, such as "Brevo templates".
- MCP Server URL: the URL of the Brevo module you need (see below).
- Advanced settings: click Add header, enter Authorization as the name and Bearer <your-MCP-key> as the value.
- Leave Scan tool output for prompt injection checked, then click Test & save.

A personal server is available only to you, while a workspace server is shared with everyone in your Replit workspace. Once saved, the server appears next to the connector with an MCP label.

Connect one module, not the full server
This detail decides whether the MCP server is useful in Replit. In our test, the full server (https://mcp.brevo.com/v1/brevo/mcp) gave Agent exactly 100 tools, grouped alphabetically from accounts to email campaigns. Templates, lists, and senders never reached Agent, suggesting Replit loads only the first 100 tools of a server.
Brevo splits its MCP server into 27 modules, each with its own URL, so connect the ones you need instead:
brevo_templatesfor email templatesbrevo_contactsfor contacts and listsbrevo_sendersfor sender identitiesbrevo_email_campaign_managementfor email campaigns
The URLs follow the same pattern, for example https://mcp.brevo.com/v1/brevo_templates/mcp. Don't confuse brevo_templates with brevo_transac_templates, which covers SMS templates and the history of sent transactional emails. With the templates module connected, Agent listed our email templates in one request.
Connecting only the tools Replit Agent needs can also help reduce risk. The full server includes actions that can't be undone, like sending a campaign immediately or deleting data. For anything involving real contacts, you can ask Agent to create drafts and then send them yourself from Brevo.
Alternative: use your Brevo API key in Secrets
The connector links your sending code to Replit. If you want code that also runs outside Replit, or you prefer to manage the key yourself, store it as a secret and call the Brevo API directly:
- Open Tools, then Secrets in the Setup section, click New Secret, and add
BREVO_API_KEYwith your API key. - Call the API from server-side code only, never from the frontend.
- Before you publish, add the same secret under Production app secrets and publish again. A missing production secret is a common reason emails work in the editor but not in the live app.
Troubleshooting Replit email with Brevo
Here are some common issues we’ve noticed and how to fix them:
| Problem | Likely cause | Fix |
|---|---|---|
| "Brevo could not send the test email" | Brevo rejected the request, often because the sender isn't verified | Check the error in the app logs and verify the sender in Brevo |
| Agent asks you for a Brevo API key | The connector isn't enabled for this account or workspace | Enable Brevo in Integrations, then ask Agent to use the Brevo connector |
| 401 error from Brevo | The key was revoked or expired, or it's an SMTP key | Generate a new API key and update it in the connector |
| 429 error from Brevo | Too many requests in a short time | Retry with a delay, and see how API rate limits work |
| Emails work in the editor but not in the published app (Secrets method) | Production secrets are missing | Add them under Production app secrets and publish again |
| Agent can't find template, list, or sender tools | The full MCP server only exposes its first 100 tools in Replit | Connect the module you need, such as brevo_templates |
| Emails land in spam | Domain not authenticated | Set up SPF, DKIM, and DMARC for your sending domain |
Start sending email from Replit
With the Brevo connector, sending email from Replit requires one API key and a single click in Integrations. Agent writes the sending code; the key stays with Replit, and every message appears in Brevo's logs. The same Brevo account also covers marketing campaigns, SMS, and CRM as your app grows.
Brevo's free plan includes 300 emails per day, no credit card needed. Get started with Brevo's email API.







