sparkpost-mcp
sparkpost-mcp
MCP server exposing the SparkPost (EU) email API as 20 tools — account, templates, transactional sends, suppression, sending domains, webhooks, subaccounts, message events, deliverability metrics, and recipient lists.
Published on npm as @pcummings/sparkpost-mcp.
Install into an AI agent
You need a SPARKPOST_API_KEY (SparkPost EU dashboard → API Keys). For the US region, also set SPARKPOST_API_BASE=https://api.sparkpost.com/api/v1.
The commands below fetch the server from npm via
npx -y @pcummings/sparkpost-mcp. To run from a local clone instead, replacenpx -y @pcummings/sparkpost-mcpwithnpx tsx /absolute/path/to/index.ts.
Claude Code
claude mcp add sparkpost -e SPARKPOST_API_KEY=your-key -- npx -y @pcummings/sparkpost-mcpAdd --scope user to make it available in every project.
OpenAI Codex
codex mcp add sparkpost --env SPARKPOST_API_KEY=your-key -- npx -y @pcummings/sparkpost-mcpGemini CLI
gemini mcp add -e SPARKPOST_API_KEY=your-key sparkpost npx -y @pcummings/sparkpost-mcpUS region — append the base-URL env to any command above (-e for Claude/Gemini, --env for Codex):
SPARKPOST_API_BASE=https://api.sparkpost.com/api/v1Any other MCP client (Claude Desktop, Cursor, Windsurf, VS Code, Cline, Zed …) — add this to the client's MCP config:
{
"mcpServers": {
"sparkpost": {
"command": "npx",
"args": ["-y", "@pcummings/sparkpost-mcp"],
"env": { "SPARKPOST_API_KEY": "your-key" }
}
}
}For a local clone, use "args": ["tsx", "/absolute/path/to/index.ts"].
Run from source
npm install
export SPARKPOST_API_KEY=your-key # required; server exits if missing
export SPARKPOST_API_BASE=... # optional; defaults to EU. US: https://api.sparkpost.com/api/v1
npm startTools
Tool | Description |
| Get SparkPost EU account info and usage |
| List all email templates |
| Get a specific template by ID |
| Create a new email template |
| Update an existing template |
| Send a test/transactional email |
| Check if an address is suppressed |
| List all verified sending domains |
| List all webhooks |
| Create a webhook (name, target URL, events) |
| Delete a single webhook by id |
| List all subaccounts |
| Create a subaccount with an API key (name, key_label, key_grants) |
| Search message events (one page; cursor + per_page for paging) |
| Get deliverability metrics (from + metrics required; group_by selects a breakdown dimension) |
| List all recipient lists |
| Get a recipient list by id (optionally with recipients) |
| Create a recipient list (recipients required; id/name auto-generated if omitted) |
| Add or update a suppression entry for one email |
| Remove the suppression entry for one email |
Usage examples
Send an email:
Send a transactional email to alice@example.com from noreply@yourdomain.com with subject "Hello" and body "Hi Alice"
Create a template:
Create an email template with id "welcome", name "Welcome Email", subject "Welcome to {{company}}!", html "Hi {{name}}", from noreply@yourdomain.com
Search recent bounces:
Search message events for bounce events in the last 24 hours for recipient domain example.com
Dev
npm run typecheck # tsc --noEmit
npm test # node:test suite (44 tests)Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pcummings/sparkpost_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server