WPCS

Provides automated WPCS checks and PHP compatibility analysis for WordPress plugins/themes through an MCP interface.
  • javascript

8

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "vapvarun-wpcs-mcp-server": {
      "command": "node",
      "args": [
        "~/.mcp-servers/wpcs-mcp-server/build/index.js"
      ],
      "env": {
        "PATH": "/Users/YOUR_USERNAME/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

You integrate WordPress Coding Standards checks into your workflow with an MCP server that runs WPCS and PHPCompatibility via Claude AI. It automatically checks and can fix your PHP code to meet WordPress.org standards, helping you ship compliant plugins and themes faster.

How to use

You connect an MCP client (like Claude Desktop or Claude Code) to the WPCS MCP Server, then issue natural-language requests to run checks, fixes, or PHP compatibility analyses on your codebase. Typical workflows include auto-fixing common WPCS violations, checking specific files or directories, validating staged files before commits, and verifying PHP version compatibility across multiple versions.

How to install

Prerequisites you need before starting: Node.js 18 or newer, and npm. If you want automatic code checks during commits, you may also enable Git hooks.

git clone https://github.com/vapvarun/wpcs-mcp-server.git ~/.mcp-servers/wpcs-mcp-server
cd ~/.mcp-servers/wpcs-mcp-server
npm install
npm run build

Additional steps to enable usage with Claude Desktop (macOS)

Add the MCP server to Claude Desktop so you can run WPCS checks directly from Claude. Use the prebuilt JavaScript entry point produced by the build step.

{
  "mcpServers": {
    "wpcs": {
      "command": "node",
      "args": ["~/.mcp-servers/wpcs-mcp-server/build/index.js"]
    }
  }
}

Restart Claude Desktop

Restart Claude Desktop after adding the MCP server so it loads the new configuration. On first run, the server will auto-install phpcs and the WordPress Coding Standards if needed.

Available tools

wpcs_pre_commit

Auto-fix staged files, re-stage them, and report remaining issues to streamline the commit process.

wpcs_check_staged

Check all staged PHP files for WPCS violations before committing.

wpcs_check_file

Check a single PHP file for coding standard compliance.

wpcs_check_directory

Check all PHP files within a specified directory for coding standard violations.

wpcs_fix_file

Auto-fix WPCS violations within a single file.

wpcs_check_php_compatibility

Check PHP compatibility across defined PHP versions (e.g., 8.1–8.4).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational