Laravel Loop
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.
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
Maintainer
Works with
Installation
Manual Installation
npx laravel-loopConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-loopPublish 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"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=trueRegister 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}!")
);
}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-configStart 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=1Test 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:callLaravel 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.
Laravel Loop Alternatives — Similar Developer Tools Servers
Looking for alternatives to Laravel Loop? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Laravel Loop in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.