Skip to main content
Glama
README.md
# mcp-magento-audit

[![CI](https://github.com/michalper/mcp-magento-audit/actions/workflows/ci.yml/badge.svg)](https://github.com/michalper/mcp-magento-audit/actions/workflows/ci.yml)

An [MCP](https://modelcontextprotocol.io) 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 five planned tools
> (`project_status`, `check_updates`, `module_risk`, `fetch_release_notes`,
> `upgrade_plan`) are working. See `ROADMAP.md` for what's next.

## How this differs from `composer audit`

`composer audit` and `composer outdated` are built into Composer and do their job well.
This server targets three things they don't give you:

1. **They don'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.
2. **They don'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.*
3. **They don't aggregate across projects.** "Which of our twenty stores can be upgraded
   today" requires stitching results together from many directories by hand.

**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

```bash
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

```json
{
  "mcpServers": {
    "magento-audit": {
      "command": "/path/to/mcp-magento-audit/.venv/bin/mcp-magento-audit"
    }
  }
}
```

## 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) and the project's own `phpstan` for deprecated API usage and type errors |
| `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 |

## Development

```bash
.venv/bin/python -m pytest        # tests
.venv/bin/ruff check .            # lint
.venv/bin/mypy src                # types
```

Architectural decisions are recorded in `docs/adr/`.

## License

MIT

TDQS

A3.8/5.0

Scored across 5 tools

Disambiguation4/5

Each tool has a distinct role: project_status inspects current state, fetch_release_notes pulls external notes, check_updates runs compatibility signals, module_risk runs static analysis, and upgrade_plan aggregates them. There is mild overlap since upgrade_plan internally reuses check_updates/module_risk/fetch_release_notes, but the descriptions clearly frame these as components vs. the final aggregate plan.

Naming Consistency4/5

All names are consistent snake_case, which is the dominant convention. However the pattern is mixed: fetch_release_notes and check_updates use verb_noun while project_status, module_risk and upgrade_plan are noun phrases, so it is not a strictly predictable verb_noun scheme.

Tool Count5/5

Five tools is well-scoped for a focused Magento upgrade-audit server. Each tool earns its place, covering state inspection, external data, two independent analysis signals, and an aggregator, with no redundant or filler tools.

Completeness4/5

The surface covers the full audit lifecycle: current state, upstream release context, compatibility checks, code risk, and a synthesized upgrade plan with concrete blockers. Minor gaps exist (no config/cache inspection or structured report export), but core audit workflows have no dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues