# SparkPost MCP

> SparkPost MCP brings your entire email delivery platform into your AI workflow. Manage campaign sends, audit deliverability metrics, and create complex HTML templates without ever leaving your code editor. You can instantly check bounce rates or manage suppression lists directly through your agent.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** email-delivery, smtp-api, inbox-placement, email-templates, transactional-email, deliverability

## Description

This connector lets you treat your email marketing system like just another API endpoint in your codebase. Forget logging into the SparkPost web interface to run basic checks; your AI client handles everything natively. You can ask it to generate a fully formatted HTML template, and then immediately use that code snippet to send a test transaction or schedule a full campaign. It's about context: letting your agent understand not just *how* to send an email, but the health of the entire system—from tracking down why bounces spiked to confirming who needs to be removed from suppression lists. By connecting this MCP through Vinkius, you give your AI client deep visibility into templates and delivery performance without needing multiple specialized integrations or complex manual scripting.

## Tools

### create_template
Registers a brand new HTML email template into your SparkPost account using a specific ID, name, subject, and markup.

### delete_suppression_record
Permanently removes a single email address from the global suppression list. This action cannot be undone.

### delete_template
Completely deletes an existing HTML template, making it unavailable for use in any campaigns.

### get_deliverability_metrics
Retrieves your account's overall performance data, including total accepted and bounced volumes, to assess health.

### get_template_details
Pulls the specific structure and content for a single, existing template ID so you can review its markup.

### list_bounce_events
Generates a list of recent email addresses that failed to deliver, helping you track down delivery issues.

### list_suppression_list
Retrieves the full list of all emails currently blocked due to spam complaints or unsubscriptions.

### list_templates
Shows a comprehensive list of every draft and published template available in your account.

### list_webhooks
Lists all the event webhooks that are currently active for receiving external data feeds.

### send_email
Sends an immediate, plain text email to a specified recipient using standard headers and content.

## Prompt Examples

**Prompt:** 
```
Check SparkPost metrics and tell me how our overall deliverability looked for the recent period.
```

**Response:** 
```
I've pulled stats via `get_deliverability_metrics`. Your account is looking healthy:
**Total Accepted**: 42,150
**Total Bounced**: 204
**Total Deferred**: 18
**Rejection Rate**: 0.48%

Your bounce rate falls well below the standard 2% danger threshold. Would you like a deeper dump of your `list_bounce_events` nonetheless?
```

**Prompt:** 
```
Create a new HTML template titled 'Holiday Promo' using ID 'promo_2025' that features a large header table.
```

**Response:** 
```
I generated a responsive HTML snippet utilizing properly structured centered table bodies. Then, I invoked `create_template` mapping attributes ID `promo_2025` with Name `Holiday Promo` successfully. 

**Result:** The template is now published in your SparkPost account and available for trigger operations immediately.
```

**Prompt:** 
```
Send a plain text email to compliance@domain.com saying 'Your account review is ready for audit'.
```

**Response:** 
```
I've invoked `send_email` dynamically setting the headers appropriately to send textual metadata.

**Transmission Result**: SUCCEEDED ✅
Recipient: compliance@domain.com
Subject: Account Review

SparkPost acknowledged the request and the payload is now actively pushing to ISP delivery paths.
```

## Capabilities

### Check campaign health
Your agent pulls detailed metrics on deliverability and overall account performance to assess how well emails are reaching inboxes.

### Build new email templates
You tell your client what you need, and it generates or registers a new HTML template structure for campaigns.

### Send test messages
The system sends immediate plain text emails to specific recipients, letting you verify transactions instantly.

### Manage compliance lists
Your client reads the current suppression list or removes a single address that was incorrectly filtered out.

### Track errors and failures
The agent pulls reports detailing recent bounce events so you know exactly why emails failed to deliver.

## Use Cases

### A sudden drop in inbox placement
An Ops Manager notices a dip in delivery rates. They ask their agent to execute `get_deliverability_metrics` and then run `list_bounce_events`. The agent reports that 30% of recent failures were due to an outdated template structure, allowing the manager to immediately fix it using `create_template`.

### Refactoring old marketing designs
A Marketing Engineer needs to modernize a decade-old promotion. They use their agent to pull down the raw markup via `get_template_details`, rewrite the HTML structure, and then deploy the new version using `create_template`.

### Verifying a high-priority account
A Developer needs to confirm that an internal audit email will send correctly. They simply ask their agent to run `send_email`, bypassing all template logic and proving the connection works instantly.

### Cleaning up spam complaints
The Postmaster Admin finds a key client was wrongly suppressed. They first check `list_suppression_list` for the address, confirm it's there, and then run `delete_suppression_record` to restore their sending capability.

## Benefits

- Stop juggling multiple UIs. You can create new HTML templates using the `create_template` tool, keeping everything within your coding environment.
- Deep dive into campaign health by running `get_deliverability_metrics`. This instantly tells you if recent changes affected your account's deliverability ratio.
- Fixing compliance issues is simple. You can use `list_suppression_list` to see who was blocked and then run `delete_suppression_record` when an address was filtered incorrectly.
- Need to test a quick message? Use the `send_email` tool for instant, plain text transaction testing without building a full campaign.
- Reviewing template code is easy. The `get_template_details` tool lets you pull the raw structure of any existing design for modification.

## How It Works

The bottom line is that your AI client treats email delivery and template management as code you write locally, eliminating dashboard clicks entirely.

1. First, subscribe to this MCP integration on Vinkius and provide your primary SparkPost API key.
2. Next, tell your AI client what you need—for example, 'list all templates' or 'check the bounce events'.
3. The MCP executes the request against SparkPost, returning real-time data about templates, metrics, or campaign status directly to your agent.

## Frequently Asked Questions

**How do I check my overall email deliverability with SparkPost MCP?**
You run `get_deliverability_metrics`. This tool retrieves your account-wide performance KPIs, showing you things like total accepted messages and the current rejection rate.

**Can I delete a template using SparkPost MCP?**
Yes, you use the `delete_template` tool. Be warned that this action is permanent and irreversible, so double-check before running it.

**What if an email was filtered out? How do I fix it with SparkPost MCP?**
First, run `list_suppression_list` to confirm the address is there. If it’s wrong, you use `delete_suppression_record` to unblock it.

**How do I test a simple email send using SparkPost MCP?**
Use the `send_email` tool. It allows you to pass plain text content and specific recipient addresses for an instant, low-stakes transmission test.

**Does SparkPost MCP help me manage multiple templates?**
Yes, you can use `list_templates` to see all available assets. If you need a new one, `create_template` handles the registration and validation of the markup.

**Can the AI rewrite an old HTML email template and import it straight into SparkPost?**
Yes! The bot reads your existing content using `get_template_details`, uses its intelligence to fully redesign the HTML block recursively (e.g. updating tables to modern styling natively), and finally invokes `create_template` to overwrite or deploy the modernized file safely to the cloud.

**How easy is it to send a test email from the IDE without a UI interface?**
It takes one sentence. You can type: 'Send via SparkPost a test email to admin@test.com titled Server OK'. The LLM gathers the keys, utilizes `send_email`, structures the JSON transmission array natively, and confirms back to you upon a 2xx HTTP delivery success.

**Can it search for specifically why emails are bouncing from a certain provider?**
Yes. While the `list_bounce_events` gets the core list, prompting the LLM to 'diagnose our latest bounces' lets the AI digest all textual rejection codes (e.g., SMTP 550 spam blocks vs 421 rate limits) and present a structured summary of where and why deliverability is faltering.