mcp-magento-audit
v0.5.0MCP server for auditing Magento projects: update compatibility, module quality, dependency security
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_project_status
Reads composer.json and composer.lock of the given Magento project and returns its state: Magento version, PHP requirement, package count and the list of packages abandoned by their authors. Call this first for a fast, composer-only overview before the deeper (and slower) checks like check_updates, scan_module_risk or build_upgrade_plan.
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
check_updates
Checks the given Magento project against a target PHP and Magento version, with two independent signals: a per-package verdict ('ok', 'blocks' or 'unknown') from declared composer.lock PHP requirements, and code_compatibility — whether the project's own code would actually need changes under the target PHP, via a Rector dry-run (declared requirements are often just '*', which alone gives a false sense of readiness). The PHP requirement for the target Magento version comes from a local cache, a live fetch, or an offline fallback table, in that order — the result says which one was used.
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
target_magento * | string | Target Magento version to check compatibility against, e.g. "2.4.7". |
target_php * | string | Target PHP version to check compatibility against, e.g. "8.3". |
scan_module_risk
Scans the given Magento project's custom code for coding-standard violations, static-analysis issues and dead-code/quality suggestions by shelling out to the project's own vendor/bin/phpcs, vendor/bin/phpstan and vendor/bin/rector. phpcs: if the project has its own phpcs.xml(.dist), that configuration is used as-is; otherwise falls back to the Magento2 standard on app/code. phpstan and rector: only run if the project has its own phpstan.neon(.dist)/rector.php — unlike phpcs there is no safe generic fallback (no paths/level/extensions/rule sets to guess), so they're skipped rather than guessi…
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
audit_security
Checks every installed package in the given Magento project's composer.lock — core Magento, third-party vendor/ extensions, dev dependencies, not just custom app/code — against known security advisories via `composer audit`. Returns scanned=false with a reason (e.g. no composer.lock, composer not found) rather than silently reporting zero advisories when the check never ran.
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
check_outdated_packages
Checks every installed package in the given Magento project's composer.lock against `composer outdated` to report which ones have a newer version available — independent of audit_security (known CVEs) and check_updates (compatibility with a target PHP/Magento version): a package can be behind on releases with neither of those issues, and that's still tech debt worth surfacing. Each package's own latest-status (e.g. semver-safe-update vs update-possible) is included as reported by Composer. Returns scanned=false with a reason (e.g. no composer.lock, composer not found) rather than silently re…
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
check_platform_requirements
Checks whether the PHP binary/extensions actually visible to `composer` right now satisfy every installed package's platform requirement, via `composer check-platform-reqs --format=json` — a different signal from check_updates, which only compares *declared* composer.lock version ranges against a *target* PHP version and never looks at extensions at all. Only requirements that fail (status missing or failed) are reported; a passing requirement isn't actionable and would just be noise. Note: this reports on whatever environment this MCP server's own `composer` call runs in, which may differ f…
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
list_package_licenses
Lists the declared license of every installed package in the given Magento project's composer.lock, via `composer licenses --format=json`. Purely informational, raw decision-support data — whether a given license (or mix of licenses across a project) is acceptable is a legal/business call for a human to make, not something this tool judges. Returns scanned=false with a reason (e.g. no composer.lock, composer not found) rather than silently reporting zero packages.
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
audit_composer_patches
Lists Composer patches declared against installed packages in the given Magento project's composer.json, reading the extra.patches (package -> {description: patch path/URL}) convention used by both the cweagans/composer-patches and vaimo/composer-patches plugins, plus any extra.patches-file it points to. Each patch is a real, concrete thing that can block or complicate a vendor package upgrade, yet composer.lock/audit_security/check_outdated_packages never surface it. Pure JSON parsing, no subprocess. Only these two documented conventions are covered — an agency's own ad-hoc patch script has…
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
check_vcs_credential_exposure
Checks the given Magento project's git repository for two concrete, high-confidence signs of a committed credential, scoped to files `git ls-files` says are already tracked (what's actually been committed, not what .gitignore currently excludes): (1) app/etc/env.php tracked by git at all — it holds the database password and crypt key; (2) an AWS access key ID or a PEM private key header appearing in any other git-tracked file under app/code. Deliberately not a generic entropy/secret scanner — only these two patterns, chosen for being essentially never a false positive, the same near-zero f…
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
fetch_release_notes
Fetches Magento's own release notes for a given version from the magento/magento2 GitHub repo's Releases API — never reconstructs them from training data. Returns found=false with a reason when nothing could be fetched, rather than guessing what a release might have contained.
| Parameter | Type | Description |
|---|---|---|
version * | string | Magento version to fetch release notes for, e.g. "2.4.7". |
fetch_release_notes_range
Fetches Magento's own release notes for every version strictly after from_version up to and including to_version — not just the final tag. A multi-version jump (e.g. 2.4.4 -> 2.4.7) can skip breaking changes introduced in the versions in between if only the final tag's notes are read; this reads the real list of intermediate versions (including patch releases like 2.4.4-p1) from GitHub's own releases listing instead of guessing a numbering scheme. Each version's own notes go through fetch_release_notes's own cache, capped at 15 versions per call (truncated=true if more existed) to bound GitH…
| Parameter | Type | Description |
|---|---|---|
from_version * | string | Magento version to fetch release notes after, e.g. "2.4.4". |
to_version * | string | Magento version to fetch release notes up to, e.g. "2.4.7". |
build_upgrade_plan
Builds an upgrade plan for the given Magento project against a target PHP and Magento version by combining check_updates, scan_module_risk, audit_security, check_outdated_packages and fetch_release_notes. The verdict is a list of concrete blockers (composer constraints, code that Rector flags as needing changes, phpcs/phpstan errors in the project's own app/code, security advisories against installed packages), each with its own reason — not a single abstract score. check_outdated_packages and vendor/-scope scan_module_risk issues are informational only (included in the full result, not in b…
| Parameter | Type | Description |
|---|---|---|
path * | string | Filesystem path to the Magento project root (holds composer.json). |
target_magento * | string | Target Magento version to check compatibility against, e.g. "2.4.7". |
target_php * | string | Target PHP version to check compatibility against, e.g. "8.3". |
build_fleet_overview
Triages many Magento projects at once against a target PHP/Magento version — 'which of these N stores can be upgraded today'. Runs only check_updates per project (composer-constraint verdicts, plus code_compatibility if the project has its own rector.php) — deliberately not the full build_upgrade_plan, since scan_module_risk's phpcs/phpstan/rector and audit_security's/check_outdated_packages' composer calls are each seconds-to-minutes and don't scale across a whole fleet in one call. A project reported blocked=false here can still have scan_module_risk/audit_security findings that build_up…
| Parameter | Type | Description |
|---|---|---|
paths * | array | Filesystem paths to the Magento project roots to triage, one per project. |
target_magento * | string | Target Magento version to check compatibility against, e.g. "2.4.7". |
target_php * | string | Target PHP version to check compatibility against, e.g. "8.3". |