Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ“Š Monitoring
  3. PhpCodeArcheology
PhpCodeArcheology logo
Health: ActiveRecent health check succeeded.Last checked 9/11/2026, 5:00:39 PM

PhpCodeArcheology

User RatingsBe the first to rate and review this MCP server!
View Repository90 GitHub StarsTotal stargazers on GitHub for the source repository (90 stars).Visit Website
phpstatic-analysiscode-qualityarchitecturetesting

PHP static analysis MCP server for measuring code quality, architecture, maintainability, dependencies, hotspots, and test coverage.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

One-click editor setup isn’t available for this listing yet β€” we don’t have a confirmed install command, and we’d rather show nothing than point your editor at the wrong package or host. Follow the project’s own setup instructions, linked above.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ
No confirmed setup config for this listing yet. We only publish a config block when the install details come from the project itself β€” its README, its docs, or a verified owner. We haven’t found those for PhpCodeArcheology/PhpCodeArcheology, and we’d rather show nothing than a guess you’d paste into your client. Follow the project’s own setup instructions for the current steps.
Install Tool Schemas (11) Directory Badge Claim listing AlternativesπŸ“Š More in Monitoring

Overview

PhpCodeArcheology analyzes PHP projects using more than 60 code quality metrics and exposes the results through 11 MCP tools. Use it to inspect architecture, identify maintainability problems, prioritize refactoring, analyze dependencies and change impact, and review test coverage. It also supports Git-based hotspot analysis and knowledge graph output.

Use cases

β€’Assess overall PHP project health and technical debt
β€’Find complex, coupled, untested, or otherwise problematic code
β€’Prioritize refactoring candidates using metrics and Git hotspots
β€’Trace class dependencies and method change impact
β€’Identify test coverage gaps and map tests to production classes

Key features

β€’60+ metrics for files, classes, methods, and functions
β€’Problem detection with 14 built-in rules
β€’Git churn and hotspot analysis
β€’Dependency graphs and knowledge graph JSON
β€’Test framework detection and Clover coverage analysis
β€’Health scores, refactoring priorities, and impact analysis

Capabilities & Tool Schemas (11) ~192 tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server β€” may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by PhpCodeArcheology.

get_health_score

Overall code health score, grade, and project statistics

get_problems

Code quality problems, filterable by severity and type

get_metrics

Detailed metrics for a specific class, file, or function

get_hotspots

Git hotspots ranked by churn Γ— complexity

get_refactoring_priorities

Ranked refactoring candidates with recommendations

get_dependencies

Class dependency analysis (incoming/outgoing)

Documentation Overview

PhpCodeArcheology Logo

PhpCodeArcheology

Packagist Version PHP Version License PhpCodeArcheology MCP server

PhpCodeArcheology is a PHP static analysis tool that measures code quality through 60+ metrics including cyclomatic complexity, maintainability index, coupling, and cohesion. It generates comprehensive reports for files, classes, methods, and functions β€” detecting code smells, identifying hotspots via git churn analysis, and tracking quality trends over time.

Unlike PHPStan or Psalm (which focus on type safety and bug detection), PhpCodeArcheology focuses on architecture and maintainability β€” giving you the insights you need to understand and improve your codebase structure. Think of it as an alternative to PHPMetrics with deeper git integration, baseline management, and AI-ready output.

PhpCodeArcheology Dashboard

Features

  • 60+ code quality metrics per file, class, and function β€” cyclomatic complexity, cognitive complexity, maintainability index, LCOM, Halstead metrics, coupling, instability, and more
  • Problem detection with 14 built-in rules β€” God Class, too complex, dead code, security smells, SOLID violations, deep inheritance, low type coverage, untested complex code
  • Test analysis β€” auto-detects PHPUnit/Pest/Codeception, maps test files to production classes, integrates Clover XML for line-level coverage, highlights untested hotspots
  • Git integration β€” churn analysis, hotspot detection (high churn + high complexity), author tracking
  • Source code display β€” view method source code directly in the HTML report with PHP syntax highlighting and a nesting-depth heatmap that reveals complexity hotspots at a glance (details below)
  • Multiple report formats β€” interactive HTML, Markdown, JSON, SARIF (GitHub Code Scanning), AI summary, Knowledge Graph (JSON)
  • Health Score β€” single 0-100 score with A-F grading for your entire project
  • Technical Debt Score β€” weighted problem score normalised per 100 logical lines of code
  • History tracking β€” trend charts across multiple analysis runs
  • Baseline management β€” track only new problems, ignore existing ones (ideal for legacy projects)
  • CI/CD ready β€” configurable exit codes, SARIF for GitHub Code Scanning, JSON for custom tooling
  • Quick mode β€” fast terminal-only output without report generation
  • CLAUDE.md generation β€” auto-generated project overview for AI coding assistants
  • AI integration β€” native MCP server for AI assistants like Claude Code (details below)

