1. Why This Combo Changes Everything
AI coding assistants are powerful, but they have a fundamental problem: they don't know your application. They don't know your database schema, your routes, your installed packages, or your team's conventions. So they guess — and the guesses are often close but wrong. Wrong Eloquent relationships, deprecated method calls, missing middleware.
Laravel Boost solves this by giving AI agents direct access to your application's internals through the Model Context Protocol (MCP). Combined with Claude Code, you get an agent that can inspect your database, read your routes, search Laravel's 17,000+ documentation entries, and even run Tinker commands — all from the terminal. This is Laravel AI-assisted development as it was meant to be.
In this Laravel Boost tutorial, we'll set everything up from scratch, walk through what each MCP tool does, and then use the complete setup to add a real feature to a SaaS app — so you can see the productivity difference firsthand.
2. What Is Laravel Boost?
Laravel Boost is a first-party MCP server from the Laravel team. It's a dev dependency that exposes your application to AI agents through three layers:
- MCP Tools (15+): Functions the AI agent can call to inspect your app — read database schema, list routes, query data, search docs, check logs, run Artisan commands, and more.
- AI Guidelines: Composable instruction files loaded upfront that teach the agent Laravel conventions, best practices, and version-specific patterns for your exact stack.
- Agent Skills: On-demand knowledge modules for specific domains (Livewire, Pest, Inertia, Tailwind, etc.) that are loaded only when relevant, keeping context lean.
The result: your AI agent stops writing generic PHP and starts writing idiomatic Laravel code that matches your specific application. It knows you're on Laravel 12 with Filament 3, Pest 3, and Tailwind 4 — because Boost told it.
3. Installation: Zero to AI-Assisted in 2 Minutes
Boost works with Laravel 10, 11, and 12 on PHP 8.1+. Install it as a dev dependency:
composer require laravel/boost --dev
Then run the installer. It auto-detects your installed packages, your IDE, and your AI agent:
php artisan boost:install
The installer generates several files:
.mcp.json— MCP server configuration for your IDECLAUDE.md— AI guidelines tailored to your project (package versions, conventions)AGENTS.md— Additional agent instructionsboost.json— Boost configuration file.ai/guidelines/— Composable guideline files for detected packages.ai/skills/— Agent skill definitions
These files are auto-generated and can be added to .gitignore since every developer on the team can regenerate them with boost:install. To keep them current after package updates:
php artisan boost:update
Automate this by adding it to your composer.json:
{
"scripts": {
"post-update-cmd": [
"@php artisan boost:update --ansi"
]
}
}
4. Connecting Claude Code
If you selected Claude Code during boost:install, the integration is already configured. The installer generates a .mcp.json at your project root:
// .mcp.json (auto-generated)
{
"mcpServers": {
"laravel-boost": {
"command": "php",
"args": ["artisan", "boost:mcp"]
}
}
}
Claude Code reads this file automatically when you open the project. To verify the connection, launch Claude Code in your project directory:
cd my-saas-app
claude
Claude Code will detect the MCP server and connect to it. You can verify by asking Claude about your app:
# Try these prompts in Claude Code:
> What Laravel version is this project running?
> Show me the database schema for the users table
> List all routes in this application
> What Eloquent models exist in this project?
If the MCP server wasn't auto-detected, register it manually:
claude mcp add -s local -t stdio laravel-boost php artisan boost:mcp
Claude Code also reads the generated CLAUDE.md file at the project root, which contains framework-specific guidelines assembled from your installed packages. This file gives Claude upfront context about your stack without consuming tool calls.
5. The 15 MCP Tools Boost Gives Your Agent
When Claude Code connects to Laravel Boost, it gains access to 15+ specialized tools. Here's what each one does and when Claude uses it:
Application Introspection
- Application Info: Reads your PHP version, Laravel version, database engine, installed ecosystem packages with versions, and Eloquent models. Claude calls this first to understand your stack.
- List Routes: Returns all registered routes with their methods, URIs, controllers, middleware, and names. Essential when Claude needs to understand existing endpoints or add new ones.
- List Artisan Commands: Shows available Artisan commands and their arguments, so Claude can suggest (or run) the right command.
Database Tools
- Database Schema: Reads table structures, columns, types, indexes, and foreign keys. When you ask Claude to create a migration or model, it checks existing schema first.
- Database Query: Executes queries against your database. Claude can verify data exists, check for issues, or understand your data structure before writing code.
- Database Connections: Lists configured database connections, including the default. Useful for multi-database setups.
Configuration & Environment
- Get Config: Reads config values using dot notation (e.g.,
app.timezone,mail.default). Claude checks your config before suggesting changes. - List Available Config Keys: Shows all available configuration keys so Claude knows what's configurable.
- List Available Env Vars: Lists environment variable keys (not values) to understand what's configurable at the environment level.
Debugging Tools
- Last Error: Reads the most recent error from your log files. When something breaks, Claude can diagnose it immediately.
- Read Log Entries: Reads the last N log entries for broader context. Helpful for tracing issues across multiple requests.
- Browser Logs: Reads JavaScript console errors and logs from the browser. Critical for frontend debugging.
Development Tools
- Tinker: Executes arbitrary PHP code within your application context. Claude can test hypotheses, verify behavior, or inspect runtime state.
- Search Docs: Queries the documentation API with 17,000+ indexed entries across Laravel, Livewire, Filament, Pest, Tailwind, and more. Version-aware — it returns docs for your exact installed versions.
- Get Absolute URL: Converts relative paths to absolute URLs, ensuring Claude generates valid links.
The key insight: Claude doesn't use all 15 tools on every request. It intelligently selects the right tools based on your prompt. Ask it to "add a new API endpoint" and it'll check routes, schema, and models. Ask it to "fix this error" and it'll read the logs first.
6. AI Guidelines: Teaching Claude Your Conventions
AI guidelines are composable instruction files that Boost loads into Claude's context at the start of every session. They contain version-specific conventions, best practices, and patterns for your exact stack.
When you run boost:install, Boost detects your installed packages and assembles the relevant guidelines. For a typical Laravel 12 SaaS app with Livewire, Pest, and Tailwind, Claude receives guidelines for:
- Laravel 12.x core conventions
- Livewire 3.x component patterns
- Pest 3.x testing conventions
- Tailwind CSS 4.x utility patterns
- Laravel Pint code style rules
These guidelines are stored in .ai/guidelines/ and compiled into the CLAUDE.md file. The result: when Claude writes a Livewire component, it uses the v3 syntax, not v2. When it writes a test, it uses Pest, not PHPUnit. When it styles a component, it uses your Tailwind version's classes.
Boost also supports guidelines for Filament (3.x, 4.x, 5.x), Inertia (React, Vue, Svelte), Nova (4.x, 5.x), Flux UI, Folio, and many more — all auto-detected from your composer.json.
7. Agent Skills: On-Demand Knowledge Modules
Guidelines are loaded upfront. Skills are different — they're loaded on-demand when Claude needs them for a specific task. This keeps context lean and prevents information overload.
Available built-in skills include:
livewire-development— Livewire component patterns, lifecycle hooks, Alpine interoppest-testing— Test structure, assertions, datasets, architecture testsinertia-react-development— Inertia React pages, forms, shared datainertia-vue-development— Inertia Vue pages, forms, shared datatailwindcss-development— Utility patterns, responsive design, dark modefluxui-development— Flux UI component usage and customizationpennant-development— Feature flags with Laravel Pennantwayfinder-development— Type-safe routing with Wayfindermcp-development— Building MCP servers with Laravel
When you ask Claude to "write a Pest test for the billing controller," it activates the pest-testing skill, which gives it detailed patterns for Laravel-specific test structure, available assertions, and conventions.
8. Real Workflow: Adding a Feature to a SaaS App
Let's see Laravel Boost + Claude Code in action. We'll add a "project archiving" feature to a Laravel SaaS app with multi-tenancy. Watch how Claude uses the MCP tools at each step.
Step 1: Describe the feature
> Add a project archiving feature. Users should be able to archive
and unarchive projects. Archived projects should be hidden from the
default project list but accessible via a filter.
Claude's first move: it calls Application Info to check your stack, then Database Schema to inspect the projects table, and List Routes to see existing project endpoints.
Step 2: Claude generates the migration
Because Claude knows your database schema, it writes the right migration:
// Claude generates this after inspecting the projects table
php artisan make:migration add_archived_at_to_projects_table
// Migration content:
Schema::table('projects', function (Blueprint $table) {
$table->timestamp('archived_at')->nullable()->after('description');
$table->index('archived_at');
});
No guessing about column order, types, or table name. It matched your existing schema.
Step 3: Claude updates the model
Claude reads your existing Project model, sees the BelongsToTeam trait from your multi-tenancy setup, and adds the archiving logic in the right place:
// Claude adds to App\Models\Project:
protected $casts = [
'archived_at' => 'datetime',
];
public function scopeActive(Builder $query): Builder
{
return $query->whereNull('archived_at');
}
public function scopeArchived(Builder $query): Builder
{
return $query->whereNotNull('archived_at');
}
public function archive(): void
{
$this->update(['archived_at' => now()]);
}
public function unarchive(): void
{
$this->update(['archived_at' => null]);
}
public function isArchived(): bool
{
return $this->archived_at !== null;
}
Step 4: Claude generates the controller and routes
Claude checks existing routes and controllers, matches your naming conventions, and adds:
// Routes — matches your existing pattern
Route::post('/projects/{project}/archive', [ProjectController::class, 'archive']);
Route::post('/projects/{project}/unarchive', [ProjectController::class, 'unarchive']);
// Controller methods
public function archive(Project $project)
{
$this->authorize('update', $project);
$project->archive();
return back()->with('success', 'Project archived.');
}
public function unarchive(Project $project)
{
$this->authorize('update', $project);
$project->unarchive();
return back()->with('success', 'Project restored.');
}
Step 5: Claude writes tests
With the pest-testing skill active, Claude generates Pest tests that match your existing test patterns:
test('team members can archive projects', function () {
$user = User::factory()->create();
$team = Team::factory()->create(['owner_id' => $user->id]);
$team->members()->attach($user->id, ['role' => 'owner']);
$user->update(['current_team_id' => $team->id]);
$project = Project::factory()->create(['team_id' => $team->id]);
$this->actingAs($user)
->post("/projects/{$project->id}/archive")
->assertRedirect();
expect($project->fresh()->isArchived())->toBeTrue();
});
test('archived projects are hidden from default list', function () {
$user = User::factory()->create();
$team = Team::factory()->create(['owner_id' => $user->id]);
$team->members()->attach($user->id, ['role' => 'owner']);
$user->update(['current_team_id' => $team->id]);
$active = Project::factory()->create(['team_id' => $team->id]);
$archived = Project::factory()->create([
'team_id' => $team->id,
'archived_at' => now(),
]);
$this->actingAs($user)
->get('/projects')
->assertSee($active->name)
->assertDontSee($archived->name);
});
The entire feature — migration, model, controller, routes, tests — took one prompt and 30 seconds of Claude thinking. Because Boost gave Claude your database schema, route patterns, model conventions, and testing setup, every line of generated code fits your application like it was hand-written.
9. Writing Custom Guidelines and Skills
Boost's built-in guidelines cover the Laravel ecosystem, but your app has its own conventions. Add custom guidelines and skills to teach Claude your specific patterns.
Custom Guidelines
Create guideline files in .ai/guidelines/:
# .ai/guidelines/our-conventions/core.md
## Our SaaS Conventions
### Multi-Tenancy
- All tenant-scoped models MUST use the `BelongsToTeam` trait.
- Never query tenant data without the team scope.
- Use `currentTeam()` helper to access the current team.
### Billing
- The Team model is the Billable entity, not User.
- Check subscription status with `currentTeam()->subscribed('default')`.
- Gate premium features in middleware, not controllers.
### API Design
- All API endpoints must use Laravel Sanctum.
- Return JsonResource classes, never raw arrays.
- Paginate all list endpoints with 20 items per page.
Custom Skills
Create a skill for a specific domain in your app:
# .ai/skills/billing-integration/SKILL.md
---
name: billing-integration
description: Work with the multi-provider billing system (Stripe, Paddle, LemonSqueezy).
---
# Billing Integration
## When to use this skill
Use when working with subscriptions, payments, plans, or billing features.
## Architecture
The billing system uses an abstract billing layer. The Team model
is the Billable entity. Switch providers by changing BILLING_PROVIDER
in .env.
## Key files
- `app/Services/Billing/BillingManager.php` — Provider abstraction
- `app/Models/Team.php` — Billable model with Cashier trait
- `config/billing.php` — Provider configuration
## Patterns
- Always bill the team, never the user
- Use `currentTeam()->newSubscription(...)` for new subscriptions
- Webhook handlers are in `app/Http/Controllers/Webhooks/`
After adding custom guidelines or skills, run php artisan boost:update to regenerate the context files.
10. Other IDE Integrations
While this tutorial focuses on the Laravel Claude Code setup, Boost works with every major AI coding tool. The MCP server is the same — only the IDE configuration differs:
Cursor
# Open command palette (Cmd+Shift+P)
# Type "MCP Settings"
# Toggle on "laravel-boost"
GitHub Copilot (VS Code)
# Open command palette (Cmd+Shift+P)
# Type "MCP: List Servers"
# Select "laravel-boost" → "Start server"
Gemini CLI
gemini mcp add -s project -t stdio laravel-boost php artisan boost:mcp
JetBrains Junie
# Press Shift twice → search "MCP Settings"
# Check the box next to "laravel-boost"
# Click "Apply"
All integrations use the same MCP tools, guidelines, and skills. The experience is consistent regardless of your IDE choice.
11. Tips for Maximum Productivity
1. Be specific with prompts
Instead of "add user settings", say "add a settings page where users can update their name, email, and notification preferences, with a Livewire form that validates and saves to the database." Specific prompts produce better code because Claude can use the right tools.
2. Let Claude inspect first
Claude gets better results when it reads your existing code before writing new code. If Claude doesn't automatically inspect your project, prompt it: "Look at the existing ProjectController and tests, then add the archive feature."
3. Keep your CLAUDE.md lean
Every MCP server and guideline you load eats into Claude's 200k context window. If you have 20 MCP servers, your effective working context can shrink to 70–80k tokens. Use only the tools and guidelines you actually need.
4. Automate boost:update
Add boost:update to your composer.json post-update scripts. When you upgrade a package, Boost automatically updates the guidelines to match the new version. No stale context, no deprecated method suggestions.
5. Write custom skills for your domain
The biggest productivity gains come from teaching Claude your patterns. Invest 15 minutes writing a custom skill for your billing system, your notification system, or your API conventions. It pays off on every future prompt.
12. Conclusion
Laravel Boost + Claude Code is the fastest way to build Laravel applications in 2026. Boost gives Claude deep knowledge of your application — your database, routes, packages, and conventions — while Claude Code provides the agent that can act on that knowledge. Together, they turn a 2-hour feature into a 5-minute conversation.
Here's the complete setup recap:
# 1. Install Boost
composer require laravel/boost --dev
# 2. Run the installer (auto-detects everything)
php artisan boost:install
# 3. Start Claude Code in your project
claude
# 4. Start building
> Add a project archiving feature with tests
Four commands. That's all it takes to go from a standard Laravel project to the most powerful AI-assisted development setup available today. The MCP tools give Claude eyes into your app, the guidelines give it knowledge of your stack, and the skills give it expertise in your domain.
If you're starting a new SaaS project and want to hit the ground running with this setup, LaraSpeed gives you a production-ready foundation that's already optimized for AI-assisted development.