# PHPStan

> Use this tool when you need to analyze PHP codebases for potential errors and quality issues, and integrate static analysis into your development workflow or automated code review process. It provides human-readable reports and raw JSON output through two specialized tools, phpstan_analyze and phpstan_pro, and supports configurable analysis levels. Ideal for AI-assisted development, automated code review, and quality assurance pipelines, PHPStan helps identify problems early on, improving overall code quality and reliability.

Canonical page: https://skillsregistry.net/skills/larspohlmann-phpstan  
JSON: https://api.skillsregistry.net/v1/skills/larspohlmann-phpstan

## Description

A lightweight PHPStan MCP server that exposes static analysis capabilities through two specialized tools: phpstan_analyze for human-readable reports and phpstan_pro for raw JSON output. Built with zero external dependencies using only native PHP, it features automatic PHPStan binary detection (preferring vendor/bin/phpstan), configuration file discovery, and flexible path normalization for analyzing PHP codebases. The implementation includes a custom autoloader, JSON-RPC message handling over STDIO, and configurable analysis levels, making it useful for integrating PHPStan static analysis into AI-assisted development workflows, automated code review processes, and quality assurance pipelines.

## Trust

- **Trust score (0–1):** 0.50
- **Verification tier:** unverified

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** devops-ci
- **Updated:** 2026-04-25

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/larspohlmann-phpstan)
- **Repository:** <https://github.com/larspohlmann/mcp-phpstan-server>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "larspohlmann-phpstan"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/larspohlmann-phpstan` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/larspohlmann-phpstan/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
