Download the PHP package dpt/mcp-rector-warm without Composer

On this page you can find all versions of the php package dpt/mcp-rector-warm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mcp-rector-warm

mcp-rector-warm

Rector is great. Its cold start is not. Every rector process boots Rector from scratch before a single rule fires, on every file. Keep Rector warm and pay that boot once. Same output as cold. up to 10× faster per file on Laravel and Symfony.

Two ways in, one warm engine:

Tests codecov PHPStan Rector Code style Packagist Downloads PHP

Docs


Who it's for

You… You get Use
let an AI agent refactor PHP Rector as a tool your agent calls after every edit MCP server
want Rector in your editor Rector's fixes flagged as you type, one click to apply Language server
run Rector in a validation loop A warm Rector you call file by file, without paying the boot each time MCP server

Both ship in one package. Run one, or both side by side.

Same answers. Just faster.

The fastest mode is on by default: a long-lived session child keeps Rector's analysis warm between calls (what it watches). Set MCP_RECTOR_WARM_SESSION=0 to turn it off. Every write -- rector_process with dryRun: false, an LSP code action, rector-warm.fixWorkspace -- always forks fresh from a pristine worker, never the session, whatever it's set to.

Get started

That's the install. PHP 8.2+, Rector ^2.4 comes along as a normal Composer dependency. Now pick where Rector should run.

Rector in your AI agent

For: anyone who lets Claude, Copilot agent mode, Cursor, Cline or another agent refactor PHP.

With Claude Code (recommended)

Plain MCP has a gap: the agent has to remember to call rector_process, and in practice it forgets, or calls it only at the end. claude-supertool closes that gap -- its rector-mcp validator runs this server after every edit made through a supertool op, and puts the result in the edit's own output, so "runs Rector after every edit" is a fact about the tool instead of a hope about the agent.

Install the plugin, once per machine:

Restart your Claude Code session afterward -- the plugin's hook only registers at session start.

Then, as a project dependency -- not the global install above, since .supertool.json below points at vendor/bin/:

and a minimal .supertool.json:

mcp_autospawn: true lets the validator start the warm daemon itself on first use, so there is nothing to register as a separate MCP server. After an edit to a PHP file, supertool's own output carries a [validators] block with either rector-mcp : ok or the Rector finding, right where the edit happened:

The honest caveat: this only fires on an edit made through one of supertool's own mutating ops (edit, paste, replace, replace_lines, vim) -- not through Claude Code's built-in Edit/Write tools, which write to disk with no validator and no rollback. To make supertool the only edit route, deny the native tools in the project's .claude/settings.json:

That is a project decision, not something this server or supertool does for you -- see claude-supertool's README, "Hard-block native tools", for the full list (it also covers the raw shell commands supertool replaces) and the headless-session equivalent.

Full supertool setup →, including the optional phpstan validator (backed by mcp-phpstan-warm) alongside this one.

Any other MCP client

Add it to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

Restart Claude and ask: "Run Rector on src/Foo.php". Done.

Full setup → VS Code and other clients, the rector_process tool, timeouts.

Rector in your editor

For: PHP developers who want Rector's suggestions where they write code, not in a terminal afterwards.

Point your editor's LSP client at:

for PHP files, with composer.json / rector.php as root markers.

Full setup → copy-paste configs for Neovim and Helix (tested in CI), Zed, Sublime Text and PhpStorm.

Rector in your validation loop

For: teams and tools that run Rector after every generated change, as a check.

Full setup →

This repo dogfoods exactly that setup on itself (#201): .supertool.json runs this checkout's own bin/mcp-rector-warm and mcp-phpstan-warm as claude-supertool validators on every PHP edit, plus phplint/py-compile/bash-check/jsonlint/ yaml-check for the cheap syntax checks. See CONTRIBUTING.md for what that means for a pull request.

The numbers

Up to 10× faster per file on Laravel and Symfony with the warm session (on by default), 3.3–4.1× with MCP_RECTOR_WARM_SESSION=0. Every warm answer was byte-identical to cold -- including every write, which never goes through the session either way.

Machine, method, full table, reproduce it on your project →

Install

Puts mcp-rector-warm and rector-warm-lsp on your $PATH. As a project dependency, both are in vendor/bin/.

Documentation

Credits

Related

License

Community License — see Digital Process Tools.


All versions of mcp-rector-warm with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
mcp/sdk Version ^0.7.1
rector/rector Version ^2.4
symfony/finder Version ^7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dpt/mcp-rector-warm contains the following files

Loading the files please wait ...