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: DevStandards 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_patternB

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

B3.2/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 doesn't disclose critical traits like whether it's read-only, has rate limits, requires authentication, or how it handles errors, leaving significant gaps for a tool with no annotation coverage.

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, stating the core purpose in the first sentence. The second sentence adds context about 'vibe coding' without redundancy. It could be slightly more structured, but overall, it's efficient with minimal waste.

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 no annotations and no output schema, the description provides basic purpose and usage but lacks details on behavioral traits, error handling, or return format. It's adequate for a simple query tool with one parameter, but doesn't fully compensate for the missing structured data, leaving room for improvement in completeness.

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, with the 'task' parameter clearly documented. The description adds minimal value beyond the schema by implying the task should be coding-related (e.g., 'read a file'), but doesn't provide additional syntax, format details, or examples. 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, returning patterns, code examples, and anti-patterns. It specifies the resource (Magento 2 patterns) and verb (get), though it doesn't explicitly differentiate from sibling tools like 'explain_rule' or 'validate_code'.

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 provides implied usage guidance by mentioning 'vibe coding' for writing Magento-compliant code naturally, suggesting it's for coding tasks. However, it lacks explicit when-to-use vs. alternatives, such as how it differs from 'explain_rule' or 'validate_code', and doesn't specify exclusions or prerequisites.

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.2/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. It describes the output format ('summary...grouped by category, showing counts of errors and warnings'), which is useful. However, it lacks details on potential side effects (e.g., is this a read-only operation?), performance considerations (e.g., latency, rate limits), or error handling. For a 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.

Conciseness5/5

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

The description is a single, well-structured sentence that efficiently conveys the tool's purpose and output format. It is front-loaded with the main action ('Get a summary') and avoids unnecessary details. Every part of the sentence earns its place by specifying the resource, grouping method, and data included.

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 complexity (simple read operation with no parameters) and the absence of annotations and output schema, the description is minimally adequate. It explains what the tool does and the format of the output, but it doesn't cover behavioral aspects like safety or performance. For a tool with no structured data beyond the input schema, the description provides a basic understanding but could be more complete by addressing missing behavioral context.

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, and the schema description coverage is 100% (as there are no parameters to describe). The description doesn't need to add parameter semantics, so it appropriately focuses on the tool's purpose and output. A baseline of 4 is applied since no parameters exist, and the description doesn't attempt to explain non-existent inputs.

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: 'Get a summary of all Magento coding standard rules grouped by category, showing counts of errors and warnings.' It specifies the verb ('Get'), resource ('Magento coding standard rules'), and output format ('summary...grouped by category, showing counts of errors and warnings'). However, it doesn't explicitly differentiate from sibling tools like 'list_rules' or 'explain_rule', which might offer similar rule-related information.

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. It doesn't mention sibling tools like 'list_rules' (which might list individual rules) or 'explain_rule' (which might provide detailed explanations), nor does it specify prerequisites or contexts for usage. 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.

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.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 the full burden of behavioral disclosure. It mentions that themes layer additional rules and lists built-in presets, but fails to describe key behaviors such as whether changes are persistent, if permissions are required, what happens when a theme is set/cleared, or error handling. This leaves significant gaps for a tool with mutation actions like 'set' and 'clear'.

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 that efficiently cover purpose, built-in themes, and custom themes. It's front-loaded with the core function and avoids redundancy, though it could be slightly more structured by separating usage notes from feature lists.

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 with multiple actions (list, set, clear, info) and no output schema or annotations, the description is incomplete. It doesn't explain return values, error cases, or the impact of actions like 'set' or 'clear', which is inadequate for a mutation tool without structured support.

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 minimal value by listing example theme IDs (e.g., 'hyva', 'luma') and mentioning custom themes as JSON files, but doesn't provide additional syntax, format details, or constraints beyond what the schema specifies. This meets the baseline for high schema coverage.

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 distinguishes this from sibling tools like 'list_rules' or 'validate_code' by focusing on theme management rather than rule listing or validation. However, it doesn't explicitly contrast with all siblings (e.g., 'get_magento_pattern'), keeping it from a perfect score.

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 mentioning custom themes, suggesting it's for handling theme-related standards. However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_rules_summary' or 'explain_rule', and doesn't specify prerequisites or exclusions, leaving usage context somewhat vague.

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.

TDQS

A3.7/5.0
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
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time OWASP ASVS security guidance and vulnerability scanning for AI coding agents. Enables proactive security during code generation by checking security requirements, scanning code for vulnerabilities, and suggesting secure code fixes.
    3
    MIT
  • 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
    15
    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

Latest Blog Posts

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/Midhun-edv/magento-coding-standard-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server