← Back to Magento 2 Coding Standards
Install Magento 2 Coding Standards
Pick your client, copy the command, done.
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1
Prepare the server locally
Run this once before adding it to Claude Code.
git clone https://github.com/Midhun-edv/magento-coding-standard-mcp.git
cd magento-coding-standard-mcp
npm install
npm run build2
Register it in Claude Code
claude mcp add magento-coding-standards -- node /path/to/magento-coding-standard-mcp/dist/index.jsReplace any placeholder paths in the command with the real path on your machine.
Available Tools (2)
Once configured, Magento 2 Coding Standards gives your AI agent access to:
get_magento_patternRetrieves the correct Magento 2 way to accomplish a task including patterns, code examples, and discouraged practices.taskvalidate_codeValidates code against Magento 2 coding standards and provides fix suggestions.codeTry It Out
After setup, try these prompts with your AI agent:
→What is the correct Magento 2 pattern to read a file safely?
→Validate this PHP code snippet against Magento 2 coding standards.
→How should I implement a jQuery widget when using the Hyva theme?
→Show me the modern replacement for this deprecated Magento class.
→What are the security requirements for writing a custom controller in Magento 2?
Prerequisites & system requirements
- An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
- Node.js 18+ with npm/npx installed
Keep this setup from going cold
Save the docs, env vars, and workflow around Magento 2 Coding Standards in Conare so Claude Code, Codex, and Cursor remember it next time.