mcp-magento-audit
This MCP server lets an AI agent audit Magento 2 / Adobe Commerce projects for upgrade readiness, custom module risk, and dependency security.
Get a fast composer-only project overview: Magento version, PHP requirement, package count, and abandoned packages.
Check package compatibility against a target PHP/Magento version, plus Rector-based code compatibility.
Scan custom module risk: phpcs, phpstan, rector, third-party vendor Magento modules, ObjectManager misuse, core overrides, and dangling XML references.
Audit installed packages for known security advisories via
composer audit.List outdated packages with newer available versions via
composer outdated.Fetch Magento's official release notes from GitHub without relying on model memory.
Build a concrete upgrade plan with blockers, unverified signals, and
readystatus.Triage many projects at once for fleet-wide upgrade readiness.
Fetches release notes for magento/magento2 from GitHub Releases to support upgrade planning without relying on model memory.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-magento-audit assess this Magento project for PHP 8.3 / Magento 2.4.8 upgrade blockers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-magento-audit

An MCP server giving an AI agent tools to assess a Magento 2 / Adobe Commerce project along three axes: compatibility with a target PHP and Magento version, quality of custom modules, and dependency security.
It answers the question that never stops coming up in Magento agencies: "can we bump this client to a newer version, what's blocking it, and where do we start?"
Status: early stage. Built on evenings/weekends. All eight planned tools (
get_project_status,check_updates,scan_module_risk,audit_security,check_outdated_packages,fetch_release_notes,build_upgrade_plan,build_fleet_overview) are working. SeeROADMAP.mdfor what's next.
How this differs from composer audit
composer audit and composer outdated are built into Composer and do their job well —
audit_security and check_outdated_packages actually shell out to them rather than
reimplementing a CVE database or version comparison. This server targets what plain
Composer doesn't give you:
It doesn't see
app/code. Custom modules don't exist on Packagist, so they get zero coverage from vulnerability databases — and that's exactly the code agencies write.scan_module_riskcovers that side withphpcs/phpstan/rectorinstead.It doesn't combine axes. Nobody gets one answer: this module blocks the upgrade, has an open CVE, is abandoned by its author, and has the worst complexity in the project — fix this one first.
build_upgrade_plandoes, foldingaudit_security's advisories in alongside composer-constraint and code-quality blockers.It doesn't aggregate across projects. "Which of our twenty stores can be upgraded today" requires stitching results together from many directories by hand.
build_fleet_overviewruns the composer-constraint check across every project path given to it in one call — a fast first pass, not a replacement for a fullbuild_upgrade_planper project.
What this server doesn't pretend to be: there's no clean dataset of "module X works
with Magento 2.4.8". Results are derived from declarations in composer.json, a code
scan, and the vendor's own release notes — this is a decision-support tool, not an
oracle. Upgrading a production store still requires testing, not just a report.
Related MCP server: Magento MCP Server
Install
git clone https://github.com/michalper/mcp-magento-audit.git
cd mcp-magento-audit
python3.12 -m venv .venv
.venv/bin/pip install -e ".[dev]"Connecting to Claude Code
{
"mcpServers": {
"magento-audit": {
"command": "/path/to/mcp-magento-audit/.venv/bin/mcp-magento-audit"
}
}
}Projects that develop inside Docker/DDEV/Warden/Lando
scan_module_risk (phpcs/phpstan/rector), check_updates's code_compatibility signal, and
audit_security/check_outdated_packages all shell out to the project's own vendor/bin/*
and composer. If that project only has PHP/Composer available inside a dev container
— common for Magento — and this MCP server runs on the host, every one of those checks
will correctly report scanned=false with a reason rather than silently being wrong, but
that's easy to misread as "found nothing" instead of "couldn't check".
Set MCP_MAGENTO_AUDIT_EXEC_PREFIX to wrap every one of those calls in a command that
runs it inside the container instead, e.g.:
export MCP_MAGENTO_AUDIT_EXEC_PREFIX="ddev exec --"
# or: export MCP_MAGENTO_AUDIT_EXEC_PREFIX="docker compose exec -T app"This assumes the usual bind-mount setup (the project directory mirrors the same
relative layout inside the container, just under a different root) — host-absolute
paths like vendor/bin/phpcs are rewritten relative to the project root before being
wrapped, and composer resolves against the container's own PATH rather than the
host's. If that assumption doesn't hold for a given setup, running this server from
inside the dev container directly (no prefix needed) is the more reliable fallback.
Rate limits on GitHub API calls
fetch_release_notes calls the GitHub REST API, capped at 60 requests/hour per IP when
unauthenticated — easily hit from a shared office/CI IP running build_fleet_overview or
build_upgrade_plan across many projects. Set GITHUB_TOKEN (or GH_TOKEN) in the
environment to raise that to 5000/hour; a read-only, no-scope token is enough, since this
only ever reads public release data.
Example

