Skip to main content
Glama
Midhun-edv

Magento 2 Coding Standards MCP Server

by Midhun-edv

Magento 2 Coding Standards MCP Server

An MCP (Model Context Protocol) server that provides comprehensive Magento 2 coding standards knowledge, enabling AI assistants to write Magento-compliant code naturally — vibe coding for Magento.

Works with Claude Code, Claude Desktop, Cursor IDE, VS Code Copilot, Gemini CLI, Continue.dev, Windsurf, Augment Code, and any MCP-compatible client.


Why This Exists

Writing Magento 2 code correctly is hard. There are 83+ coding standard rules, 150+ discouraged functions, 50+ restricted classes, theme-specific conventions, and security requirements that developers must follow. AI assistants don't know these rules — they generate code that looks correct but violates Magento standards.

This MCP server teaches AI assistants Magento's rules so they write compliant code from the start:

  • Ask for a "jQuery widget" with Hyva theme active → get Alpine.js component instead

  • Paste PHP code → get instant validation with line numbers and fix suggestions

  • Ask "how to read a file" → get DriverInterface pattern, not file_get_contents()


Related MCP server: CodeGuard MCP Server

Features

  • 83+ Coding Standard Rules — Security, Legacy, PHP, Functions, Templates, LESS/CSS, GraphQL, HTML, Framework, Exceptions, and more

  • 150+ Discouraged Functions — Every PHP function Magento wants you to avoid, with the correct replacement

  • 50+ Restricted Classes — Zend Framework → Laminas migrations, deprecated class replacements

  • 25+ jQuery Deprecations — Deprecated jQuery methods with modern replacements

  • 19 LESS/CSS Rules — Frontend styling standards

  • 7 MCP Tools — Pattern lookup, code validation, security checking, rule explanations, theme management

  • 4 Built-in Theme Presets — Hyva, Luma, Breeze, Porto with full validation rules and pattern overrides

  • Custom Theme Support — Add your own theme standards via JSON files

  • Multi-Platform — Works with every major AI coding tool


Quick Start

1. Clone and Build

git clone https://github.com/Midhun-edv/magento-coding-standard-mcp.git
cd magento-coding-standard-mcp
npm install
npm run build

2. Connect to Your AI Tool

Pick your platform below and add the MCP server:

Claude Code (CLI)

claude mcp add magento-coding-standard -- node /path/to/magento-coding-standard-mcp/dist/index.js

Claude Desktop

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "magento-coding-standard": {
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  }
}

Cursor IDE

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "magento-coding-standard": {
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  }
}

VS Code Copilot

Add to .vscode/mcp.json in your project root:

{
  "servers": {
    "magento-coding-standard": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  }
}

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "magento-coding-standard": {
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  }
}

Continue.dev

Add to ~/.continue/config.json:

