This MCP server enhances Laravel development in Cursor IDE with tools for log viewing, error searching, and executing Artisan commands directly from your editor interface.
Clone the repository:
git clone https://github.com/your-username/laravel-mcp.git
cd laravel-mcp
Create a shell script wrapper (e.g., ~/bin/run-laravel-mcp):
#!/bin/bash
# Point to your Laravel project path
export LARAVEL_PATH=/path/to/your/laravel/project
# Run the MCP server
mcp run /path/to/laravel-helpers-mcp/server.py
Make the script executable:
chmod +x ~/bin/run-laravel-mcp
Ensure ~/bin is in your PATH:
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc # or source ~/.bashrc
The Laravel Helpers MCP provides several tools that integrate with Cursor IDE:
Log File Viewing: Access the most recent entries in your Laravel log file directly in Cursor
tail_log_file
Error Searching: Search through log files for specific error patterns
search_log_errors
Artisan Commands: Execute Laravel artisan commands from within Cursor
run_artisan_command
Model Information: View model details and relationships in your editor
show_model
All tools can be accessed through Cursor's command palette. Simply open the command palette and search for the tool you wish to use.
Note that this project is no longer under development. For a fully featured Laravel MCP server, consider using Laravel Boost.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "laravel-helpers-mcp" '{"command":"~/bin/run-laravel-mcp"}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"laravel-helpers-mcp": {
"command": "~/bin/run-laravel-mcp"
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"laravel-helpers-mcp": {
"command": "~/bin/run-laravel-mcp"
}
}
}
3. Restart Claude Desktop for the changes to take effect