This project provides a Model Context Protocol (MCP) server for the Mailjet API, enabling compatible AI agents (e.g. Claude Desktop) to interact with Mailjet's contact, campaign, segmentation, statistics, workflow (and more) APIs through a standardized tool interface.
The project is available on NPM and can be executed through NPX.
In order to start the server locally, simply run the following command:
MAILJET_API_KEY="YOUR_api_key:YOUR_secret_key" npx mailjet-mcp-serverMost of the time, you can choose to take advantage your AI desktop app and link Mailjet MCP directly to it. In this case please add the following MCP config:
"mcpServers": {
"mailjet": {
"command": "npx",
"args": [
"-y",
"@mailjet/mailjet-mcp-server"
],
"env": {
"MAILJET_API_KEY": "YOUR_api_key:YOUR_secret_key"
}
}
}-
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 the MCP server:
node src/mailjet-mcp.jsAdd the following configuration:
{
"mcpServers": {
"mailjet": {
"command": "node",
"args": ["CHANGE/THIS/PATH/TO/mailjet-mcp-server/src/mailjet-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 desiredRun 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 package is published on the Mailjet NPM registry. The Mailjet team is responsible for publishing new package updates. Feel free to create an issue if you noticed any divergence between the Github version and the NPM package available.
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.