- Home
- MCP servers
- Magento Coding Standards
Magento Coding Standards
- typescript
5
GitHub Stars
typescript
Language
1 month ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"midhun-edv-magento-coding-standard-mcp": {
"command": "node",
"args": [
"/path/to/magento-coding-standard-mcp/dist/index.js"
]
}
}
}This MCP server provides Magento 2 coding standards knowledge to AI assistants, enabling them to generate Magento-compliant code and patterns automatically. It teaches the AI to apply rules for security, legacy migrations, templates, frontend patterns, and theme-specific conventions so you write correct code from the start.
How to use
You connect this MCP server to your AI tool, then request Magento-specific patterns and validation as you work on code. The AI automatically uses the available tools to fetch the correct pattern, validate code, check security, and explain rules, all while applying active theme standards you configure.
When you ask the AI for a task such as reading a file, you will receive the appropriate Magento pattern, including any theme overrides. Before generating code, the AI calls get_magento_pattern to obtain the correct approach. After code is generated, the AI calls validate_code to surface any violations and suggested fixes. If you enable a theme, the theme-specific rules layer on top of the base Magento rules.
How to install
Prerequisites: Node.js v18+ and npm v8+. Ensure your environment can run JavaScript, TypeScript, and MCP client integrations.
# 1. Install dependencies
npm install
# 2. Build the MCP server
npm run build
# 3. Run the MCP server (development/startup)
npm run start
Additional notes
Build and run flow described in the Quick Start results in a local MCP server executable that you point your MCP client at via the runtime path. The final startup command is the stdio configuration you use to launch the server locally.
Available tools
get_magento_pattern
Fetch the Magento 2 pattern that matches your task, including theme-aware overrides and full usage examples.
validate_code
Validate code against Magento coding standards, returning violations with severity, line numbers, and fix suggestions.
check_security
Run security-focused validation to surface XSS, SQL injection risks, insecure functions, and other vulnerabilities.
explain_rule
Provide detailed explanations of a specific rule, with bad/good examples and related guidance, including theme-specific rules.
list_rules
List all rules with optional filtering by category, severity, or search terms, including theme-aware rules when a theme is active.
get_rules_summary
Return a high-level summary of all rules grouped by category with error and warning counts.
manage_theme
Manage theme-specific standards, including listing, setting, clearing, and viewing theme details.