npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

laravel-dusk-mcp

v1.0.0

Published

MCP server for Laravel Dusk browser testing

Readme

Laravel Dusk MCP Server

A Model Context Protocol (MCP) server that provides browser testing capabilities for Laravel applications through Laravel Dusk. This server allows AI assistants like Claude to run and manage browser tests in any Laravel project.

Features

  • Run Laravel Dusk browser tests with various options
  • List all available Dusk test files
  • Check Dusk environment configuration
  • Manage test artifacts (screenshots and logs)
  • Install/update ChromeDriver
  • Start Laravel development server for testing
  • Automatic Laravel project detection and validation
  • Support for multiple Laravel projects

Installation

Using npx (no installation required)

You can use the MCP server directly with npx without installing it:

{
  "mcpServers": {
    "laravel-dusk": {
      "command": "npx",
      "args": ["laravel-dusk-mcp"]
    }
  }
}

Local Installation

  1. Clone this repository:
git clone https://github.com/bm2ilabs/laravel-dusk-mcp.git
cd laravel-dusk-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Global Installation

npm install -g laravel-dusk-mcp

Usage

With Claude Desktop

Add the server to your Claude Desktop configuration file:

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

Using npx (recommended)

{
  "mcpServers": {
    "laravel-dusk": {
      "command": "npx",
      "args": ["laravel-dusk-mcp"],
      "env": {
        "LARAVEL_PATH": "/path/to/your/laravel/project"
      }
    }
  }
}

Using local installation

{
  "mcpServers": {
    "laravel-dusk": {
      "command": "node",
      "args": ["/path/to/laravel-dusk-mcp/dist/index.js"],
      "env": {
        "LARAVEL_PATH": "/path/to/your/laravel/project"
      }
    }
  }
}

The LARAVEL_PATH environment variable is optional. If not provided, the server will:

  1. Check if the current directory is a Laravel project
  2. Search common locations for Laravel projects
  3. Allow you to set the project path using the set_laravel_project tool

Minimal Configuration

For the simplest setup with npx:

{
  "mcpServers": {
    "laravel-dusk": {
      "command": "npx",
      "args": ["laravel-dusk-mcp"]
    }
  }
}

Then use the set_laravel_project tool to specify your Laravel project.

Available Tools

Project Management

  • set_laravel_project: Set the Laravel project path to work with

    • Parameters:
      • path (required): Absolute path to the Laravel project
  • list_laravel_projects: List all Laravel projects found on the system

    • Shows which projects have Dusk installed

Testing Tools

  • run_dusk_test: Run Laravel Dusk browser tests

    • Parameters:
      • test (optional): Specific test file or method to run
      • filter (optional): Filter tests by name pattern
      • group (optional): Run tests in a specific group
      • headless (optional, default: true): Run tests in headless mode
  • list_dusk_tests: List all available Dusk test files

  • check_dusk_environment: Verify Dusk environment configuration

    • Checks for:
      • Laravel Dusk installation
      • .env.dusk.local file
      • ChromeDriver installation
      • Browser tests directory

Maintenance Tools

  • clear_dusk_screenshots: Clear all Dusk screenshot files

  • install_chrome_driver: Install or update ChromeDriver

    • Parameters:
      • version (optional): Specific ChromeDriver version
  • start_dev_server: Start Laravel development server for tests

    • Parameters:
      • port (optional, default: 8000): Port number

Resources

The server provides access to test artifacts:

  • Screenshots: Access test failure screenshots (image/png)
  • Logs: Access Dusk test logs (text/plain)

Development

To run the server in development mode:

npm run dev

Requirements

  • Node.js 16 or higher
  • Laravel project with Dusk installed
  • Chrome/Chromium browser
  • ChromeDriver (can be installed via the server)

Laravel Dusk Setup

If Dusk is not installed in your Laravel project:

  1. Install Dusk:
composer require laravel/dusk --dev
  1. Install Dusk in your Laravel application:
php artisan dusk:install
  1. Configure your environment:
    • Copy .env to .env.dusk.local for Dusk-specific settings
    • Set APP_URL to match your test server URL

Common Issues

  1. ChromeDriver version mismatch: Use the install_chrome_driver tool to update ChromeDriver

  2. Tests failing with "Connection refused": Ensure the Laravel development server is running using the start_dev_server tool

  3. Dusk not found: Install Dusk in your Laravel project using Composer

License

MIT