# PHP_CodeSniffer

> Use this tool when you need to analyze and improve PHP code quality, as it provides automated code review and fixing capabilities through PHP_CodeSniffer and PHP Code Beautifier and Fixer. It solves problems related to coding standard violations and code style issues, accepting PHP code as input and producing formatted JSON output. It is ideal for use in AI-assisted code review, automated code quality checks, and maintaining consistent coding standards across PHP projects.

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

## Description

A lightweight MCP server that exposes PHP_CodeSniffer (phpcs) and PHP Code Beautifier and Fixer (phpcbf) tools for code quality analysis and automatic fixing. Built with zero external dependencies using only native PHP, it provides two core tools: phpcs_check for running coding standard violations analysis with formatted JSON output, and phpcbf_fix for automatically fixing code style issues. The implementation features flexible configuration through environment variables, JSON config files, or automatic ruleset discovery, supports custom coding standards, and includes robust process execution with proper error handling, making it useful for AI-assisted PHP code review, automated code quality checks, and maintaining consistent coding standards across PHP projects.

## Trust

- **Trust score (0–1):** 0.30
- **Verification tier:** unverified
- **Last scanned:** 2026-09-02

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** file-system
- **Updated:** 2026-09-02

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/larspohlmann-phpcs)
- **Repository:** <https://github.com/larspohlmann/mcp-phpcs-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-phpcs"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/larspohlmann-phpcs` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/larspohlmann-phpcs/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
