Mcp Phpcs Server
@larspohlmann
About Mcp Phpcs Server
A minimal Model Context Protocol (MCP) server implemented in pure PHP that exposes phpcs_check and phpcbf_fix.
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Mcp Phpcs Server?
Mcp Phpcs Server is a Model Context Protocol (MCP) server implemented in pure PHP with no Composer dependencies. It provides two tools for PHP coding standards: phpcs_check runs PHP_CodeSniffer to report violations, and phpcbf_fix runs PHP Code Beautifier and Fixer to automatically fix them. Designed to be copied into any project, it communicates over JSON‑RPC 2.0 via STDIO.
How to use Mcp Phpcs Server?
Make the STDIo entrypoint executable (chmod +x path/to/bin/mcp-phpcs), then configure your MCP client to launch the server using the absolute path to bin/mcp-phpcs as the command. Optionally set environment variables MCP_PHPCS_PATH, MCP_PHPCBF_PATH, and MCP_PHPCS_RULESET in the client configuration (e.g., Claude Desktop’s mcpServers block) to specify binary paths and a ruleset file.
Key features of Mcp Phpcs Server
- No Composer dependencies; pure PHP implementation
- Exposes
phpcs_checkandphpcbf_fixtools - Configurable via environment variables or
config/config.json - Auto‑discovers ruleset files (
phpcs.xml,phpcs.xml.dist,ruleset.xml) - JSON‑RPC 2.0 communication over STDIN/STDOUT
- Domain‑driven structure (
src/Domain,src/Application,src/Infrastructure)
Use cases of Mcp Phpcs Server
- Run PHP_CodeSniffer checks on a file or directory via any MCP client (e.g., Claude Desktop)
- Automatically fix coding standard violations with
phpcbf_fix - Integrate PHPCS and PHPCBF into an AI‑assisted development workflow
- Enforce project‑specific rulesets by configuring the ruleset path
FAQ from Mcp Phpcs Server
What tools does Mcp Phpcs Server provide?
It provides phpcs_check (runs PHP_CodeSniffer) and phpcbf_fix (runs PHP Code Beautifier and Fixer). Both accept a required path parameter.
How do I configure the PHPCS or PHPCBF binary paths?
Set the environment variables MCP_PHPCS_PATH and MCP_PHPCBF_PATH in your MCP client configuration. Defaults are phpcs and phpcbf on the system PATH.
Does the server require any dependencies?
No. The server is written in pure PHP and has no Composer dependencies. It only requires the phpcs and phpcbf binaries (from PHP_CodeSniffer) to be available.
How does the server discover the ruleset?
If no MCP_PHPCS_RULESET is provided, the server searches upward from the current working directory for a file named phpcs.xml, phpcs.xml.dist, or ruleset.xml.
What communication protocol does it use?
It speaks JSON‑RPC 2.0 over STDIN/STDOUT. All JSON‑RPC messages go to STDOUT; logs are written to STDERR.
Frequently asked questions
What tools does Mcp Phpcs Server provide?
It provides `phpcs_check` (runs PHP_CodeSniffer) and `phpcbf_fix` (runs PHP Code Beautifier and Fixer). Both accept a required `path` parameter.
How do I configure the PHPCS or PHPCBF binary paths?
Set the environment variables `MCP_PHPCS_PATH` and `MCP_PHPCBF_PATH` in your MCP client configuration. Defaults are `phpcs` and `phpcbf` on the system PATH.
Does the server require any dependencies?
No. The server is written in pure PHP and has no Composer dependencies. It only requires the `phpcs` and `phpcbf` binaries (from PHP_CodeSniffer) to be available.
How does the server discover the ruleset?
If no `MCP_PHPCS_RULESET` is provided, the server searches upward from the current working directory for a file named `phpcs.xml`, `phpcs.xml.dist`, or `ruleset.xml`.
What communication protocol does it use?
It speaks JSON‑RPC 2.0 over STDIN/STDOUT. All JSON‑RPC messages go to STDOUT; logs are written to STDERR.
Basic information
More Other MCP servers

Peekaboo MCP – lightning-fast macOS screenshots for AI agents
steipetePeekaboo is a macOS CLI & optional MCP server that enables AI agents to capture screenshots of applications, or the entire system, with optional visual question answering through local or remote AI models.
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
Comments