get_refactoring_priorities
Ranked refactoring candidates with recommendations
How to use it
get_refactoring_priorities is exposed by the PhpCodeArcheology MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_refactoring_priorities tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install PhpCodeArcheology
docker run --rm -v "$(pwd)":/project -v "$(pwd)/report":/output phpcodearcheology /projectOther tools in PhpCodeArcheology (10)
All classes with key metrics, sortable and filterable
Class dependency analysis (incoming/outgoing)
Knowledge graph as JSON (nodes, edges, cycles)
Overall code health score, grade, and project statistics
Git hotspots ranked by churn × complexity
Impact analysis: what breaks if you change a method? Shows callers and call chains
Detailed metrics for a specific class, file, or function
Code quality problems, filterable by severity and type
Test coverage summary — tested/untested classes, coverage gaps, test mapping
Search entities by name with metric overview