loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

magento2-lsp

MCP Tool

mage-os-lab/magento2-lsp

Language Server (LSP) and MCP server for Magento 2 - provides go-to-definition, references, and rename across PHP, XML, and layout files.

Install

$ npx loaditout add mage-os-lab/magento2-lsp

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "magento2-lsp": {
      "command": "npx",
      "args": [
        "-y",
        "magento2-lsp"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

magento2-lsp

Magento 2 tooling for editors and AI agents. This package includes two servers that share the same index and understanding of Magento's configuration system:

  • LSP server - for your editor. Go-to-definition, find-references, diagnostics, and code lenses across XML and PHP.
  • MCP server - for AI coding agents. Exposes merged Magento configuration that agents can't get by reading individual files.

Both are installed from the same repo but configured separately - the LSP in your editor, the MCP in your AI agent. They can be used together or independently.

Rationale

Agents write the code, but you still review it - and jumping between XML and PHP with a keystroke beats grepping through config files. AI agents need the opposite: not navigation, but the *merged* result of Magento's multi-module configuration that no single file contains.

LSP Server

Works alongside Intelephense or Phpactor - this LSP handles the Magento-specific connections that generic PHP tooling can't see.

  • Auto-complete as you type. Context-aware completions for FQCNs, event names, config paths, ACL resource IDs, template identifiers, layout handles, block/container names, and DB table/column names across XML config files and PHP.
  • Navigate XML config like code. Go-to-definition and find-references work across di.xml, events.xml, system.xml, and layout XML - linking them to the PHP classes, templates, and config paths they reference.
  • Trace the plugin chain. See which plugins intercept a method, jump from a beforeSave plugin to the method it wraps, and see plugin counts directly in your editor via code lenses.
  • Follow config paths. Jump from scopeConfig->getValue('payment/account/active') in PHP straight to the <field> declaration in system.xml, and find all PHP files using a config path.
  • Catch errors as you type. Broken class references, missing templates, duplicate plugin names, and invalid model classes are flagged with

Tags

lsp-servermagentomcp-server

Reviews

Loading reviews...

Quality Signals

16
Stars
0
Installs
Last updated16 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/31/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/mage-os-lab/magento2-lsp)](https://loaditout.ai/skills/mage-os-lab/magento2-lsp)