The MCP server: the cooking robot that serves code to your Laravel.
🍳 MCP and Laravel Boost: Cook Your Code with AI
MCP, short for Models & Context Provider, is the little genius orchestrating your models and contexts. Thanks to it, AI can generate or fix code intelligently and in a Laravel-friendly way.
Why do you need MCP?
It’s simple: coding without AI is like cooking without a spatula. The result: splashes of Where is $user? and How do I install package X? all over the walls.
- AI = the conductor
- MCP = the waiter translating your orders into recipes (code, migrations, tests…)
- Laravel Boost = the chef who invented the recipe (but only cooks in his own restaurant)
Installation and Setup
composer require laravel/boost --dev
php artisan boost:installYour IDE is your kitchen: you prepare your dishes (code) there, and with MCP, you finally get a luxury assistant.
1. PhpStorm
- Press Shift × 2→ opens the Command Palette.
- Type MCP Settings.
- Check laravel-boost.
- Click Apply.
- Look for the ✅ → your server is running.
2. VS Code
- Cmd+Shift+P(Mac) or- Ctrl+Shift+P(Windows).
- Type MCP: List Servers.
- Select laravel-boost.
- Click Start server.
3. Cursor
- Cmd+Shift+P.
- Search for /open MCP Settings.
- Toggle laravel-boost on.
4. Claude Code
- Open a console in the project folder.
- Run:
claude mcp add -s local -t stdio laravel-boost php ./artisan boost:mcp5. Unsupported IDEs
No worries, just add:
- Command: php
- Args: ./artisan boost:mcp
The AI Buffet
Here’s the menu your MCP serves you:
| Tool | Dish | Why? | 
|---|---|---|
| Application Info | Complete cocktail | PHP, Laravel versions, plugins, models | 
| Database Schema | CRUD salad | View schema without opening migrations | 
| Search Docs | Manual soup | Search docs (even offline) | 
| Tinker | Chef at work | Write code on the fly and see instant results | 
| List Routes | Dashboard | The complete menu of your API endpoints | 
How does it work?
- You ask a question.
- AI sends an MCP request (JSON-RPC style).
- The server executes the command php artisan boost:mcp.
- AI returns the result, ready to paste into your IDE.
👉 Example:
php artisan boost:ask "How to add a slug field to the users migration?"When AI goes off track
AI suggests creating an old-school UserController? Politely answer: “No thanks, I prefer RESTful.” And voilà, it serves you a cleaner version. Even when greedy, AI knows to avoid greasy bacon 🥓.
Why is everyone talking about it?
- Fast: answers in an instant.
- Customizable: add your own rules in .ai/guidelines/.
- Efficient: less copy-paste, more creativity.
TL;DR 🍝
Install Laravel Boost → Start the MCP server → Connect your IDE → Let AI cook your code.
Tip: watch your logs, because even the best chef needs a good drizzle of oil!
“AI provides the recipe, but you decide how to serve it to your users.”
 
 
