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 (
project_status,check_updates,module_risk,security_audit,outdated_packages,fetch_release_notes,upgrade_plan,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 —
security_audit and 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.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.
upgrade_plandoes, foldingsecurity_audit'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.
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 fullupgrade_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.
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"
}
}
}
Example
An agent calling 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/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 |
|---|---|---|
project_status |
working | Magento version, PHP requirement, package count, abandoned packages |
check_updates |
working | per-package verdict against a target PHP/Magento version, plus a Rector-based check of whether the code itself would need changes |
module_risk |
working | scans code via phpcs (Magento2 coding standard), the project's own phpstan, and the project's own rector.php (dead code/quality) — plus a separate phpcs pass over third-party vendor/ Magento modules (informational, not an upgrade blocker), a plain regex scan for ObjectManager::getInstance() misuse in app/code (not limited to .phtml, unlike the standard's own sniff), and a core-override check (app/code classes that redeclare a vendor/magento/* class under the same FQCN — an upgrade blocker) |
security_audit |
working | every installed package in composer.lock — core Magento, third-party vendor/ extensions, dev dependencies — checked for known advisories via composer audit |
outdated_packages |
working | every installed package checked against composer outdated for a newer available version — independent of known CVEs or target-version compatibility |
fetch_release_notes |
working | release notes from magento/magento2 GitHub Releases, without answering from the model's memory |
upgrade_plan |
working | combines the other tools into a list of concrete blockers, with ready=true only once it's empty |
fleet_overview |
working | triages many projects at once against a target PHP/Magento version ("which of these N stores can be upgraded today") via check_updates only — a fast first pass, not a replacement for upgrade_plan per project |
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 vulnerabilities
Run .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
Metadata
Release files for mcp-magento-audit 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_magento_audit-0.2.0.tar.gz | 48.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_magento_audit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.0 kB
Release files / mcp_magento_audit-0.2.0.tar.gz
| Download URL | mcp_magento_audit-0.2.0.tar.gz |
|---|---|
| Size | 48.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7e411d20337766bd1803bb6b97b40abb2810761b12eb98b131484b05388e3d0
|
|
BLAKE2b-256 checksum How to use checksums |
939a4b4bbbe3dcfb74872659058dcd8f61f3442f0282bdd8b015fc49d72f75e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / mcp_magento_audit-0.2.0-py3-none-any.whl
| Download URL | mcp_magento_audit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 35.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90909c95531044dceadac763e2c6527b49c761d2a3252da94e265ce985704ec9
|
|
BLAKE2b-256 checksum How to use checksums |
eeac8fe84ad70824ef8f8d2b590ed1eabcdf43397424502f540f50725af1a582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency log