MW

miniorangedev/wp-code-review-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 9 forks 质量 66 趋势 6MIT

WordPress 代码审查 MCP 服务器

概览

用于开发团队的轻量级可配置的MCP(模式上下文协议)服务器. 从外部来源或URL获取编码指南、安全规则和验证模式,如果您已托管您的自定义指南。 - QQ - 从任意 URL 获取指南 - QQ - 通过环境变量指定源 - QQ - 添加自己的编码标准和安全规则 - QQ - 外部指南,最小代码库 - get guidelines - 按类别获取开发指南 - 验证 代码 - 根据配置的标准验证代码 - security check - 安全弱点扫描 在您的 Web 服务器上托管来自样本- guidelines/ html/ 的文件并配置您的基址, 例如 : https://yourdomain.com/guidelines/ MCP 服务器将获取: -- [[T1] -- [[T2] -- [[T3]

概述(AI 翻译)

用于开发团队的轻量级可配置的MCP(模式上下文协议)服务器. 从外部来源或URL获取编码指南、安全规则和验证模式,如果您已托管您的自定义指南。

########关键特征**

  • ** 没有硬编码规则** - 从任何 URL 中获取指南
  • ** 动态配置** - 通过环境变量指定源
  • ** 海关验证** - 添加自己的编码标准和安全规则 外部指南,最小代码库

####### 可用工具**

按类别获取发展指南

  • validate_code - 根据所配置的标准验证代码
  • [[T2] – – 安全脆弱性扫描
先决条件**
  • 安装了节点js(v18+)

# # 安装和设置

** 步骤1:克隆仓库**

** 步骤2: 安装依赖和构建**

** 步骤3:东道主指导** 在您的网络服务器上托管来自sample-guidelines/html/的文件并配置您的基址, 例如: https://yourdomain.com/guidelines/

MCP 服务器将获取 :

  • https://yourdomain.com/guidelines/guidelines.md
  • [[T6]

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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

📋 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
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }