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
Setup instructions
Provider
Jason Allen
Release date
Mar 05, 2025
Language
Python
Stats
12 stars

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.

Installation

Prerequisites

  • PHP 8.1 or higher
  • Laravel 10.0 or higher
  • Cursor IDE
  • UV (Modern Python packaging tools)

Setup Steps

  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. Ensure ~/bin is in your PATH:

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

Features and Usage

Available Tools

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
    

Accessing Tools in Cursor

All tools can be accessed through Cursor's command palette. Simply open the command palette and search for the tool you wish to use.

Alternatives

Note that this project is no longer under development. For a fully featured Laravel MCP server, consider using Laravel Boost.

How to install this MCP server

For Claude Code

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.

For 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 > 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"
        }
    }
}

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

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. 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

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