Quick Start

bash
composer require --dev php-code-archeology/php-code-archeology
./vendor/bin/phpcodearcheology

No config file needed β€” the tool works out of the box. It scans your src directory and creates an HTML report in tmp/report. Open tmp/report/index.html in your browser.

Tip: Add tmp/report to your .gitignore to keep generated reports out of version control.

Table of Contents

  • Prerequisites
  • Installation
  • Using the Composer Plugin
  • CLI Options
  • Subcommands
  • Configuration
  • Test Analysis
  • Report Types
  • Source Code Display
  • Knowledge Graph Export
  • Key Metrics
  • AI Integration (MCP Server)
  • Understanding the Health Score
  • Memory and Performance
  • A Note on Metric Accuracy (v2.7.0)
  • Development
  • Roadmap
  • Contributing

Prerequisites

  • PHP 8.2 or higher (works on 8.2, 8.3, 8.4, 8.5)
  • Composer

Installation

bash
composer require --dev php-code-archeology/php-code-archeology

Global Installation

bash
composer global require php-code-archeology/php-code-archeology

Make sure ~/.composer/vendor/bin (or ~/.config/composer/vendor/bin) is in your $PATH. Then run from any directory:

bash
phpcodearcheology /path/to/your/project

Docker

Terminal
docker build -t phpcodearcheology https://github.com/PhpCodeArcheology/PhpCodeArcheology.git

Run against a local project:

Terminal
docker run --rm -v "$(pwd)":/project -v "$(pwd)/report":/output phpcodearcheology /project

This mounts your project into the container and writes the HTML report to ./report/.

PHAR (for legacy codebases)

If your project has dependency conflicts with PhpCodeArcheology's requirements (e.g. an older nikic/php-parser version), download the standalone PHAR from the Releases page. The PHAR ships all dependencies bundled, so it works without touching your project's composer.json.

bash
# Download the PHAR and checksum from the latest release
curl -LO https://github.com/PhpCodeArcheology/PhpCodeArcheology/releases/latest/download/phpcodearcheology.phar
curl -LO https://github.com/PhpCodeArcheology/PhpCodeArcheology/releases/latest/download/phpcodearcheology.phar.sha256

# Verify checksum
shasum -a 256 -c phpcodearcheology.phar.sha256   # macOS
sha256sum -c phpcodearcheology.phar.sha256       # Linux

# Run it (PHP 8.2+)
php phpcodearcheology.phar --quick src/

Use the PHAR when: your project's dependencies collide with PhpCodeArcheology's, you want a CI step without a composer require --dev, or you analyse a legacy codebase where adding dev-deps is risky.

Using the Composer Plugin

PhpCodeArcheology registers itself as a Composer plugin, so you can run the analysis directly via Composer:

bash
composer codearch:analyze

When no path is given and no config file exists, it automatically detects your PSR-4 source directories from composer.json. All CLI options are supported:

bash
composer codearch:analyze -- --quick
composer codearch:analyze -- --report-type=json --coverage-file=clover.xml
composer codearch:analyze -- src/ lib/

To create a config file interactively:

bash
./vendor/bin/phpcodearcheology init

CLI Options

Code
./vendor/bin/phpcodearcheology [options] [path...]
OptionDescription
--report-type=TYPEReport format: html (default), markdown, json, sarif, ai-summary, graph. Comma-separated for multiple: html,json
--report-dir=DIROutput directory (default: tmp/report)
--quickFast analysis with terminal output only, no report generation
--no-colorDisable coloured terminal output (also respects NO_COLOR env)
--fail-on=LEVELExit 1 on error or warning (for CI pipelines)
--generate-claude-mdGenerate a CLAUDE.md project overview
--git-root=DIRGit repository root (default: current directory)
--extensions=EXTFile extensions to analyse (comma-separated, default: php)
--exclude=DIRDirectories to exclude (comma-separated)
--coverage-file=FILEClover XML coverage file from PHPUnit/Pest for line-level coverage data
--source-codeInclude source code with syntax highlighting and nesting heatmap in the HTML report (details below)
--versionShow version

