MCP server for querying and filtering Rector PHP refactoring rules

MCP server for querying and filtering Rector PHP refactoring rules

mcp-rector•byvasilvestre

An MCP server that exposes tools to list, search, and filter available Rector PHP refactoring rules by keyword or rule set.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Lists all available Rector rules, optionally filtered by a rule set such as "php80" or "code-quality".
  • •Searches Rector rules by keyword with multi-word tokenized queries across rule names, descriptions, and tags, sorted by relevance.
  • •Filters rules by a rule set category, case-insensitively.

BEST FOR

  • •Finding Rector rules relevant to a refactoring task, such as renaming classes or adding type declarations.
  • •Browsing which rules belong to a particular Rector rule set.

ABOUT MCP-RECTOR

MCP server for querying and filtering Rector PHP refactoring rules is cataloged as an MCP server attributed to vasilvestre. An MCP server that exposes tools to list, search, and filter available Rector PHP refactoring rules by keyword or rule set. 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.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for querying and filtering Rector PHP refactoring rules 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.

FREQUENTLY ASKED QUESTIONS

What search capabilities does the search-rector-rules tool offer?

It supports multi-word tokenized search matching rule names, descriptions, and tags, with results sorted by relevance.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4c1f5279452e · 采集于 2026-11-13 12:31:02 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Rector

MCP server providing tools to query and filter Rector PHP refactoring rules.

Installation

Quick Start (No Installation Required)

Run the MCP Rector server directly from GitHub Packages:

npx @vasilvestre/mcp-rector

To use a specific version:

npx @vasilvestre/mcp-rector@1.0.0

Global Installation

For permanent installation:

npm install -g @vasilvestre/mcp-rector
mcp-rector

Development Setup

For local development:

npm install
npm run build

Configuration for MCP Clients

Claude Desktop (Anthropic)

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "rector": {
      "command": "npx",
      "args": ["-y", "@vasilvestre/mcp-rector"]
    }
  }
}

For a specific version (e.g., 1.0.0):

{
  "mcpServers": {
    "rector": {
      "command": "npx",
      "args": ["-y", "@vasilvestre/mcp-rector@1.0.0"]
    }
  }
}

After updating the config, restart Claude Desktop to activate the MCP server.

Cline (VS Code Extension)

Add to your Cline MCP settings:

  1. Open VS Code Settings (Cmd/Ctrl + ,)
  2. Search for "Cline: MCP Settings"
  3. Edit settings.json:
{
  "cline.mcpServers": {
    "rector": {
      "command": "npx",
      "args": ["-y", "@vasilvestre/mcp-rector"]
    }
  }
}

Alternatively, use the Cline MCP Settings UI to add the server.

Continue.dev (VS Code/JetBrains Extension)

Add to Continue configuration at ~/.continue/config.json:

{
  "mcpServers": [
    {
      "name": "rector",
      "command": "npx",
      "args": ["-y", "@vasilvestre/mcp-rector"]
    }
  ]
}

Zed Editor

Add to your Zed settings at ~/.config/zed/settings.json:

{
  "context_servers": {
    "rector": {
      "command": {
        "path": "npx",
        "args": ["-y", "@vasilvestre/mcp-rector"]
      }
    }
  }
}

Using Globally Installed Package

If you prefer a global installation instead of npx:

npm install -g @vasilvestre/mcp-rector

Then configure with direct command:

{
  "mcpServers": {
    "rector": {
      "command": "mcp-rector"
    }
  }
}

Verifying Configuration

After configuring your MCP client:

  1. Restart the application
  2. Check for "mcp-rector" in available tools/context
  3. Look for tools: list-rector-rules, filter-rector-rules, search-rector-rules

Testing Locally with MCP Inspector

The MCP Inspector is a developer tool for testing MCP servers locally before integrating them with clients.

Install Inspector

npx @modelcontextprotocol/inspector

Run the Server with Inspector

npx @modelcontextprotocol/inspector npx -y @vasilvestre/mcp-rector

This will:

  1. Start the MCP Inspector UI in your browser
  2. Connect to your mcp-rector server
  3. Allow you to test all available tools interactively

Using the Inspector

The Inspector provides:

  • Tools tab: View and test all registered tools (list-rector-rules, search-rector-rules, etc.)
  • Request/Response panels: See the full MCP protocol messages
  • Interactive testing: Call tools with custom parameters and see results immediately

Example test flow:

  1. Open the Inspector
  2. Navigate to the Tools tab
  3. Select list-rector-rules
  4. Add optional parameters (e.g., {"ruleSet": "naming"})
  5. Click "Run" to see the results

Available Tools

list-rector-rules

List all available Rector rules with optional filtering by rule set.

Parameters:

  • ruleSet (optional): Filter rules by rule set category (e.g., "php80", "code-quality")

search-rector-rules

Search Rector rules by keyword with multi-word query support.

Parameters:

  • query (required): Search keyword or multi-word phrase (e.g., "rename class")
  • ruleSet (optional): Filter results by rule set category

Features:

  • Multi-word tokenized search: "rename class" matches "RenameClass"
  • Searches across rule names, descriptions, and tags
  • Results sorted by relevance (name matches first, then description, then tags)

Examples:

  • {"query": "rename class"} → Finds RenameClass, RenameClassConstFetch, etc.
  • {"query": "type declaration"} → Finds AddParamTypeDeclaration, ReturnTypeDeclaration, etc.
  • {"query": "php80", "ruleSet": "php80"} → Searches within PHP 8.0 rule set only

filter-rector-rules

Filter rules by rule set category.

Parameters:

  • ruleSet (required): Rule set name to filter by (case-insensitive)

Additional tools documented in specs/001-list-rector-rules/

Development

npm run build      # Build TypeScript to build/
npm test           # Run tests
npm run test:watch # Run tests in watch mode

Troubleshooting

npx command not found

Ensure Node.js 18+ and npm are installed:

node --version  # Should be >= 18.0.0
npm --version

Permission denied errors (Unix/Linux)

The package should handle permissions automatically. If issues persist, try:

npx --yes mcp-rector

Network/registry errors

Check npm registry connectivity:

npm ping

Clear npx cache

If experiencing issues with cached versions, clear the npx cache:

rm -rf ~/.npm/_npx

Windows execution issues

On Windows, you may need to adjust PowerShell execution policy:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for querying and filtering Rector PHP refactoring rules from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-rector)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

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

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

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

0
Developer Tools

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

Repository stats unavailable
Developer Tools