MJML MCP Server
Supports Facebook URL integration in email templates through customizable social media variables for linking to Facebook profiles and pages
Provides comprehensive file system operations for reading MJML templates from files and saving compiled HTML output to specified file paths
Supports Instagram URL integration in email templates through customizable social media variables for linking to Instagram profiles and accounts
Utilizes npm for dependency management and package installation, with npm scripts for running the server in development and production modes
Uses Zod for robust schema validation of input parameters and configuration options across all MJML compilation and template generation tools
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MJML MCP Servergenerate a welcome email template for new users"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MJML MCP Server
A comprehensive Model Context Protocol (MCP) server for MJML email template generation, compilation, and validation. This server provides powerful tools for creating professional email templates using the MJML markup language.
Features
MJML Compilation: Compile MJML to responsive HTML with advanced options
Template Generation: Pre-built templates for common email types
Validation: Validate MJML syntax and structure with configurable levels
Component Reference: Get documentation and examples for MJML components
File Support: Work with both MJML strings and files
Robust Error Handling: Comprehensive error reporting and logging
Related MCP server: SMTP MCP Server
Tools
1. compile_mjml
Compile MJML content to responsive HTML email.
Parameters:
input(required): MJML content or file pathfilePath(optional): Treat input as file path (default: false)beautify(optional): Beautify output HTML (default: true)minify(optional): Minify output HTML (default: false)validationLevel(optional): Validation level - "skip", "soft", "strict" (default: "soft")keepComments(optional): Keep comments in output (default: false)fonts(optional): Custom fonts configurationoutputPath(optional): Save compiled HTML to file path
2. validate_mjml
Validate MJML syntax and structure.
Parameters:
input(required): MJML content or file pathfilePath(optional): Treat input as file path (default: false)validationLevel(optional): Validation level - "skip", "soft", "strict" (default: "strict")
3. generate_template
Generate pre-built email templates.
Parameters:
template(required): Template type - "newsletter", "welcome", "promotional", "transactional", "password-reset", "verification", "announcement", "invitation"variables(optional): Template variables to replacecustomColors(optional): Custom color schemecustomFonts(optional): Custom fontsoutputPath(optional): Save template to file path
4. get_component_info
Get MJML component reference and documentation.
Parameters:
component(optional): Specific component namecategory(optional): Component category - "all", "standard", "advanced", "structural" (default: "all")
Installation
Clone or create the project directory
Install dependencies:
npm installUsage
Start the Server
npm startDevelopment Mode
npm run devRunning Tests
npm testTemplate Variables
When generating templates, you can use these variables:
company_name: Your company namecompany_logo: URL to company logouser_name: Recipient's namenewsletter_date: Date for newslettermain_title: Main title/headingmain_subtitle: Main subtitlefeatured_image: Featured image URLfeatured_title: Featured article titlefeatured_content: Featured article contentfeatured_link: Featured article linkupdate1_title,update1_content: First updateupdate2_title,update2_content: Second updatediscount_percentage: Discount percentage for promotionstime_remaining: Time remaining for promotionsproduct_name,product_image,product_description: Product detailsoriginal_price,sale_price: Pricing informationshop_url: Shopping URLdashboard_url: Dashboard URLsupport_email: Support email addressunsubscribe_url: Unsubscribe linkwebsite_url: Website URLfacebook_url,twitter_url,instagram_url: Social media URLscurrent_year: Current year (automatically filled)
Example Usage
Compile MJML from String
{
"name": "compile_mjml",
"arguments": {
"input": "<mjml><mj-body><mj-section><mj-column><mj-text>Hello World!</mj-text></mj-column></mj-section></mj-body></mjml>",
"beautify": true,
"validationLevel": "soft"
}
}Generate Welcome Template
{
"name": "generate_template",
"arguments": {
"template": "welcome",
"variables": {
"company_name": "Acme Corp",
"user_name": "John Doe",
"support_email": "support@acme.com"
},
"customColors": {
"primary": "#007bff",
"success": "#28a745"
},
"outputPath": "./welcome-email.mjml"
}
}Validate MJML File
{
"name": "validate_mjml",
"arguments": {
"input": "./templates/newsletter.mjml",
"filePath": true,
"validationLevel": "strict"
}
}Get Component Information
{
"name": "get_component_info",
"arguments": {
"component": "mj-button"
}
}Error Handling
The server provides comprehensive error handling with detailed error messages:
File access errors
MJML syntax errors
Validation failures
Configuration issues
Logging
The server includes structured logging with different levels:
INFO: General informationWARN: WarningsERROR: Error messagesDEBUG: Debug information (enable with DEBUG environment variable)
Enable debug logging:
DEBUG=1 npm startConfiguration
The server supports various MJML options:
Custom fonts configuration
Validation levels
Output formatting options
File input/output handling
Dependencies
@modelcontextprotocol/sdk: MCP SDK for server implementationmjml: MJML compiler and validatorzod: Schema validationfs-extra: Enhanced file system operations
License
MIT License
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Support
For issues and questions, please open an issue in the project repository.
Available Tools
4 toolscompile_mjmlC
Compile MJML to HTML with various options
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | MJML content or file path | |
| beautify | No | Beautify the output HTML | |
| minify | No | Minify the output HTML | |
| validationLevel | No | Validation level | soft |
| filePath | No | Treat input as file path | |
| keepComments | No | Keep comments in output | |
| fonts | No | Custom fonts configuration | |
| outputPath | No | Save compiled HTML to file path |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Compile') but doesn't describe what happens during compilation (e.g., error handling, performance implications, or output format). It mentions 'various options' but doesn't explain their behavioral impact beyond what the schema covers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. However, it could be more structured by explicitly listing key options or use cases, but it avoids redundancy and wastes no words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (8 parameters, nested objects) and lack of annotations or output schema, the description is insufficient. It doesn't explain the compilation process, error handling, or what the output looks like (e.g., HTML string or file). For a tool with rich parameters and no structured output info, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds no additional meaning beyond implying 'various options' exist, which doesn't enhance understanding of individual parameters. The baseline score of 3 is appropriate since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Compile') and resource ('MJML to HTML'), specifying the core transformation. It distinguishes from siblings like 'validate_mjml' (validation) and 'generate_template' (template creation) by focusing on compilation. However, it doesn't explicitly differentiate from 'get_component_info' in terms of resource scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'validate_mjml' for validation or 'generate_template' for template generation. It mentions 'various options' but doesn't specify contexts or prerequisites for choosing this tool over others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_templateC
Generate pre-built email templates
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | Template type | |
| variables | No | Template variables to replace | |
| customColors | No | Custom color scheme | |
| customFonts | No | Custom fonts | |
| outputPath | No | Save template to file path |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'generate' but doesn't clarify if this creates new files, requires specific permissions, has rate limits, or what the output looks like (e.g., HTML code, file saved). This is inadequate for a tool with multiple parameters and potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for the tool's complexity, making it easy for an agent to parse quickly without unnecessary details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like what happens when 'outputPath' is omitted or how 'customColors' and 'customFonts' are applied, leaving significant gaps for the agent to handle.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters well. The description adds no additional meaning beyond the schema, such as explaining how 'variables' map to template placeholders or what 'outputPath' defaults to. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'generate' and the resource 'pre-built email templates', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'compile_mjml' or 'validate_mjml', which might also involve template processing, so it misses the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'compile_mjml' or 'validate_mjml'. It lacks context about prerequisites, such as whether it's for creating new templates from scratch or modifying existing ones, leaving the agent to infer usage scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_component_infoC
Get MJML component reference and documentation
| Name | Required | Description | Default |
|---|---|---|---|
| component | No | Specific component name (optional) | |
| category | No | Component category | all |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe behavioral traits like whether it's read-only (implied by 'Get'), what happens if parameters are omitted, error conditions, or response format. For a tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence: 'Get MJML component reference and documentation'. It's front-loaded with the core purpose, has zero waste, and is appropriately sized for a simple tool. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what the tool returns (e.g., documentation text, examples, or structured data), how to interpret results, or any limitations. Without annotations or output schema, the description should provide more context about behavior and outputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description doesn't add any meaning beyond what the input schema provides. The schema has 100% description coverage, with clear documentation for both parameters ('component' and 'category'), including enum values for 'category'. With high schema coverage, the baseline is 3, as the schema does the heavy lifting and the description doesn't compensate with additional context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get MJML component reference and documentation' - a specific verb ('Get') and resource ('MJML component reference and documentation'). It distinguishes from siblings like 'compile_mjml', 'generate_template', and 'validate_mjml' which focus on different operations. However, it doesn't explicitly differentiate itself from potential similar documentation tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use it (e.g., for learning about MJML components) versus when to use sibling tools like 'compile_mjml' for processing MJML code. There's no context about prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_mjmlB
Validate MJML syntax and structure
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | MJML content or file path | |
| filePath | No | Treat input as file path | |
| validationLevel | No | Validation level | strict |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool validates MJML but doesn't describe what happens during validation (e.g., returns errors/warnings, checks against a schema), whether it's read-only or has side effects, or any performance or permission considerations. For a validation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just four words ('Validate MJML syntax and structure'), with zero wasted language. It's front-loaded with the core purpose and appropriately sized for a simple validation tool, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (validation with three parameters) and no output schema, the description is minimally adequate but incomplete. It states what the tool does but lacks details on behavior, usage context, or return values. With no annotations and no output schema, the agent must rely heavily on the schema and tool name, leaving gaps in understanding the full context of validation results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter semantics beyond what the input schema provides. Since schema description coverage is 100%, the baseline score is 3. The schema fully documents all three parameters (input, filePath, validationLevel) with descriptions and defaults, so the description doesn't need to compensate, but it also doesn't add any extra context about parameter usage or interactions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'Validate MJML syntax and structure', which is a specific verb ('validate') applied to a specific resource ('MJML syntax and structure'). It distinguishes from sibling tools like 'compile_mjml' (which transforms MJML) and 'generate_template' (which creates templates), though it doesn't explicitly mention these distinctions in the description text itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when validation is needed (e.g., before compilation), what scenarios it's best for, or how it differs from sibling tools like 'compile_mjml' (which might include validation implicitly). The agent must infer usage from the tool name and context alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
- First observed
compile_mjml - First observed
generate_template - First observed
get_component_info - First observed
validate_mjml
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: compiling MJML to HTML, generating email templates, retrieving component documentation, and validating MJML syntax. There is no overlap in functionality, making it easy for an agent to select the correct tool for each task without confusion.
All tool names follow a consistent verb_noun pattern (e.g., compile_mjml, generate_template, get_component_info, validate_mjml). The naming is uniform and predictable, using snake_case throughout with clear action-object pairs.
With 4 tools, this server is well-scoped for its MJML-focused purpose. Each tool earns its place by covering essential aspects: compilation, template generation, documentation access, and validation, without being overly sparse or bloated.
The tool surface provides complete coverage for the MJML domain, including core operations like compilation and validation, as well as supporting features like template generation and documentation. There are no obvious gaps that would hinder an agent's workflow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Analyze, audit, fix and diff HTML, MJML, Maizzle and React Email across 21 email clients.
Send, track, and manage transactional and bulk email delivery
Send, track, and manage transactional emails at scale
Transactional email for AI agents: templates, domain verify, and sends.
Related MCP Servers
- AlicenseAqualityAmaintenanceProvides IMAP and SMTP capabilities, enabling developers to manage email services with seamless integration and automated workflows.18322BSD 3-Clause
- AlicenseAqualityAmaintenanceEnables sending emails via SMTP with template management, supporting multiple SMTP configurations, template creation with variable substitution, and bulk email sending with rate limiting.612219MIT
- AlicenseNot gradedqualityDmaintenanceEnables sending and receiving emails through SMTP, IMAP, and POP3 protocols with support for attachments, HTML content, and email validation.MIT

Sequenzy MCP Serverofficial
AlicenseAqualityCmaintenanceEnables management of AI-powered email marketing automation, including subscriber segments, campaigns, and templates. It allows users to generate email sequences with AI and track detailed analytics through natural language commands.1001,3102MIT
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/shaunie2fly/mjml_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server