Get the FREE Ultimate OpenClaw Setup Guide →

clockwork

MCP server for Laravel Clockwork - debug and analyze Laravel applications with AI assistance. Query performance, N+1 detection, cache analysis, and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio fridzema-clockwork-mcp npx -y clockwork-mcp \
  --env CLOCKWORK_PHP_PATH="Custom PHP binary path (default: php)" \
  --env CLOCKWORK_PROJECT_PATH="Path to Laravel project root (auto-detect if not set)" \
  --env CLOCKWORK_STORAGE_PATH="Direct path to storage for file driver (optional)" \
  --env CLOCKWORK_STORAGE_DRIVER="Storage driver (auto-detect or 'artisan'/'file')"

How to use

This MCP server integrates Clockwork debugging data from a Laravel application into Claude Code, allowing you to inspect requests, queries, and runtime behavior directly from Claude. It exposes tools to list requests, examine queries, analyze performance, and detect N+1 patterns, errors, and other issues across recent requests. Use the provided slash commands or the Claude Code UI to trigger data analysis, navigate through request histories, and compare performance across endpoints. The server is configured to work with Clockwork backends (file, database, Redis, etc.) and will leverage the configured storage through Clockwork’s APIs to fetch relevant debugging information.

How to install

Prerequisites:

  • Node.js v18+ installed on the machine running the MCP server
  • Access to your Claude Code environment where MCP servers are configured

Installation steps:

  1. Install the MCP package (if not already present) by running the recommended installation command in your environment (as per your platform).
  2. Add the MCP configuration snippet for Clockwork (as shown in mcp_config) to your Claude Code MCP settings.
  3. Ensure Clockwork is installed in your Laravel project (see Quick Start in the repository):
    • composer require itsgoingd/clockwork
  4. Start your MCP server configuration and verify it’s reachable from Claude Code. Test with a sample request in Claude to confirm data is being retrieved from Clockwork.

Prerequisites recap:

  • Node.js 18+ installed
  • Laravel project with Clockwork installed or accessible
  • Network access between Claude Code and the MCP server

Additional notes

Tips and common issues:

  • If CLOCKWORK_PROJECT_PATH is not set, the MCP will attempt to auto-detect the Laravel project by locating an artisan file in the current or parent directories.
  • When using SQL or Redis storage for Clockwork, the MCP will execute PHP Artisan commands through tinker to access data; ensure PHP CLI is available and properly configured.
  • If you see authentication or access errors, verify that Clockwork is correctly configured in your Laravel app and that the MCP server has network access to the hosting environment.
  • The npm package name for this server is clockwork-mcp; keep it updated to gain improvements and bug fixes.
  • You can use the MCP-provided slash commands to quickly check status, latest requests, slow queries, and N+1 patterns.

Related MCP Servers

Sponsor this space

Reach thousands of developers