MCP Integration Overview
The SMTPProvider MCP server exposes SMTPProvider's email-sending and reporting APIs as Model Context Protocol (MCP) tools, so an AI assistant or any MCP-compatible platform can send transactional email and pull delivery/bounce reports directly inside a conversation, without writing custom integration code.
MCP Server URL: https://app.smtpprovider.com/mcp
Protocol: MCP over JSON-RPC 2.0, HTTPS POST
Any platform with MCP (or "Custom Connector") support — including Claude ,Cursor and Grok — can connect to this URL. Once connected, the assistant can call three tools to send email and retrieve reports; see Available MCP Functionalities.
How to Connect MCP with AI
OAuth Login
Set the connector's server URL to https://app.smtpprovider.com/mcp, choose OAuth as the connection type, and enter the Client ID and Client Secret SMTPProvider support gives you into your platform's connector configuration. The first time you use the connector, your platform redirects you to an SMTPProvider sign-in page where you enter the username and password SMTPProvider support gives you to approve the connection; your platform then handles token exchange and renewal automatically (access tokens last 1 hour and refresh transparently). See MCP Authentication.
Setup Steps
- Open your AI platform's connector or integration settings and choose to add a custom MCP connector.
- Enter the server URL:
https://app.smtpprovider.com/mcp. - Enter the OAuth credentials SMTPProvider support gave you.
- Save the connector. Your platform calls the server's
initializeandtools/listmethods automatically and should list three tools:send_email,get_transaction_report, andget_bounce_report. - Ask the assistant, in plain language, to send an email or pull a report.
MCP Authentication
Before connecting, contact SMTPProvider support to request the credentials for your MCP connection. These are account-specific and should be kept private.
MCP access involves separate credentials — don't confuse them:
| Credential | Purpose | How to Obtain |
|---|---|---|
| Client ID / Client Secret | Registered in your AI platform's connector settings; authorizes your platform to open an OAuth connection to the MCP server. | Contact SMTPProvider support. |
| Username / Password | Entered on SMTPProvider's sign-in page when your platform redirects you there to approve an OAuth connection. | Contact SMTPProvider support. |
If SMTPProvider support configures a default account for your connection, you can omit the account token from individual tool calls; otherwise pass it as the token argument on send_email, get_transaction_report, or get_bounce_report.
A request without valid connector credentials receives an HTTP 401 Unauthorized response.
Available MCP Functionalities
The MCP server exposes three tools, each backed by an existing SMTPProvider REST endpoint documented elsewhere on this page.
| Tool | Description | REST Equivalent |
|---|---|---|
send_email | Sends a transactional email through SMTPProvider. | Send Mail API |
get_transaction_report | Retrieves paginated email delivery (send) report rows. | All Report |
get_bounce_report | Retrieves paginated bounced-email report rows. | Bounce Report |
An AI assistant discovers these automatically after connecting and calls them based on what you ask it to do — see Send Email Requirements and Email Reports.
Send Email Requirements
The send_email tool sends one transactional email per call.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
to | string | Recipient email address. | Yes |
from | string | Sender email address. | Yes |
from_name | string | Sender display name. | Yes |
subject | string | Email subject line. | Yes |
body | string | Email body. HTML is supported. | Yes |
token | string | Account token identifying which SMTPProvider account to send as — see MCP Authentication. Not required if SMTPProvider support has configured a default account for your MCP connection. | No |
attachments | array | Optional file attachments — see Attachment Fields below. Maximum 5 files. | No |
Attachment Fields
Each item in attachments is an object:
| Field | Type | Description | Required |
|---|---|---|---|
filename | string | File name including its extension, for example invoice.pdf. | Yes |
content_base64 | string | Base64-encoded file contents. | Yes |
content_type | string | MIME type, for example application/pdf. Defaults to application/octet-stream. | No |
Allowed attachment types: pdf, doc, docx, xls, xlsx, txt, jpg, jpeg, png. Maximum 10MB per file (decoded size), up to 5 attachments per email.
Send requests are rate-limited to 3,000 requests per hour per account — the same limit enforced by the REST Send Mail API.
The tool's result contains the same response documented under the REST Responses section above.
Email Reports
get_transaction_report and get_bounce_report accept the same parameters and return paginated rows, newest first.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
from_date | string | Start date, for example 2026-10-01. | No |
to_date | string | End date, for example 2026-10-31. Must be on or after from_date. | No |
page | integer | Page number. Minimum 1; default is 1. | No |
per_page | integer | Records per page. Range 1–100; default is 100. | No |
token | string | Account token identifying which SMTPProvider account to query — see MCP Authentication. Not required if SMTPProvider support has configured a default account for your MCP connection. | No |
get_transaction_report returns the same response shape as the REST All Report endpoint; get_bounce_report returns the same shape as the REST Bounce Report endpoint.
Send email endpoint
URL: https://app.smtpprovider.com/api/send-mail/
Fields
| Field | Type | Description | Required |
|---|---|---|---|
to | string | Email address of the recipient. | Y |
from | string | Email address of the sender. | Y |
from_name | string | Name of the sender. | Y |
subject | string | Subject to send with the email. | Y |
body | string | HTML template of the email. | Y |
attachments[] | File | Add multiple rows with the same key for one or more attachments. | N |
token | string | API token provided on the profile page. | Y |
PHP cURL example
$data = [
'to' => 'test@example.com',
'from' => 'info@example.com',
'from_name' => 'test mail',
'subject' => 'test mail subject',
'body' => 'Dear Admin, I want to know some points',
'token' => '***********************',
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://app.smtpprovider.com/api/send-mail',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $data,
]);
$response = curl_exec($curl);
if (curl_errno($curl)) echo 'Request Error:' . curl_error($curl);
curl_close($curl);
echo $response;Responses
Success response
{
"success": 1,
"message_id": "mid-5739b9aa57df91a117476d030d38246c@akoneseo.com"
}Error response
{
"success": false,
"data": { "message": "User Not Exist." }
}Email Report
Method: GET
URL: https://app.smtpprovider.com/api/transaction-report
Returns paginated transactional email delivery records for the authenticated user. Results are ordered from newest to oldest.
Query Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
token | string | API token provided on the profile page. | Yes |
from_date | date | Optional start date/time filter. | No |
to_date | date | Optional end date/time filter. A date-only value includes the complete day. | No |
page | integer | Page number. Minimum 1; default is 1. | No |
per_page | integer | Records per page. Range 1–100; default is 100. | No |
PHP cURL Example
$query = http_build_query([
'token' => 'API token provided on the profile page',
'from_date' => '2026-01-01',
'to_date' => '2026-01-31',
'page' => 1,
'per_page' => 100,
]);
$curl = curl_init("https://app.smtpprovider.com/api/transaction-report?$query");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Success Response
{
"success": true,
"data": {
"current_page": 1,
"per_page": 100,
"total": 245,
"last_page": 3,
"from": 1,
"to": 100,
"has_more_pages": true,
"data": [
{
"id": 12345,
"time": "2026-01-31 12:30:00",
"from_address": "info@example.com",
"recipient": "user@example.com",
"message_id": "message-id@example.com",
"status": "send",
"bounce_reason": null,
"bounce_at": null,
"bounce_cat": null
}
]
}
}Error Responses
422: Validation failed.403: Invalid API token.
PHP cURL example with attachments
$data = [
'to' => 'test@example.com',
'from' => 'info@example.com',
'from_name' => 'test mail',
'subject' => 'test mail subject',
'body' => 'Dear Admin, I want to know some points',
'attachments[]' => 'Attach file one',
'attachments[]' => 'Attach file two',
'token' => '***********************',
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://app.smtpprovider.com/api/send-mail',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $data,
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Bounce Report
Method: GET
URL: https://app.smtpprovider.com/api/bounce-report
Returns paginated bounced email records for the authenticated user. Results are ordered from newest to oldest.
Query Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
token | string | API token provided on the profile page. | Yes |
from_date | date | Optional start date/time filter. | No |
to_date | date | Optional end date/time filter. A date-only value includes the complete day. | No |
page | integer | Page number. Minimum 1; default is 1. | No |
per_page | integer | Records per page. Range 1–100; default is 100. | No |
PHP cURL Example
$query = http_build_query([
'token' => 'API_TOKEN',
'from_date' => '2026-01-01',
'to_date' => '2026-01-31',
'page' => 1,
'per_page' => 100,
]);
$curl = curl_init("https://app.smtpprovider.com/api/bounce-report?$query");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Returned Record Fields
id,time,from_address,recipient, andmessage_idstatus,bounce_reason,bounce_at, andbounce_cat
Response Pagination Fields
The response includes current_page, per_page, total, last_page, from, to, has_more_pages, and a data array.
Error Responses
422: Validation failed.403: Invalid API token.
Generate DKIM / SPF / DMARC
Method: POST
URL: https://app.smtpprovider.com/api/domain-keygenerate
Generates a DKIM key pair for a sender domain and returns the SPF, DKIM and DMARC details required to configure DNS for that domain.
Before you begin: check whether a DMARC TXT record already exists for the sender domain using the host name _dmarc — for example, search _dmarc.example.com as a TXT record on a tool such as dnschecker.org. If no record is found, add one after generating the keys below.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
api_key | string | API token provided on the profile page. | Y |
domain_name | string | Sender domain to generate the DKIM key pair for. | Y |
is_add_existing_spf | boolean | Merge the domain's existing SPF record with the newly generated one. Set to 1 to include the existing SPF record, or 0 to omit it. | Y |
PHP cURL Example
$query = http_build_query([
'api_key' => 'API_TOKEN',
'domain_name' => 'example.com',
'is_add_existing_spf' => 0,
]);
$curl = curl_init("https://app.smtpprovider.com/api/domain-keygenerate?$query");
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Success Response
{
"success": true,
"data": {
"domain": {
"host": "smtp._domainkey.example.com",
"selector": "smtp",
"private_key": "-----BEGIN PRIVATE KEY-----\n<private_key_contents>\n-----END PRIVATE KEY-----",
"public_key": "v=DKIM1; h=sha256; k=rsa; p=<public_key_contents>",
"status": "finished",
"domain_name": "example.com",
"updated_at": "2026-03-20 10:27:47",
"created_at": "2026-03-20 10:27:47"
}
}
}Error Responses
422: Validation failed.403: Invalid API token.
View Domain Details
Method: GET
URL: https://app.smtpprovider.com/api/domain-keygenerate-view
Returns the DKIM, SPF and DMARC details previously generated for a sender domain.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
api_key | string | API token provided on the profile page. | Y |
domain_name | string | Sender domain to look up. | Y |
PHP cURL Example
$query = http_build_query([
'api_key' => 'API_TOKEN',
'domain_name' => 'example.com',
]);
$curl = curl_init("https://app.smtpprovider.com/api/domain-keygenerate-view?$query");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Success Response
Returns the domain record in the same shape as the Generate DKIM / SPF / DMARC response above.
Error Responses
422: Validation failed.403: Invalid API token.
List All Domains
Method: GET
URL: https://app.smtpprovider.com/api/all-domainlist
Returns the list of sender domains configured for the authenticated user.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
api_key | string | API token provided on the profile page. | Y |
PHP cURL Example
$query = http_build_query([
'api_key' => 'API_TOKEN',
]);
$curl = curl_init("https://app.smtpprovider.com/api/all-domainlist?$query");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Success Response
Returns an array of domain records, each in the same shape as the Generate DKIM / SPF / DMARC response above.
Error Responses
422: Validation failed.403: Invalid API token.