
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Model Context Protocol server implemented in pure PHP that runs PHP_CodeSniffer against PHP files or directories, reports violations, and auto-fixes fixable issues from any MCP client.
MCP PHPCS Server is cataloged as an MCP server attributed to larspohlmann. A Model Context Protocol server implemented in pure PHP that runs PHP_CodeSniffer against PHP files or directories, reports violations, and auto-fixes fixable issues from any MCP client. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP PHPCS Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
No. A non-zero exit code from phpcs means violations were found, and the server reports them as findings rather than treating them as a fatal error.
STDOUT carries only JSON-RPC messages, and all logs are written to STDERR.
README.md · b2abf0862331 · Fetched 2026-11-13 10:55:10 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Model Context Protocol server that brings PHP_CodeSniffer into your AI coding workflow — lint PHP against your coding standard and auto-fix violations, straight from any MCP client.
Implemented in pure PHP with zero Composer dependencies. Drop it into any project or run it standalone — it speaks JSON-RPC 2.0 over stdio and works with Claude Desktop, Claude Code, Cursor, and any other MCP-compatible client.
| Tool | Description |
|---|---|
phpcs_check | Runs PHP_CodeSniffer against a file or directory and returns a readable report of violations. |
phpcbf_fix | Runs PHP Code Beautifier and Fixer (phpcbf) to automatically fix fixable violations. |
Both tools take a single required path (absolute or project-relative file/directory).
phpcs and phpcbf binaries available (via PHP_CodeSniffer, e.g. a project's vendor/bin or a global install)Clone the repository (or copy it into your project):
git clone https://github.com/larspohlmann/mcp-phpcs-server.git
Make the entrypoint executable:
chmod +x mcp-phpcs-server/bin/mcp-phpcs
Register it with your MCP client (see below).
Configure via environment variables or config/config.json. Environment variables take precedence.
| Variable | config.json key | Description | Default |
|---|---|---|---|
MCP_PHPCS_PATH | phpcsPath | Path to the phpcs binary | phpcs on PATH |
MCP_PHPCBF_PATH | phpcbfPath | Path to the phpcbf binary | phpcbf on PATH |
MCP_PHPCS_RULESET | rulesetPath | Path to a coding-standard ruleset | auto-discovered |
If no ruleset is provided, the server searches upward from the current working directory for one of phpcs.xml, phpcs.xml.dist, or ruleset.xml.
Add the server to your MCP config:
{
"mcpServers": {
"phpcs": {
"command": "/absolute/path/to/mcp-phpcs-server/bin/mcp-phpcs",
"env": {
"MCP_PHPCS_PATH": "/usr/local/bin/phpcs",
"MCP_PHPCBF_PATH": "/usr/local/bin/phpcbf",
"MCP_PHPCS_RULESET": "/path/to/your/phpcs.xml"
}
}
}
}
Then ask your assistant something like "Run phpcs on src/Service/UserService.php and fix what you can."
{
"name": "phpcs_check",
"arguments": { "path": "src/Service/UserService.php" }
}
The server follows a light Domain-Driven Design layout:
src/Domain — tool contracts and result value objectssrc/Application — JSON-RPC MCP server and tool registrysrc/Infrastructure — process runner, config, ruleset discovery, tool implementationsbin/mcp-phpcs — stdio entrypointIt implements the MCP methods initialize, tools/list, and tools/call.
phpcs means violations were found — it is reported as findings, not treated as a fatal error.Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP PHPCS Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-phpcs-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.