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 in the X-Smtp2go-Api-Key request header.
Prefer a packaged, task-specific capability over a live tool server? See Skills.
Prerequisites
Every client on this page connects directly to the remote server over Streamable HTTP and needs no extra tooling or local bridge process.
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 ~/.zshrcCodex App / Codex CLI
In the Codex App, go to Settings > Configuration and open config.toml. If you use Codex CLI, the config file is usually:
~/.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.
The Codex App may not inherit variables exported in your shell profile. If the key does not resolve there, 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 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.
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 None
- Under Request headers, select Add header
- Header name:
authorization - Value:
Bearer {YOUR_SMTP2GO_API_KEY}
- Header name:
Select Add.
Choosing None here is deliberate, not a mistakeClaude Desktop's built-in authentication options do not send the custom
X-Smtp2go-Api-Keyheader, so the key is supplied as a request header instead. Include theBearerprefix before your key: the value must readBearer api-..., not the bare key.
The connector should then list these tools:
- Read-only tools: Get Endpoint Details, Get Server Variables, List API Endpoints, Search API Endpoints
- Write/delete tools: Execute API Request
Start a new chat to test it, for example:
How many emails have I sent through SMTP2GO this month?Gemini CLI
gemini mcp add smtp2go https://developers.smtp2go.com/mcp \
--transport http \
--header "X-Smtp2go-Api-Key: $SMTP2GO_API_KEY"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
Try a read-only discovery action first, such as searching for email/send or listing endpoints, before using execute-request.
Authentication Notes
Log in to SMTP2GO and create an API key at:
https://app.smtp2go.com/sending/apikeys/
These permissions are recommended for email sending:
/email/send/allowed_senders/view/domain/view
Then configure your MCP client to send the key 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
This was added so Claude Desktop's custom connectors, which cannot send the X-Smtp2go-Api-Key header, can still authenticate. Use X-Smtp2go-Api-Key for every other client on this page.
Do not omit the Bearer prefix. 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 19 days ago