{
  "mcpServers": [
    {
      "name": "magento-coding-standard",
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  ]
}

Windsurf

Add to Windsurf MCP settings:

{
  "mcpServers": {
    "magento-coding-standard": {
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  }
}

Augment Code

Add in Augment Code settings:

{
  "mcpServers": {
    "magento-coding-standard": {
      "command": "node",
      "args": ["/path/to/magento-coding-standard-mcp/dist/index.js"]
    }
  }
}

Note: Replace /path/to/ with your actual installation path. On Windows, use forward slashes: C:/Users/name/magento-coding-standard-mcp/dist/index.js


Available Tools

1. get_magento_pattern

Get the correct Magento 2 way to accomplish a task. Returns the proper pattern, code example, what to avoid, and why.

Task: "read a file"
→ Returns: DriverInterface::fileGetContents() with full example, avoidPatterns, explanation

Supported tasks: File operations, Escaping (HTML/URL/JS/CSS), JSON/Serialization, Validation, Templates/ViewModels, HTTP requests, JavaScript (RequireJS, UI Components, Widgets), Translation, Logging, Database queries

When a theme is active, patterns are automatically overridden with theme-specific versions (e.g., "jQuery widget" → Alpine.js component when Hyva is active).

2. validate_code

Validate code against Magento coding standards. Returns violations with severity, line numbers, rule names, and fix suggestions.

Input: { code: "<?php echo $name; ?>", fileType: "phtml" }
→ Returns: XSS violation at line 1, suggestion to use $escaper->escapeHtml()

Supported file types: php, phtml, js, less, css

When a theme is active, theme-specific validation rules are applied on top of base Magento rules.

3. check_security

Security-focused validation checking for:

  • XSS vulnerabilities (unescaped output)

  • SQL injection risks (raw queries)

  • Insecure functions (exec, eval, shell_exec, etc.)

  • Superglobal usage ($_GET, $_POST direct access)

  • Object injection (serialize/unserialize)

4. explain_rule

Get detailed explanation of any rule with reasoning, bad/good examples, related rules, and documentation links.

Input: { ruleName: "XssTemplate" }
→ Returns: Full explanation with bad code, good code, and related rules

Also supports theme-specific rules (e.g., Hyva.JS.NoJQuery).

5. list_rules

List all rules with optional filtering:

  • category: Security, Legacy, PHP, Functions, Templates, Less, GraphQL, etc.

  • minSeverity: 1-10 (10 = most critical)

  • searchTerm: Search in rule names and descriptions

When a theme is active, theme rules are included in the listing.

6. get_rules_summary

Get a summary of all rules grouped by category with counts of errors and warnings.

7. manage_theme

Manage theme-specific coding standards that layer on top of base Magento rules.

Action

Description

Example

list

Show all available themes

{ action: "list" }

set

Activate a theme

{ action: "set", themeId: "hyva" }

clear

Deactivate theme

{ action: "clear" }

info

Show theme details

{ action: "info", themeId: "hyva" }


Theme-Specific Standards

Different Magento themes use completely different frontend stacks. Code that's correct for Luma is wrong for Hyva and vice versa. This MCP supports 4 built-in theme presets and custom themes.

Built-in Presets

Theme

Stack

Rules

Description

hyva

Alpine.js + TailwindCSS

8 rules

No jQuery, No KnockoutJS, No RequireJS, No LESS

luma

jQuery + RequireJS + KnockoutJS + LESS

4 rules

Default Magento 2 frontend stack

breeze

Vanilla JS + Breeze API + LESS

4 rules

Lightweight, no RequireJS

porto

Luma-based + Porto widgets

4 rules

Always use child theme

How Themes Work

  1. Activate a theme: The AI calls manage_theme({ action: "set", themeId: "hyva" })

  2. Validation is enhanced: validate_code now flags jQuery, RequireJS, KnockoutJS usage as errors

  3. Patterns are overridden: get_magento_pattern({ task: "jquery widget" }) returns Alpine.js component instead

  4. Rules are extended: list_rules includes Hyva-specific rules like Hyva.JS.NoJQuery

Theme Details

Hyva Theme

  • USE: Alpine.js (x-data, x-show, x-on), TailwindCSS, vanilla JS, ViewModelRegistry, $escaper

  • AVOID: jQuery $(), KnockoutJS data-bind, RequireJS define()/require(), LESS, data-mage-init

  • 5 pattern overrides with full code examples for requirejs modules, jquery widgets, template structure, escaping, UI components

Luma/Blank Theme

  • USE: RequireJS AMD, jQuery, KnockoutJS, LESS with Magento UI Library, $.widget(), data-mage-init

  • AVOID: Global variables, inline scripts, ES modules, Alpine.js

  • 5 pattern overrides for requirejs modules, jquery widgets, UI components, template structure, LESS/CSS

Breeze Theme

  • USE: Vanilla JS, Breeze component API ($.widget, $.view), lightweight LESS, fetch() API

  • AVOID: RequireJS, heavy jQuery, KnockoutJS, uiComponent

  • 3 pattern overrides for requirejs modules, jquery widgets, template structure

Porto Theme

  • USE: Luma conventions + Porto widgets, Porto LESS variables, child theme pattern

  • AVOID: Modifying core Porto files, hardcoded colors/fonts

  • 3 pattern overrides for template structure, LESS/CSS, requirejs modules

Custom Themes

Create your own theme standards by placing JSON files in ~/.magento-mcp/themes/:

{
  "id": "my-theme",
  "name": "My Custom Theme",
  "version": "1.0.0",
  "description": "Custom standards for my project",
  "technologies": {
    "use": ["React", "TailwindCSS"],
    "avoid": ["jQuery"]
  },
  "validationRules": [
    {
      "pattern": "\\$\\(",
      "fileTypes": ["js", "phtml"],
      "severity": 8,
      "type": "warning",
      "message": "jQuery detected. My Theme uses React.",
      "rule": "MyTheme.JS.NoJQuery",
      "suggestion": "Use React components instead",
      "mode": "discourage"
    }
  ],
  "patternOverrides": [],
  "bestPractices": ["Use React for interactive UI"]
}

Override the directory with the MAGENTO_MCP_THEME_DIR environment variable.

See src/themes/custom/README.md for full JSON schema documentation.


Knowledge Base Coverage

Category

Count

Examples

Security

8 rules

InsecureFunction, XSS, Superglobal, LanguageConstruct

Legacy

13 rules

Zend to Laminas, Mage::, deprecated configs, ObsoleteConnection

PHP

7 rules

FinalImplementation, Goto, ShortEchoSyntax, ReturnValueCheck

Functions

3 rules

DiscouragedFunction, StaticFunction, DeprecatedWithoutArgument

Templates

2 rules

ThisInTemplate, ObjectManager in templates

Less/CSS

19 rules

AvoidId, Indentation, Colors, ZeroUnits, ImportantProperty

GraphQL

5 rules

ValidTypeName, ValidFieldName, ValidEnumValue

Html

4 rules

SelfClosing, VoidTags, Binding, Directive

Framework

4 rules

Copyright, License headers

Exceptions

3 rules

DirectThrow, ThrowCatch, TryProcessSystemResources

+ more

15+ rules

Annotation, Commenting, Performance, SQL, Translation

Discouraged Functions

150+

file_get_contents, curl_*, mysql_*, die, sleep, compact...

Restricted Classes

50+

Zend_Json, Zend_Db, Zend_Log, Varien_*, Mage_* ...

jQuery Deprecations

25+

$.bind, $.live, $.size, $.isFunction, $.browser...

Severity Levels

Level

Type

Description

10

Error

Critical — security vulnerabilities, forbidden patterns

9

Warning

Security — possible security issues

8

Warning

Magento-specific — design violations

7

Warning

General — code quality issues

6

Warning

Style — formatting issues

5

Warning

Documentation — PHPDoc issues


Project Structure

magento-coding-standard-mcp/
  src/
    index.ts                          # MCP server entry point (7 tools)
    cli.ts                            # CLI entry point (--help, --version)
    knowledge/                        # Coding standards knowledge base
      index.ts                        # Central exports + utility functions
      insecure-functions.ts           # Forbidden functions (exec, eval, etc.)
      discouraged-functions.ts        # 150+ discouraged functions
      restricted-classes.ts           # 50+ restricted classes
      xss-escape-methods.ts           # XSS escape methods
      template-patterns.ts            # Template/ViewModel patterns
      jquery-deprecations.ts          # 25+ jQuery deprecations
      severity-rules.ts              # 83+ rules with severity levels
    themes/                           # Theme-specific standards
      types.ts                        # ThemeStandard interfaces
      index.ts                        # Public API
      theme-manager.ts                # Active theme state management
      presets/
        hyva.ts                       # Hyva: Alpine.js + TailwindCSS
        luma.ts                       # Luma: jQuery + RequireJS + LESS
        breeze.ts                     # Breeze: Vanilla JS
        porto.ts                      # Porto: Luma-based + Porto widgets
        index.ts                      # THEME_PRESETS registry
      custom/
        loader.ts                     # Loads user JSON themes
        README.md                     # JSON schema documentation
    tools/                            # MCP tool implementations
      index.ts                        # Tool exports
      get-magento-pattern.ts          # Pattern lookup (theme-aware)
      validate-code.ts                # Code validation (theme-aware)
      check-security.ts               # Security validation
      explain-rule.ts                 # Rule explanations (theme-aware)
      list-rules.ts                   # Rule listing (theme-aware)
      manage-theme.ts                 # Theme management tool
  examples/
    ai-platform-configs.md            # Full config examples for 7 platforms
  dist/                               # Compiled output (generated)
  package.json
  tsconfig.json

Development

# Install dependencies
npm install

# Build for production
npm run build

# Run in development mode (with hot reload)
npm run dev

# Start the server
npm start

# CLI help
node dist/cli.js --help

# CLI version
node dist/cli.js --version

Requirements

  • Node.js >= 18.0.0

  • npm >= 8.0.0

Tech Stack

  • TypeScript with ESM modules

  • @modelcontextprotocol/sdk for MCP protocol

  • zod for input validation

  • Zero runtime dependencies beyond MCP SDK and Zod


How It Works

  1. You connect this MCP server to your AI tool (Claude, Cursor, Gemini, etc.)

  2. The AI automatically uses the tools when writing Magento code

  3. Before generating code, it calls get_magento_pattern to get the correct approach

  4. After generating code, it calls validate_code to check for violations

  5. Theme standards layer on top — set your theme once and all suggestions adapt

The AI doesn't need special prompting. The MCP tools are described clearly enough that AI assistants naturally call them when working on Magento projects.


Contributing

Contributions are welcome! Areas that could use help:

  • Additional theme presets (e.g., Magezon, Amasty, custom frameworks)

  • More validation rules for edge cases

  • Integration tests

  • Performance optimizations for large codebases

  • Documentation improvements

Adding a New Theme Preset

  1. Create src/themes/presets/my-theme.ts following the ThemeStandard interface

  2. Export it from src/themes/presets/index.ts

  3. Add to THEME_PRESETS record

  4. Run npm run build — zero errors required


License

MIT - see LICENSE for details.

Available Tools

7 tools
check_securityC

Perform security-focused validation on code. Checks for XSS vulnerabilities, SQL injection risks, insecure functions, and other security issues.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to check for security issues

TDQS

C2.9/5.0
Behavior2/5

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. While it states what the tool does (validation), it doesn't describe key behavioral traits such as whether this is a read-only analysis, what permissions might be required, how results are returned, or any rate limits. For a security analysis tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, consisting of two efficient sentences that directly state the tool's purpose and scope. There's no wasted text, though it could be slightly more structured (e.g., by bullet-pointing the security checks).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of security validation and the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a report, vulnerabilities list), how errors are handled, or any behavioral context. For a tool with no structured output and zero annotations, more detail is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 the single parameter ('code') with its description. The description adds no additional meaning beyond what the schema provides, such as format requirements or examples. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('perform security-focused validation') and resource ('code'), and lists the types of security issues checked (XSS vulnerabilities, SQL injection risks, insecure functions). However, it doesn't explicitly distinguish this tool from sibling tools like 'validate_code' or 'explain_rule', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. There's no mention of prerequisites, when this tool is appropriate compared to sibling tools like 'validate_code' or 'list_rules', or any exclusions for its use. The agent must infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

explain_ruleA

Get detailed explanation of a Magento coding standard rule including reasoning, bad/good examples, and fix suggestions.

ParametersJSON Schema
NameRequiredDescriptionDefault
ruleNameYesThe rule name to explain (e.g., "Magento2.Security.XssTemplate", "XssTemplate", "DiscouragedFunction")

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the behavioral output (detailed explanation with examples and suggestions), which is helpful, but does not cover other traits like error handling, performance, or authentication needs. The description is accurate but lacks comprehensive behavioral context beyond the core function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the purpose and key details without unnecessary words. Every part ('detailed explanation', 'reasoning, bad/good examples, and fix suggestions') adds value, making it appropriately sized and structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is mostly complete. It clearly states what the tool does and the content of the explanation, but could improve by mentioning output format or error cases. However, it provides sufficient context for an agent to use the tool effectively in most scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'ruleName' well-documented in the schema. The description does not add any parameter-specific details beyond what the schema provides, such as format constraints or examples not already covered. Baseline 3 is appropriate as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get detailed explanation') and resource ('a Magento coding standard rule'), with explicit content details ('reasoning, bad/good examples, and fix suggestions'). It distinguishes from siblings like 'list_rules' (which likely lists names) and 'get_rules_summary' (which might provide brief overviews).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a detailed explanation of a rule is needed, but does not explicitly state when to use this tool versus alternatives like 'get_rules_summary' or 'list_rules'. No exclusions or prerequisites are mentioned, leaving usage context partially inferred rather than clearly defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_magento_patternA

Get the correct Magento 2 way to accomplish a task. Returns the proper pattern, code example, and what to avoid. Use this for "vibe coding" - writing Magento-compliant code naturally.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYesThe task you want to accomplish (e.g., "read a file", "escape HTML", "validate email", "create viewmodel")

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the tool returns patterns, code examples, and what to avoid, which gives some behavioral insight. However, it lacks details on permissions, rate limits, error handling, or response format, which are important for a tool with no annotations and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with two sentences that efficiently convey purpose and usage. Every sentence adds value: the first states what the tool does, and the second provides context for when to use it, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no annotations, no output schema), the description is adequate but has gaps. It covers purpose and usage well, but lacks behavioral details like response format or error handling, which are needed for completeness without annotations or output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'task' well-documented in the schema. The description adds minimal value beyond the schema by implying the task is development-related (e.g., 'escape HTML'), but doesn't provide additional syntax, examples, or constraints. 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to get the correct Magento 2 way to accomplish a task, including patterns, code examples, and anti-patterns. It specifies the resource (Magento 2 patterns) and verb (get), but doesn't explicitly differentiate from sibling tools like 'explain_rule' or 'validate_code' which might overlap in domain.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: for 'vibe coding' - writing Magento-compliant code naturally. This implies it's for development tasks requiring best practices. However, it doesn't explicitly state when not to use it or name alternatives among siblings, such as when to choose 'validate_code' instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_rules_summaryB

Get a summary of all Magento coding standard rules grouped by category, showing counts of errors and warnings.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states what the tool returns without behavioral details. It doesn't disclose if this is a read-only operation, requires authentication, has rate limits, or how data is sourced (e.g., from a database or real-time analysis). This leaves significant gaps for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and resource, with no wasted words. It clearly communicates the tool's function without unnecessary elaboration, 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.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that returns data. It doesn't specify the format of the summary (e.g., JSON structure, categories used), error handling, or what 'counts of errors and warnings' entails (e.g., per rule or total). This leaves the agent unprepared for the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately adds no parameter details, focusing on the tool's purpose instead, which aligns with the baseline for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'summary of all Magento coding standard rules', specifying it's grouped by category with error/warning counts. It distinguishes from siblings like 'list_rules' by focusing on summarized statistics rather than raw listing, though the distinction could be more explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like 'list_rules' or 'explain_rule' is provided. The description implies usage for aggregated rule statistics, but lacks context on prerequisites, timing, or exclusions, leaving the agent to infer based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_rulesA

List all Magento coding standard rules. Can filter by category (Security, Legacy, PHP, Functions, Templates, Less, etc.), minimum severity (1-10), or search term.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by category (Security, Legacy, PHP, Functions, Classes, Templates, Less, etc.)
minSeverityNoMinimum severity level (1-10, where 10 is most critical)
searchTermNoSearch in rule names and descriptions

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions filtering but doesn't disclose behavioral traits like whether it returns all rules by default, pagination behavior, rate limits, authentication requirements, or what the output format looks like (e.g., list of rule objects). For a list tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('List all Magento coding standard rules') and succinctly adds filtering details. Every word earns its place with no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a list operation with filtering), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the output contains (e.g., rule names, IDs, descriptions), how results are structured, or any limitations (e.g., max results). This makes it inadequate for an agent to fully understand how to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 three parameters (category, minSeverity, searchTerm) with clear descriptions. The description adds minimal value by restating the filtering options without providing additional syntax, examples, or constraints beyond what's in the schema, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and resource 'Magento coding standard rules', specifying it can filter by category, severity, or search term. This distinguishes it from siblings like 'check_security' (which likely checks code against rules), 'explain_rule' (which explains specific rules), and 'get_rules_summary' (which might provide aggregated statistics).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning filtering capabilities (category, severity, search), suggesting it's for browsing or finding rules. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_rules_summary' or 'explain_rule', nor does it mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

manage_themeB

Manage theme-specific coding standards. Themes layer additional rules on top of base Magento standards. Built-in presets: hyva (Alpine.js + TailwindCSS), luma (jQuery + RequireJS + LESS), breeze (Vanilla JS), porto (Luma-based + Porto widgets). Custom themes can be added as JSON files.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: "list" shows available themes, "set" activates a theme, "clear" deactivates theme, "info" shows theme details
themeIdNoTheme ID to set or get info for (e.g., "hyva", "luma", "breeze", "porto", or custom theme ID)

TDQS

B3.2/5.0
Behavior2/5

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 mentions actions (list, set, clear, info) but doesn't explain what 'set' or 'clear' do operationally (e.g., whether they modify configuration files, require permissions, or have side effects). For a tool with mutation capabilities, this is a significant gap in transparency about its behavior and potential impacts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences: it states the purpose, lists built-in presets, and notes custom themes. Each sentence adds useful information without redundancy, and it's front-loaded with the core function. A minor improvement could be structuring the preset list more clearly, but overall it's efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is partially complete. It covers the purpose and parameter context well but lacks details on behavioral outcomes, error handling, or return values. Without annotations or output schema, more guidance on what happens after actions like 'set' or 'clear' would enhance completeness for safe agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters (action with enum values and themeId). The description adds value by providing examples of theme IDs (hyva, luma, breeze, porto) and mentioning custom themes as JSON files, which helps contextualize the themeId parameter beyond the schema. However, it doesn't elaborate on parameter interactions or constraints, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool manages theme-specific coding standards for Magento, explaining that themes layer additional rules on top of base standards. It provides specific examples of built-in presets (hyva, luma, breeze, porto) and mentions custom themes, distinguishing it from siblings like list_rules or validate_code which focus on rules rather than theme management. However, it doesn't explicitly contrast with all siblings like check_security or explain_rule.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by listing built-in presets and custom theme options, suggesting when to use this tool for theme-related tasks. However, it lacks explicit guidance on when to choose this over alternatives like get_magento_pattern or list_rules, and doesn't specify prerequisites or exclusions for actions like 'set' or 'clear'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_codeA

Validate code against Magento 2 coding standards. Returns violations with severity, line numbers, and fix suggestions.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to validate
fileTypeYesType of file: php (PHP classes), phtml (templates), js (JavaScript), less/css (stylesheets)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool returns violations with severity, line numbers, and fix suggestions, which is useful behavioral context. However, it doesn't mention error handling, performance characteristics, or any limitations like input size constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the purpose and efficiently details the return format. Every word earns its place with no redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a validation tool with no annotations and no output schema, the description provides good context by specifying the return format (violations with severity, line numbers, fix suggestions). However, it could be more complete by mentioning error cases or linking to the coding standards referenced.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 both parameters thoroughly. The description adds no additional parameter semantics beyond what the schema provides, such as explaining how 'code' should be formatted or when to choose specific 'fileType' values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('validate code against Magento 2 coding standards') and resource ('code'), distinguishing it from siblings like 'check_security' or 'explain_rule' by focusing on standards validation rather than security checks or rule explanations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when code needs validation against Magento 2 standards, but provides no explicit guidance on when to use this tool versus alternatives like 'list_rules' or 'get_magento_pattern'. It lacks clear exclusions or prerequisites.

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.

  1. 7 tool updatesv1.2.0
    • First observedcheck_security
    • First observedexplain_rule
    • First observedget_magento_pattern
    • First observedget_rules_summary
    • First observedlist_rules
    • First observedmanage_theme
    • First observedvalidate_code

TDQS

A3.7/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: check_security focuses on security validation, explain_rule provides rule details, get_magento_pattern offers coding patterns, get_rules_summary gives rule summaries, list_rules lists rules with filtering, manage_theme handles theme-specific standards, and validate_code performs general code validation. An agent can easily differentiate between them.

Naming Consistency4/5

The naming is mostly consistent with a verb_noun pattern (e.g., check_security, explain_rule, validate_code), but manage_theme uses a verb_noun format that is slightly different in structure (it implies management rather than a direct action like 'get' or 'list'), and get_magento_pattern includes 'magento' in the name, which deviates from the pure pattern. Overall, it's readable with minor deviations.

Tool Count5/5

With 7 tools, the count is well-scoped for a Magento 2 coding standards server. Each tool serves a specific function in the domain, such as validation, rule explanation, and theme management, without being excessive or too sparse. This aligns with typical MCP server tool counts of 3-15 for focused purposes.

Completeness5/5

The tool set provides complete coverage for Magento 2 coding standards: it includes validation (validate_code), security checks (check_security), rule exploration (list_rules, explain_rule, get_rules_summary), pattern guidance (get_magento_pattern), and theme management (manage_theme). There are no obvious gaps, covering the full lifecycle from learning to applying standards.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Provides centralized security instructions for AI-assisted code generation by matching context-aware rules to the user's programming language and file patterns. It ensures generated code adheres to security best practices without requiring manual maintenance of instruction files across individual repositories.
    2
    6 npm
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI assistants and developers to analyze code for language-specific best practices and idiomatic patterns across programming languages, CI automation, and configuration formats.
    16
    2
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Provides AI agents with Magento 2.4.8-p5 / PHP 8.3 technical standards, patterns, and review checklists via MCP tools, enabling them to reference the single source of truth when working on Magento projects.
    5
    -