MCP
SMTP2GO MCP
https://developers.smtp2go.com/mcp is a remote Streamable HTTP MCP server. It initializes as SMTP2GO-API-Docs and exposes tools for listing/searching API endpoints plus executing API requests.
The documentation discovery tools may be available without authentication. API execution through execute-request requires an SMTP2GO API key, sent in the X-Smtp2go-Api-Key request header or as an Authorization: Bearer token. See Authentication Notes.
Prefer a packaged, task-specific capability over a live tool server? See Skills.
Choose your client
| Client | Where you configure it | How the key is sent |
|---|---|---|
| ChatGPT | Desktop app: Plugins > MCPs | Bearer token field. Key only, ChatGPT adds Bearer |
| Codex CLI | ~/.codex/config.toml | X-Smtp2go-Api-Key header |
| Claude Desktop | Settings > Customize > Connectors | authorization header. You type Bearer before the key |
| Claude Code | claude mcp add in a terminal | X-Smtp2go-Api-Key header |
| Gemini CLI | gemini mcp add in a terminal | X-Smtp2go-Api-Key header |
| Cursor | Settings > Tools and MCPs | X-Smtp2go-Api-Key header |
| Lovable | Dashboard > Connectors | Bearer token or API key field |
ChatGPT, Claude Desktop, and Lovable are set up through a form in the app. The others use a config file or a terminal command.
Prerequisites
Every client on this page connects directly to the remote server over Streamable HTTP and needs no extra tooling or local bridge process.
Log in to SMTP2GO and create an API key at app.smtp2go.com/sending/apikeys. These permissions are recommended for email sending:
/email/send/allowed_senders/view/domain/view
Use a dedicated, narrowly scoped key for MCP, so you can disable it without affecting anything else.
Clients configured through a form (Claude Desktop, ChatGPT, and Lovable) take the key directly, so you can skip the rest of this section for them.
For the other clients, set your API key for the current terminal session:
export SMTP2GO_API_KEY="your-smtp2go-api-key"If your MCP client supports environment variables or a secret manager, prefer that over storing keys in project files. For local shell-driven clients, you can add the key to your shell profile, such as ~/.zshrc:
echo 'export SMTP2GO_API_KEY="your-smtp2go-api-key"' >> ~/.zshrc
source ~/.zshrcChatGPT
These steps are for the ChatGPT desktop app for macOS and Windows, which now includes Codex. Open Plugins and select the MCPs tab. Select Add (top right), then choose to connect a custom MCP.
Fill in the form:
- Name:
SMTP2GO - Type: Streamable HTTP
- URL:
https://developers.smtp2go.com/mcp - Bearer token env var: your SMTP2GO API key on its own
Leave Headers and Headers from environment variables empty, then select Save.
Enter the key only, withoutBearerChatGPT adds the
Bearerprefix itself. Typing it yourself sendsBearer Bearer api-..., which is rejected. This is the opposite of Claude Desktop, where you type the prefix.
Codex CLI
Looking for the Codex app?The standalone Codex app is now part of the ChatGPT desktop app. Follow the ChatGPT steps instead.
Codex CLI reads its configuration from:
~/.codex/config.tomlAdd:
[mcp_servers.smtp2go]
url = "https://developers.smtp2go.com/mcp"
env_http_headers = { "X-Smtp2go-Api-Key" = "SMTP2GO_API_KEY" }
enabled = trueCodex connects directly to the remote server over Streamable HTTP. No Node.js, npx, or local bridge process is involved.
env_http_headers maps a header name to the name of an environment variable. Codex reads that variable from its own environment when it connects, so export SMTP2GO_API_KEY before starting Codex.
If Codex is started from somewhere that does not load your shell profile, the key may not resolve. In that case, set the header value literally instead:
[mcp_servers.smtp2go]
url = "https://developers.smtp2go.com/mcp"
http_headers = { "X-Smtp2go-Api-Key" = "your-actual-api-key" }
enabled = truehttp_headers takes literal values only. It does not expand ${SMTP2GO_API_KEY}, so a value written that way is sent to the server as that exact text and authentication fails.
Claude Desktop
In Claude Desktop, go to Settings > Customize (at the bottom of the left sidebar), then open Connectors and select Add.
Fill in the form:
- Name:
SMTP2GO - Remote MCP server URL:
https://developers.smtp2go.com/mcp
Select Continue.
On the next step:
- Authentication: choose No sign-in
- Under Request headers, select Add header
- Header name:
authorization - Value:
Bearer {YOUR_SMTP2GO_API_KEY} - Leave Required ticked
- Header name:
Select Add.
Choosing No sign-in here is deliberate, not a mistakeThe sign-in options are for OAuth, which SMTP2GO does not use. Claude Desktop sends the request header value exactly as entered, so include the
Bearerprefix before your key: the value must readBearer api-..., not the bare key.
Start a new chat to test it. See Confirm it works.
Claude Code
claude mcp add --transport http smtp2go https://developers.smtp2go.com/mcp \
--header "X-Smtp2go-Api-Key: $SMTP2GO_API_KEY"Run this in a terminal, not inside a claude session. Other Claude Code surfaces have their own ways to add a server: the desktop app and VS Code have a connectors UI, and Claude Code on the web reads .mcp.json from your repository.
The default scope is local, which registers the server for the current project only. Pass --scope to change where the configuration is written:
| Scope | File | Available to |
|---|---|---|
local | ~/.claude.json, under the entry for this project | Only you, only this project. The default |
project | .mcp.json in your project root | Everyone who clones the project |
user | ~/.claude.json, under the top-level mcpServers key | Only you, all projects |
Use --scope user to make the server available in all your projects. Avoid --scope project with a literal API key, because .mcp.json is committed to version control.
See Find your configuration on disk in the Claude Code documentation for more detail.
Gemini CLI
gemini mcp add smtp2go https://developers.smtp2go.com/mcp \
--scope user \
--transport http \
--header "X-Smtp2go-Api-Key: $SMTP2GO_API_KEY"Your shell expands $SMTP2GO_API_KEY before Gemini CLI sees it, so the real key is written into Gemini's settings file. --scope user stores it in ~/.gemini/settings.json. Without it, Gemini CLI writes to .gemini/settings.json in the current project, which is easy to commit by accident.
Cursor
In Cursor, go to Settings > Tools and MCPs > New MCP Server, then paste:
{
"mcpServers": {
"smtp2go": {
"type": "streamable-http",
"url": "https://developers.smtp2go.com/mcp",
"headers": {
"X-Smtp2go-Api-Key": "${env:SMTP2GO_API_KEY}"
}
}
}
}${env:SMTP2GO_API_KEY} is Cursor's environment-variable interpolation syntax. Cursor resolves variables in the headers field from its own process environment when it starts. Remote MCP servers cannot use Cursor's envFile setting.
On macOS, Cursor launched from Finder or the Dock may not inherit variables exported in your shell profile. If authentication fails, fully quit Cursor and launch it from a terminal where SMTP2GO_API_KEY is set. Cursor's MCP troubleshooting guide recommends confirming that shell-profile variables are available to Cursor and restarting it after environment changes.
Depending on the Cursor version, an unresolved variable may be sent literally, resolve to an empty value, or prevent the MCP connection. Check MCP Logs before using a literal key as a temporary fallback:
"headers": {
"X-Smtp2go-Api-Key": "your-real-smtp2go-api-key"
}A literal value stores the key in mcp.json. Remove it after testing, do not commit it, and prefer environment-variable interpolation for normal use.
Lovable
In Lovable, open https://lovable.dev/dashboard, then go to Connectors.
Under Chat connectors, select Custom MCP. It is usually the last item in the Chat connectors list.
Fill in the form:
- Server name:
SMTP2GO - Server URL:
https://developers.smtp2go.com/mcp - Authentication: Bearer token or API key
Enter your SMTP2GO API key, then select Add server.
Lovable chat may ask for the API token again when it adds email integrations. If prompted, enter the same SMTP2GO API key.
When you ask Lovable to send email through SMTP2GO, explicitly instruct it to use a verified sender email address. Sending may fail if the sender address is not verified in your SMTP2GO account.
Confirm it works
After configuring the server, your MCP client should show these tools:
list-endpointsget-endpointsearch-endpointsexecute-requestget-server-variables
Some clients show display names instead. Claude Desktop, for example, lists Get Endpoint Details, Get Server Variables, List API Endpoints, and Search API Endpoints as read-only tools, and Execute API Request as a write/delete tool.
Try a read-only discovery action first, such as searching for email/send or listing endpoints, before using execute-request. Then try a request that needs your key, for example:
How many emails have I sent through SMTP2GO this month?Authentication Notes
Create your key as described in Prerequisites. Configure your MCP client to send it with API execution requests as:
X-Smtp2go-Api-Key: your-smtp2go-api-key
For simplicity, most MCP client examples above send the header on every MCP request.
Bearer token alternative
X-Smtp2go-Api-Key is the primary way to authenticate. The server also accepts a standard bearer token:
Authorization: Bearer your-smtp2go-api-key
Use it for clients that only offer a bearer token or Authorization header field: ChatGPT, Claude Desktop, and Lovable on this page. Use X-Smtp2go-Api-Key everywhere else.
The server expects the full value Bearer your-api-key. Some clients, such as ChatGPT, add the Bearer prefix for you. Others, such as Claude Desktop, send exactly what you type, so you must include it. A header value containing only the key is rejected.
Do not commit real API keys to project configuration. Prefer a dedicated, narrowly scoped SMTP2GO API key for MCP use, and use environment variable expansion or a secret manager where your MCP client supports it.
execute-request can perform real SMTP2GO API actions, including sending email if the key has permission. Remove or disable the key when it is no longer needed.
Updated 14 days ago