Laravel Loop

v1.0.0Developer Toolsstable

Laravel Loop is a powerful Model Context Protocol (MCP) server designed specifically for Laravel applications. It connects your Laravel application with AI assistants using the MCP protocol.

laravelmcpmcp-server
Share:
128
Stars
0
Downloads
0
Weekly
0/5

What is Laravel Loop?

Laravel Loop is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to laravel loop is a powerful model context protocol (mcp) server designed specifically for laravel applications. it connects your laravel application with ai assistants using the mcp protocol.

Laravel Loop is a powerful Model Context Protocol (MCP) server designed specifically for Laravel applications. It connects your Laravel application with AI assistants using the MCP protocol.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Laravel Loop is a powerful Model Context Protocol (MCP) serv

Use Cases

Connect Laravel applications with AI assistants via MCP.
Enable AI-driven Laravel development workflows.
LicenseMIT
Languagephp
Versionv1.0.0
UpdatedApr 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx laravel-loop

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Laravel Loop

Laravel Loop is a Model Context Protocol server built specifically for Laravel applications, allowing AI assistants like Claude to interact directly with your Laravel app's models, factories, Filament panels, and custom business logic. It bridges your Laravel backend with AI clients via stdio or HTTP transports, making it easy to build AI-driven development workflows, generate test data, and expose custom tools without leaving the Laravel ecosystem. Developers use it to let AI assistants query Eloquent models, trigger factory seeding, and invoke Stripe integrations all through natural conversation.

Prerequisites

  • PHP 8.1+ with Composer installed
  • A Laravel 10+ application
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Optional: Redis (recommended for production SSE transport)
  • Optional: Laravel Sanctum configured if using HTTP transports with auth middleware
1

Install the Laravel Loop package

Use Composer to add Laravel Loop to your Laravel project. This installs the MCP server package and its dependencies.

composer require kirschbaum-development/laravel-loop
2

Publish the configuration file

Publish the Loop configuration file to your app's config directory so you can customize transport settings, middleware, and driver options.

php artisan vendor:publish --tag="loop-config"
3

Configure transport options

Edit config/loop.php or your .env file to choose between stdio (for local MCP clients), Streamable HTTP, or the legacy SSE transport. For local development, stdio requires no additional setup.

# For Streamable HTTP transport (optional)
LOOP_STREAMABLE_HTTP_ENABLED=true

# For legacy SSE transport (deprecated)
LOOP_SSE_ENABLED=true
4

Register toolkits and custom tools

In your AppServiceProvider or a dedicated service provider, register built-in toolkits (such as the Laravel Model Toolkit or Filament Toolkit) and define any custom tools your AI assistant should have access to.

use Kirschbaum\Loop\Facades\Loop;

public function boot(): void
{
    Loop::toolkit(\Kirschbaum\Loop\ModelTools\ModelToolkit::make());
    Loop::toolkit(\Kirschbaum\Loop\Filament\FilamentToolkit::make());

    // Custom tool example
    Loop::tool(
        CustomTool::make(name: 'greet', description: 'Greet a user by name')
            ->withStringParameter(name: 'name', required: true)
            ->using(fn(string $name) => "Hello, {$name}!")
    );
}
5

Generate the MCP client configuration

Run the artisan command to generate the JSON config snippet you'll paste into your MCP client (Claude Desktop, Claude Code, etc.).

php artisan loop:mcp:generate-config
6

Start the MCP server

Launch the Loop MCP server for a specific user. The --user-id flag authenticates the session so model tools run with that user's permissions.

php artisan loop:mcp:start --user-id=1
7

Test tools locally

Use the loop:mcp:call artisan command to manually invoke any registered tool and verify it responds correctly before connecting a client.

php artisan loop:mcp:call

Laravel Loop Examples

Client configuration

Add this to your claude_desktop_config.json to connect Claude Desktop to Laravel Loop running in your local Laravel project. Adjust the path and user-id as needed.

{
  "mcpServers": {
    "laravel-loop": {
      "command": "php",
      "args": ["/path/to/your/laravel-app/artisan", "loop:mcp:start", "--user-id=1"]
    }
  }
}

Prompts to try

Once connected, try these prompts in your MCP client to interact with your Laravel application.

- "List all users in the database using the User model"
- "Create 5 test users using the User factory"
- "Show me all products with a price above $100"
- "What Filament resources are registered in this application?"
- "Run the greet tool with the name Alice"

Troubleshooting Laravel Loop

Server fails to start with 'Class not found' errors after installation

Run 'composer dump-autoload' to regenerate the class map, then re-run 'php artisan loop:mcp:start'. Also ensure you have published the config with the vendor:publish command.

HTTP transport returns 401 Unauthorized when using LOOP_STREAMABLE_HTTP_ENABLED

The default middleware is auth:sanctum. Either issue a Sanctum API token for the target user, or customize the middleware array in config/loop.php to match your authentication setup.

SSE transport drops connections in production

Switch the SSE driver from 'file' to 'redis' in config/loop.php. File-based drivers are only reliable in single-process development environments.

Frequently Asked Questions about Laravel Loop

What is Laravel Loop?

Laravel Loop is a Model Context Protocol (MCP) server that laravel loop is a powerful model context protocol (mcp) server designed specifically for laravel applications. it connects your laravel application with ai assistants using the mcp protocol. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Laravel Loop?

Follow the installation instructions on the Laravel Loop GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Laravel Loop?

Laravel Loop works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Laravel Loop free to use?

Yes, Laravel Loop is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "laravel-loop": { "command": "npx", "args": ["-y", "laravel-loop"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Laravel Loop?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides