Skip to main content
Please wait...
Image

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:install

Your IDE is your kitchen: you prepare your dishes (code) there, and with MCP, you finally get a luxury assistant.

1. PhpStorm

  1. Press Shift × 2 → opens the Command Palette.
  2. Type MCP Settings.
  3. Check laravel-boost.
  4. Click Apply.
  5. Look for the ✅ → your server is running.

2. VS Code

  1. Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows).
  2. Type MCP: List Servers.
  3. Select laravel-boost.
  4. Click Start server.

3. Cursor

  1. Cmd+Shift+P.
  2. Search for /open MCP Settings.
  3. Toggle laravel-boost on.

4. Claude Code

  1. Open a console in the project folder.
  2. Run:
claude mcp add -s local -t stdio laravel-boost php ./artisan boost:mcp

5. Unsupported IDEs

No worries, just add:

  • Command: php
  • Args: ./artisan boost:mcp

The AI Buffet

Here’s the menu your MCP serves you:

ToolDishWhy?
Application InfoComplete cocktailPHP, Laravel versions, plugins, models
Database SchemaCRUD saladView schema without opening migrations
Search DocsManual soupSearch docs (even offline)
TinkerChef at workWrite code on the fly and see instant results
List RoutesDashboardThe complete menu of your API endpoints
🧑‍🍳 Chef’s note: some tools are very powerful. Check your permissions before serving them in production.

How does it work?

  1. You ask a question.
  2. AI sends an MCP request (JSON-RPC style).
  3. The server executes the command php artisan boost:mcp.
  4. 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.”

Happy coding, and may your MCP always find the next flavor! 🍳💡

Add new comment

Restricted HTML

  • You can align images (data-align="center"), but also videos, blockquotes, and so on.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.