SparkPost MCP server for AI agents

Live

API KEY

EMAIL DELIVERY

Communication

SparkPost gives your agent transactional email delivery in your SparkPost account: send transmissions, manage templates, sending domains, and webhooks, read deliverability metrics and message events, and handle suppressions.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
SparkPost
agent · Acme Q3
Run
Why did emails to gmail.com bounce yesterday?
S
sparkpost_metrics_reasons_get
356ms
Email delivery agent
Most gmail.com bounces were invalid recipient addresses, followed by a smaller number of policy rejections.
Sources: SparkPost metrics, 1 domain
sparkpost
1 query
18:29
Message Claude...

Tools your email delivery agent reaches for on SparkPost, scoped per user.

CALL ANY TOOL
60 tools for email delivery in SparkPost: send transmissions, manage templates, domains, and webhooks, read metrics and message events, and manage suppressions and recipient lists.
sparkpost_account_get
Get account
Retrieve the SparkPost account's details, plan and options. Returns results with customer_id, company_name, status, subscription, usage limits and options.
Parameters
Name
Type
Required
Description
include
string
Optional
Extra account details to include. The only valid value is usage. Example: usage. One of: `usage`.
sparkpost_content_preview
Preview content
sparkpost_inbound_domain_create
Create inbound domain
sparkpost_inbound_domain_delete
Delete inbound domain
sparkpost_inbound_domains_list
List inbound domains
sparkpost_message_events_search
Search message events
sparkpost_metrics_breakdown_get
Get metrics breakdown
sparkpost_metrics_reasons_get
Get metrics reasons
sparkpost_metrics_time_series_get
Get metrics time series
sparkpost_recipient_list_create
Create recipient list
sparkpost_recipient_list_get
Get recipient list
sparkpost_recipient_lists_list
List recipient lists
sparkpost_relay_webhook_update
Update relay webhook
sparkpost_sending_domain_create
Create sending domain
sparkpost_sending_domain_delete
Delete sending domain
sparkpost_sending_domain_get
Get sending domain
sparkpost_sending_domain_update
Update sending domain
sparkpost_sending_domain_verify
Verify sending domain
sparkpost_sending_domains_list
List sending domains
sparkpost_suppression_get
Get suppression
sparkpost_suppression_upsert
Upsert suppression
sparkpost_template_delete
Delete template
sparkpost_template_get
Get template
sparkpost_templates_list
List templates
sparkpost_tracking_domain_create
Create tracking domain
sparkpost_tracking_domain_update
Update tracking domain
sparkpost_tracking_domain_verify
Verify tracking domain
sparkpost_transmission_send
Send transmission
sparkpost_transmissions_by_campaign_delete
Delete transmissions by campaign
sparkpost_usage_get
Get usage

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// SparkPost tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["sparkpost"], toolNames: [
    "sparkpost_templates_list",
    "sparkpost_transmission_send",
    "sparkpost_metrics_summary_get"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "List my templates, send one to a recipient, and report delivery metrics for the last 7 days" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["sparkpost"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "List my templates, send one to a recipient, and report delivery metrics for the last 7 days" }],
  tools,
});

// Execute the tool call with the user's vaulted SparkPost API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["sparkpost"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "List my templates, send one to a recipient, and report delivery metrics for the last 7 days" }],
  tools,
});

// Tool call runs with the user's vaulted SparkPost API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["sparkpost"] }, pageSize: 100,
});

const agent = new Agent({
  name: "email_delivery_agent",
  model: "gemini-2.5-pro",
  instruction: "SparkPost tools scoped to this user",
  tools,
});

await agent.run("List my templates, send one to a recipient, and report delivery metrics for the last 7 days");
Try these prompts
Copy any prompt into your agent. Each maps directly to a SparkPost tool. Click to copy, paste into your agent, done.
Sending
Copy the prompt
Copied
Send this email to the recipient list using my welcome template.
Copy the prompt
Copied
Preview my welcome template with this substitution data.
Copy the prompt
Copied
Check whether this email address is deliverable.
Deliverability
Copy the prompt
Copied
Show sent, delivered, and bounced counts for the last 7 days.
Copy the prompt
Copied
Search message events for bounces to this domain.
Copy the prompt
Copied
List the reasons for bounces this week.
Domains and suppressions
Copy the prompt
Copied
Is this address on the suppression list?
Copy the prompt
Copied
Add these 500 addresses to the suppression list.
Copy the prompt
Copied
Check the DNS records of this sending domain.
SEE HOW AUTH WORKS
Each user connects their own SparkPost API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
SparkPost
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
SparkPost
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
SparkPost
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
SparkPost
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other communication and marketing connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Test other agents
See the same per-user auth pattern across other communication and marketing connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared SparkPost API key looks fine in a demo. In production every transmission and domain change looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
SparkPost today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access SparkPost as the user or through a shared key?
As the user. Each user connects their own SparkPost API key once, and Scalekit sends it with every call. Every send, template change, and suppression edit in your audit trail is attributed to that user, not a shared service account.
Where is the SparkPost API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in SparkPost?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the metrics, events, and get tools without sparkpost_transmission_send, which sends email, or sparkpost_template_delete, sparkpost_sending_domain_delete, and sparkpost_transmissions_by_campaign_delete. Scalekit also enforces scope checks before every API call.
What happens when a user revokes SparkPost access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
What can the agent see about delivery problems?
sparkpost_message_events_search searches per-message events such as delivery, bounce, open, click, and spam complaint. sparkpost_metrics_reasons_get returns the reasons behind bounces, rejections, or delays, and sparkpost_suppression_get explains why one address is suppressed.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""sparkpost"": {
""url"": ""https://mcp.scalekit.com/sparkpost"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.sparkpost]
url = ""https://mcp.scalekit.com/sparkpost""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""sparkpost"": {
""url"": ""https://mcp.scalekit.com/sparkpost"",
""type"": ""http""
}
}
}