Subcommands

init β€” Create Config File

bash
./vendor/bin/phpcodearcheology init

Interactively creates a php-codearch-config.yaml with sensible defaults. Detects common source directories (src, app, lib) automatically.

compare β€” Compare Two Reports

bash
./vendor/bin/phpcodearcheology compare report-before.json report-after.json

Shows a delta view of metrics, problem counts, and lists new/resolved problems. Useful for answering: "Did my refactoring actually help?"

baseline β€” Track New Problems Only

bash
./vendor/bin/phpcodearcheology baseline create src
./vendor/bin/phpcodearcheology baseline check src

create saves the current problem set as a baseline. check runs a fresh analysis and reports only problems that are new compared to the baseline. Returns exit code 1 if new errors are found β€” ideal for CI pipelines on legacy projects.

Configuration

Create a php-codearch-config.yaml in your project root (or use init):

yaml
include:
  - "src"

exclude:
  - "vendor"

extensions:
  - "php"

packageSize: 2

reportDir: "tmp/report"
reportType: "html"

git:
  enable: true
  since: "6 months ago"
  root: "."  # Git repository root (useful for monorepos or subdirectory analysis)

graph:
  methodCalls: true  # Track cross-class method calls in the knowledge graph (default: true)

php:
  version: "8.2"       # Target PHP version for parsing (default: host PHP version)
  shortOpenTags: false  # Treat <? as PHP open tag (default: false)

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Monitoring View all alternatives
  • Fastmcp Sonarqube Metrics logoFastmcp Sonarqube Metrics

    A Model Context Protocol (MCP) server that provides a set of tools for retrieving information about SonarQube projects like metrics (actual and historical), issues, health status.

    πŸ“Š Monitoring8 views
    Compare vs Fastmcp Sonarqube Metrics β†’
  • Roslyn Codelens MCP logoRoslyn Codelens MCP

    ⃣ 🏠 🍎 πŸͺŸ 🐧 - Roslyn-based MCP server with 22 semantic code intelligence tools for .NET. Type hierarchies, call graphs, DI registrations, diagnostics, code fixes, complexity metrics, and more. Sub-millisecond lookups via pre-built indexes.

    πŸ“Š Monitoring3 views
    Compare vs Roslyn Codelens MCP β†’
  • Umami MCP logoUmami MCP

    Full-coverage MCP server for Umami Analytics API v2 β€” 66 tools for websites, stats, sessions, events, reports, users, teams, and realtime monitoring.

    πŸ“Š Monitoring2 views
    Compare vs Umami MCP β†’
  • World Monitor logoWorld Monitor

    Live global intelligence: real-time markets, conflicts, country risk, chokepoints, energy. 39 tools.

    πŸ“Š Monitoring5 views
    Compare vs World Monitor β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars
90
Stargazers on the source repository.
Last commit
6d ago
Most recent push to the default branch.
Tools exposed
11
Callable tools this server registers over MCP.
Directory activity
2 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about PhpCodeArcheology

It analyzes PHP projects and requires PHP 8.2 or higher.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPhpCodeArcheology AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/phpcodearcheology-phpcodearcheology?style=directory)](https://allmcps.com/mcp/phpcodearcheology-phpcodearcheology)
HTML Embed
<a href="https://allmcps.com/mcp/phpcodearcheology-phpcodearcheology"><img src="https://allmcps.com/api/badge/phpcodearcheology-phpcodearcheology?style=directory" alt="PhpCodeArcheology on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ“ŠMonitoring
PricingFree
More technical detailsExpand β–Ύ
AuthNo auth required
Last updatedSep 5, 2026
9/10 checks healthy over the last 32d
Views2
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars90
GitHub Star CountTotal stargazers on GitHub representing community popularity (90 stars).
Last commit6d ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Sep 5, 2026
56Quality signal: Good Β· 56/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools24/30
Adoption & activity8/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ“Š Monitoring β†’Best MCP servers for Monitoring & Observability β†’Alternatives to PhpCodeArcheology β†’Install in Claude DesktopInstall in CursorInstall in VS Code