Phpactor MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PHPACTOR_BIN | No | Path to the Phpactor binary. If not set, Phpactor is expected to be in PATH. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| phpactor_index_buildA | Build or rebuild the Phpactor project index. Must run before other phpactor tools. Checks PSR-4 autoload config and warns if missing (Yii2 projects need manual setup). |
| phpactor_find_referencesA | Find all semantic references to a PHP class or class member across the project. Returns type-aware results (not grep-based text matching). |
| phpactor_rename_classA | Update all REFERENCES to a PHP class project-wide (use statements, type hints, docblocks, instantiations). Does NOT rename the file or modify the class declaration — use phpactor_move_class for a full rename including file move and namespace update. |
| phpactor_rename_memberA | Rename a PHP method, property, or constant and update all references project-wide. Uses type inference to only rename the correct member (not same-named members on other classes). |
| phpactor_move_classA | Move/rename a PHP class: moves the file, updates the namespace declaration, AND updates all references project-wide. This is the tool for full class renames. WARNING: Writes directly to disk — commit your work first! |
| phpactor_class_infoA | Query indexed information about a PHP class: FQCN, file path, type, what it implements, and what implements it. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: class info, find references, build index, move class, rename class (only references), rename member. The descriptions explicitly contrast move_class vs rename_class, so an agent can easily differentiate.
All tools start with 'phpactor_' and use snake_case, but the verb_noun pattern is not fully consistent: 'class_info' and 'index_build' deviate slightly. However, the overall pattern is predictable and readable.
6 tools is well-scoped for a PHP code intelligence server, covering indexing, querying, and refactoring. No tool is redundant, and the count is appropriate for the domain.
The tool set covers core operations (index, inspect, move/rename class, rename member) but lacks capabilities like listing classes or getting method details. Minor gaps exist, but the surface is usable for common tasks.