An agent calling build_upgrade_plan against a store that has one abandoned, PHP-7-only
package and no phpstan.neon of its own (trimmed — the real result also includes
release_notes, and the full update_check/scan_module_risk results each blocker was
derived from):
{
"ready": false,
"unverified": [
"phpstan: no phpstan.neon(.dist) in project — skipping static analysis"
],
"blockers": [
{
"source": "composer",
"description": "legacy/module",
"detail": "^7.4 does not cover PHP 8.3"
}
]
}ready is false because of a real blocker, not a guess; unverified says phpstan never
ran at all, so a clean result elsewhere isn't mistaken for "everything was checked".
Tools
Tool | Status | Description |
| working | Magento version, PHP requirement, package count, abandoned packages |
| working | per-package verdict against a target PHP/Magento version, plus a Rector-based check of whether the code itself would need changes |
| working | scans code via |
| working | every installed package in |
| working | every installed package checked against |
| working | release notes from |
| working | combines the other tools into a list of concrete blockers, with |
| working | triages many projects at once against a target PHP/Magento version ("which of these N stores can be upgraded today") via |
Development
.venv/bin/python -m pytest --cov # tests + coverage
.venv/bin/ruff check . # lint
.venv/bin/mypy src # types
.venv/bin/bandit -c pyproject.toml -r src # security
.venv/bin/pip-audit # dependency vulnerabilitiesRun .venv/bin/pre-commit install once to run all of the above (except
pip-audit, which needs network access and stays CI-only) on every commit.
Architectural decisions are recorded in docs/adr/. See CHANGELOG.md for what
changed in each release.
License
MIT
Available Tools
8 toolsaudit_securityA
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.
Inputs: path (required). Returns: object
build_fleet_overviewA
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_upgrade_plan would catch — call build_upgrade_plan per project afterward for the full picture. A project that fails to load (bad path, missing composer files) is reported with its own error instead of failing the whole batch.
Inputs: paths (required), target_php (required), target_magento (required). Returns: object
build_upgrade_planA
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 blockers): being behind on releases, or a third-party module's own code quality, don't block this upgrade the way an app/code error or a composer constraint does. ready=true only when the blockers list is empty, but check 'unverified' too: it lists any signal that couldn't run at all (e.g. phpstan/rector not installed, or composer missing for audit_security/check_outdated_packages), which ready=true does not account for.
Inputs: path (required), target_php (required), target_magento (required). Returns: object
check_outdated_packagesA
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 reporting zero outdated packages.
Inputs: path (required). Returns: object
check_updatesA
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.
Inputs: path (required), target_php (required), target_magento (required). Returns: object
fetch_release_notesA
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.
Inputs: version (required). Returns: object
get_project_statusA
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.
Inputs: path (required). Returns: object
scan_module_riskA
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 guessing. rector's findings are reported as severity=warning (suggestions, not pass/fail violations). A fourth, separate check (vendor_phpcs) scans third-party vendor/ Magento modules (type magento2-module in composer.lock, excluding magento/* core) with the bare Magento2 standard — the scanned package list is in vendor_packages, and those issues carry scope='vendor' (vs 'app_code' for the rest) so callers can tell code they can fix from code they can't. A fifth check (object_manager_misuse) is a plain regex scan over app/code's own .php/.phtml files for ObjectManager::getInstance() — not a phpcs sniff: magento-coding-standard's only built-in check for this fires solely inside .phtml templates, not in Model/Block/Helper classes where bypassing constructor DI is arguably more harmful. A sixth check (core_overrides) flags app/code classes that redeclare a class already present in vendor/magento/* under the exact same fully qualified name (a copy-pasted core file, not a legitimate di.xml preference/plugin) — severity=error, so unlike the previous two it does become a build_upgrade_plan blocker, since that silently blocks safely updating the vendor copy it shadows. A seventh check (dangling_references) flags app/code's own di.xml (preference/plugin), events.xml (observer), crontab.xml (job), layout XML (block/uiComponent), indexer.xml and schema.graphqls (@resolver) naming a PHP class that doesn't resolve to any known class or virtualType — a stale reference left behind by a rename or removal, invisible to phpcs/phpstan/rector since none of them analyze XML. severity=warning, not a build_upgrade_plan blocker. Each tool reports scanned=false with a reason when it can't run, instead of staying silent.
Inputs: path (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
The three audit-style tools (audit_security, check_outdated_packages, check_updates) sound similar but the descriptions explicitly contrast them (CVE advisories vs newer releases vs target-version compatibility), and build_upgrade_plan vs build_fleet_overview is also clarified as full-per-project vs batched subset. Only mild residual risk that a rushed agent picks check_updates when it means check_outdated_packages.
Every tool follows a consistent snake_case verb_noun pattern: get_project_status, audit_security, check_outdated_packages, scan_module_risk, build_fleet_overview, build_upgrade_plan, check_updates, fetch_release_notes. No mixed conventions or vague standalone verbs.
Eight tools is well-scoped for a Magento audit server: one fast overview, three independent composer-level checks, one code/static-analysis scanner, two planning tools at different granularities, and release-notes lookup. Each tool has a distinct role and none feels redundant.
The surface covers status overview, PHP/Magento compatibility, security advisories, outdated packages, static analysis, fleet triage, release notes, and a combined upgrade plan with clear blocker/unverified semantics. Minor gap: no remediation-oriented output (e.g., generated composer commands or patch suggestions), though that is arguably outside an audit-only server's scope.
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Agent-readiness scanner (0-5 score), robots.txt + llms.txt generators, managed agent enablement.
Autonomous AI agent readiness, crawler reachability, and 30-point audit specification engine.
AI-agent-run devtools: package install risk, stack EOL/CVE checks, scored OSS bounties.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to interact with Magento 2 development environments through comprehensive tools for module management, database operations, cache control, configuration management, and system diagnostics. Supports complete development workflows from module creation to deployment and troubleshooting.28119 npm41MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage Adobe Commerce and Magento 2 instances through business-level tools for catalog, promotions, CMS, and SEO. It features secure OAuth 1.0 authentication, safety guardrails for bulk operations, and built-in diagnostic reports for store health.382MIT
- AlicenseBqualityDmaintenanceEnables AI agents to safely upgrade JavaScript and TypeScript projects through dependency analysis, upgrade path detection, breaking change identification, codemod application, and PR summary generation.1422 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to interact with Adobe Commerce Cloud projects via REST API and SSH for database queries, log reading, environment management, and more, with no PHP CLI required.1581 npmMIT