home / mcp / laravel helpers mcp server

Laravel Helpers MCP Server

Provides Laravel development helpers: log viewing, log error search, Artisan command execution, and model inspection within Cursor IDE.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jsonallen-laravel-mcp": {
      "command": "mcp",
      "args": [
        "run",
        "/path/to/laravel-helpers-mcp/server.py"
      ],
      "env": {
        "LARAVEL_PATH": "YOUR_LARAVEL_PROJECT_PATH"
      }
    }
  }
}

You have a Laravel-focused MCP Server that exposes a set of Cursor IDE tools to help you view logs, search errors, run Artisan commands, and inspect models directly from your editor. This server lets you connect to a Laravel project and access debugging and development utilities without leaving your coding environment.

How to use

Connect your MCP client to the Laravel Helpers MCP Server and start using the available tools directly from Cursor. You can view the latest Laravel log entries, search for error patterns across log files, run Artisan commands without leaving your editor, and display model information and relationships for quick reference. Use the MCP client’s command palette or UI to invoke each tool as needed.

How to install

Prerequisites: you need PHP 8.1 or newer, Laravel 10.0 or newer, Cursor IDE installed, and Python tooling ready (UVX). Ensure you have a Laravel project you want to connect to.

# 1) Clone the Laravel Helpers MCP repository
# (Replace with your actual repository URL if you customize this)
git clone https://github.com/your-username/laravel-mcp.git
cd laravel-mcp

# 2) Create a shell wrapper to run the MCP server
# This wrapper points to your Laravel project and starts the MCP server
# Save this as ~/bin/run-laravel-mcp and make it executable

#!/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
# 3) Make the wrapper executable
chmod +x ~/bin/run-laravel-mcp

# 4) Ensure ~/bin is in your PATH
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc  # or ~/.bashrc
source ~/.zshrc  # or source ~/.bashrc

Notes and setup details

Environment variable usage: you specify the path to your Laravel project via LARAVEL_PATH. This is used by the MCP server to locate your application files and context for the tools.

Server startup concept: the MCP server is run through a small wrapper that invokes the Python-based server script. The recommended command structure is shown in the wrapper example: you set LARAVEL_PATH and then execute the MCP start command.

Available tools

tail_log_file

View the most recent entries in your Laravel log file directly in Cursor, with optional filtering and live tail capability.

search_log_errors

Search through Laravel log files for specific error patterns and display integrated results in Cursor.

run_artisan_command

Execute Laravel Artisan commands directly from Cursor, with results returned to the editor for quick review.

show_model

Display a selected model's information and relationships within your editor for easy reference while coding.