This project provides multiple Model Context Protocol (MCP) servers for the Mailjet API, enabling compatible AI agents (e.g. Claude Desktop) to interact with specific Mailjet API contexts through focused, specialized tool interfaces.
The project includes 11 specialized MCP servers, each focused on a specific aspect of email marketing:
- Campaigns MCP -
src/campaigns-mcp.js- Manage email campaigns, drafts, and campaign statistics - Templates MCP -
src/templates-mcp.js- Manage email templates and newsletter templates - Contacts MCP -
src/contacts-mcp.js- Manage contacts, contact lists, and contact data - Senders MCP -
src/senders-mcp.js- Manage senders and sender statistics - Statistics MCP -
src/statistics-mcp.js- Comprehensive analytics and performance metrics - Messages MCP -
src/messages-mcp.js- Individual email message management and tracking - Settings MCP -
src/settings-mcp.js- API key and user account management - Domains MCP -
src/domains-mcp.js- Domain management and validation for email sending - Webhooks MCP -
src/webhooks-mcp.js- Event notification and webhook configuration - Segmentation MCP -
src/segmentation-mcp.js- Contact segmentation and filtering for targeted campaigns - Send Email MCP -
src/send-email-mcp.js- Transactional email sending through Mailjet's Send API
-
Clone the repository:
git clone https://github.com/mailgun/mailjet-mcp-server.git cd mailjet-mcp-server -
Install dependencies and build:
pnpm install
-
Configure Claude Desktop:
Create or modify the config file:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
- MacOS:
Then start any of the MCP servers:
# Core Email Marketing MCPs
node src/campaigns-mcp.js # Campaign management
node src/templates-mcp.js # Template management
node src/contacts-mcp.js # Contact management
node src/senders-mcp.js # Sender management
# Analytics & Monitoring MCPs
node src/statistics-mcp.js # Performance analytics
node src/messages-mcp.js # Message tracking
# Configuration & Integration MCPs
node src/settings-mcp.js # Account settings
node src/domains-mcp.js # Domain management
node src/webhooks-mcp.js # Event notifications
node src/segmentation-mcp.js # Contact segmentation
node src/send-email-mcp.js # Transactional sendingAdd the following configuration to use all MCP servers:
{
"mcpServers": {
"mailjet-campaigns": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/campaigns-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-templates": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/templates-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-contacts": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/contacts-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-senders": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/senders-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-statistics": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/statistics-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-messages": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/messages-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-settings": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/settings-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-domains": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/domains-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-webhooks": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/webhooks-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-segmentation": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/segmentation-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
},
"mailjet-send-email": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/send-email-mcp.js"],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
}
}
}The following environment variables are currently supported by the server:
MAILJET_API_KEY="your_api_key:your_secret_key" # REQUIRED, used for authenticating your account
MAILJET_API_REGION="eu" # OPTIONAL, used to change to the EU servers, if desiredPurpose: Manage email campaigns, campaign drafts, and campaign statistics
Tools Available: 11 tools
get_v3_campaign- List campaignsget_v3_campaign_id- Get specific campaignget_v3_campaigndraft- List campaign draftspost_v3_campaigndraft- Create campaign draftput_v3_campaigndraft- Update campaign draftget_v3_campaignstatistics- Get campaign statisticsget_v3_campaignoverview- Get campaign overviewget_v3_campaigngraphstatistics- Get campaign graph statisticsget_v3_campaignaggregate- Get campaign aggregates
Purpose: Manage email templates and newsletter templates
Tools Available: 6 tools
get_v3_template- List templatespost_v3_template- Create templateput_v3_template- Update templateget_v3_template_id- Get specific templatedelete_v3_template- Delete templateget_v3_newslettertemplate- List newsletter templatesget_v3_newslettertemplatecategory- List newsletter template categories
Purpose: Manage contacts, contact lists, and contact data
Tools Available: 8 tools
get_v3_contact- List contactspost_v3_contact- Create contactput_v3_contact- Update contactget_v3_contact_id- Get specific contactget_v3_contactslist- List contact listspost_v3_contactslist- Create contact listput_v3_contactslist- Update contact listget_v3_contactdata- Get contact dataget_v3_contactmetadata- Get contact metadata
Purpose: Manage senders and sender statistics
Tools Available: 5 tools
get_v3_sender- List senderspost_v3_sender- Create senderput_v3_sender- Update senderget_v3_sender_id- Get specific senderdelete_v3_sender- Delete senderget_v3_senderstatistics- Get sender statisticsget_v3_metasender- List meta senders
Purpose: Comprehensive analytics and performance metrics
Tools Available: 21 tools
get_v3_activitycounters- Time-series metrics for activities and eventsget_v3_aggregategraphstatistics- Combined metrics for multiple campaignsget_v3_bouncestatistics- Email delivery failure statisticsget_v3_clickstatistics- Data on recipient link clicksget_v3_contactstatistics- Email engagement metrics by individual contactget_v3_domainstatistics- Performance metrics aggregated by email domainget_v3_geostatistics- Email engagement metrics by geographic locationget_v3_graphstatistics- Time-series statistics for visual representationget_v3_listrecipientstatistics- Engagement metrics for list subscribersget_v3_liststatistics- Performance metrics for contact listsget_v3_messageinformation- Message details associated with campaignsget_v3_messagesentstatistics- Performance metrics for individual sent emailsget_v3_senderstatistics- Performance metrics by sender address
Purpose: Individual email message management and tracking
Tools Available: 6 tools
get_v3_message- List individual email messagesget_v3_message_id- Get specific message detailsget_v3_messagehistory- Timeline of email delivery eventsget_v3_messageinformation- Message details associated with campaignsget_v3_messagesentstatistics- Performance metrics for individual sent emailsget_v3_messagestate- Status codes for email processing stages
Purpose: API key and user account management
Tools Available: 12 tools
get_v3_apikey- Manage credentials for API and SMTP accessget_v3_apikeyaccess- API key access permissions for usersget_v3_apikeyaccessgrantor- API key access management between users and subaccountsget_v3_apikeytotals- Lifetime statistics for API key usageget_v3_apitoken- Access token for API, used with IFrame APIget_v3_apppreferences- Key-value settings storage for API configurations
Purpose: Domain management and validation for email sending
Tools Available: 2 tools
get_v3_dns- Domain configuration for email sendingget_v3_dns_id- Get specific DNS configuration by ID
Purpose: Event notification and webhook configuration
Tools Available: 2 tools
get_v3_eventcallbackurl- Webhook configuration for event notificationsget_v3_eventcallbackurl_id- Get specific webhook configuration by ID
Purpose: Contact segmentation and filtering for targeted campaigns
Tools Available: 2 tools
get_v3_contactfilter- Segmentation rules for targeting specific contactsget_v3_contactfilter_id- Get specific contact filter by ID
Purpose: Transactional email sending through Mailjet's Send API
Tools Available: Variable (depends on Send API endpoints)
- Transactional email sending functionality
- Individual email message delivery
- Send API v3 and v3.1 support
Run the local test suite with:
NODE_ENV=test pnpm testWhich of my contacts lists has the most subscribers?
Would you be able to make a chart with email delivery statistics for the past week?
The MCP server communicates over stdio, please refer to Debugging section of the Model Context Protocol.
This project is licensed under the Apache License 2.0. See LICENSE for details.
We welcome contributions! Please feel free to submit a Pull Request.