Skip to main content
Glama
WordPress Code Review MCP Server

WordPress Code Review MCP Server

WordPress Code Review MCP Server v2.0

A lightweight, configurable MCP (Model Context Protocol) server for development teams. Fetches coding guidelines, security rules, and validation patterns from external sources or URL where you have hosted your custom guidelines.

πŸš€ Key Features

  • βœ… No hardcoded rules - Fetch guidelines from any URL

  • βœ… Dynamic configuration - Specify source via environment variables

  • βœ… Custom validation - Add your own coding standards and security rules

  • βœ… Lightweight - External guidelines, minimal codebase

Related MCP server: mcp-rules-server

πŸ“‹ Available Tools

  • get_guidelines - Fetch development guidelines by category

  • validate_code - Validate code against configured standards

  • security_check - Security vulnerability scanning

πŸ“‹ Prerequisites

  • Node.js installed (v18+)

πŸ›  Installation & Setup

Step 1: Clone Repository

git clone https://github.com/miniOrangeDev/wp-code-review-mcp-server.git
cd wp-code-review-mcp

Step 2: Install Dependencies & Build

npm install
npm run build

Step 3: Host Your Guidelines

Host the files from sample-guidelines/html/ on your web server and configure your base URL, for example: https://yourdomain.com/guidelines/

The MCP server will fetch:

  • https://yourdomain.com/guidelines/guidelines.md

  • https://yourdomain.com/guidelines/validation-rules.md

  • https://yourdomain.com/guidelines/security-rules.md

Step 4: Configure Cursor

Add to your Cursor settings (Ctrl+Shift+P β†’ "Preferences: Open User Settings (JSON)"):

{
  "mcpServers": {
    "wp-code-review-mcp": {
      "command": "node",
      "args": ["/path/to/wp-code-review-mcp-server/build/index.js"],
      "env": {
        "GUIDELINES_URL": "https://yourdomain.com/guidelines"
      }
    }
  }
}

Replace /path/to/wp-code-review-mcp-server with your actual path (e.g., /home/wp-code-review-mcp-server)

Why the path? Unlike published npm packages, this is a local MCP server. The path tells Cursor exactly where to find your built server file.

If you don't see MCP server connected, restart Cursor and the MCP server will be available.

Guidelines Format

Your guidelines server should serve these files:

  • /guidelines.md - Main development guidelines

  • /validation-rules.md - Code validation rules

  • /security-rules.md - Security scanning rules

Step 5: Test in Cursor

  1. Open any PHP file in Cursor

  2. Ask the AI: "Check this code for security issues: class mo_Test {}"

  3. The AI should detect the short prefix violation!

πŸ”§ Troubleshooting

Having configuration issues? See the Configuration Troubleshooting Guide for common mistakes and solutions.

πŸ“ Customizing Guidelines

Edit the files in sample-guidelines/html/ to add your own:

  • Coding standards

  • Validation rules

  • Security patterns

  • Company-specific guidelines

The MCP server automatically uses updated rules without restart.

πŸ“„ License

MIT License


Built for Dynamic, Maintainable Development Guidelines πŸ›‘οΈ

Available Tools

3 tools
get_guidelinesB

Get development guidelines from the configured source

Inputs: category.

security_checkB

Perform security analysis on code using configured security rules

Inputs: code (required).

validate_codeB

Validate code against configured coding standards

Inputs: code (required), language (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of code review: fetching guidelines, performing security analysis, and validating coding standards. There is no overlap in their purposes, making them easily distinguishable for an agent.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (get_guidelines, security_check, validate_code). The naming is clear and predictable, aiding in tool selection.

    Tool Count5/5

    Three tools is appropriate for a simple code review server, covering essential tasks without overwhelming the user. The count is well-scoped for the domain.

    Completeness4/5

    The tools cover core code review operations: retrieving guidelines, security checking, and validation. Minor gaps exist (e.g., no tool for submitting code for full review), but the surface is sufficient for basic automation.

    Related MCP Connectors

    Related MCP Servers