The PHPocalypse MCP Server is designed for developers who are too busy to manually run tests and static analysis. It provides a streamlined way to automate these tasks, allowing developers to focus on writing code rather than managing repetitive processes.
Before you can use the PHPocalypse MCP Server, ensure you have the following installed:
- Node.js
- npx
- tsx
bash
git clone https://github.com/plapinski/PHPocalypse-MCP.git
bash
npm install
To configure the MCP server, follow these steps:
Open your Cursor settings and add the following MCP configuration:
json
{
"mcpServers": {
"phpocalypse-mcp": {
"command": "npx",
"args": ["tsx", "/Absolute/Path/To/PHPocalypse-MCP/src/index.ts", "--config", "/Absolute/Path/To/Your/PHP/Based/Project/phpocalypse-mcp.yaml"]
}
}
}
Make sure the paths are correct!
In your PHP project, create a phpocalypse-mcp.yaml
file with the following structure:
```yaml
tools:
name: php-cs-fixer
command: make php-cs
name: php-stan
command: /vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=-1
name: tests-unit
command: docker compose run --rm php ./vendor/bin/phpunit --testsuite=Unit
name: tests-behat
command: task behat -- --no-interaction
```
Once configured, the PHPocalypse MCP Server will automatically run the defined tools and commands in your PHP project. This allows you to automate tasks like code formatting, static analysis, and unit testing without manual intervention.
claude-3.7-sonnet
or craft your commands to return less output.The PHPocalypse MCP Server is a proof-of-concept tool aimed at simplifying the development process by automating repetitive tasks. It is particularly useful for developers who want to focus on coding rather than managing tests and static analysis.
This project is licensed under the MIT License.