Laravel Helper Tools MCP server

Integrates with Laravel projects to provide log analysis, error tracking, and Artisan command execution for streamlined development workflows.
Back to servers
Provider
Jason Allen
Release date
Mar 05, 2025
Language
Python
Stats
10 stars

This Python-based MCP server for Laravel integrates with Cursor IDE to enhance your development workflow. It provides tools for log viewing, error searching, Artisan command execution, and model information display directly within your editor.

Installation

Prerequisites

  • PHP 8.1+
  • Laravel 10.0+
  • Cursor IDE
  • UV - Modern Python packaging tools

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/your-username/laravel-mcp.git
    cd laravel-mcp
    
  2. 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
    
  3. Make the script executable:

    chmod +x ~/bin/run-laravel-mcp
    
  4. Add to your PATH:

    echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc  # or ~/.bashrc
    source ~/.zshrc  # or source ~/.bashrc
    

Usage

Available Tools

The Laravel Helpers MCP provides the following tools that can be accessed through Cursor IDE's command palette:

  • View Log Files

    tail_log_file
    

    Displays the most recent entries in your Laravel log file directly in Cursor

  • Search for Errors

    search_log_errors
    

    Search through your log files for specific error patterns with integrated results

  • Run Artisan Commands

    run_artisan_command
    

    Execute Laravel artisan commands directly from Cursor without switching to the terminal

  • Model Information

    show_model
    

    Display model information and relationships in your editor for quick reference

Configuring Your Laravel Path

The MCP server needs to know where your Laravel project is located. You can configure this by either:

  1. Setting the LARAVEL_PATH environment variable before running the server
  2. Modifying the wrapper script created during installation

For projects with multiple Laravel applications, consider creating different wrapper scripts for each project.

Important Note

⚠️ This package is currently in alpha stage. APIs and functionality may change without notice. Use in production at your own risk.

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later