> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Laravel and AI development

> Laravel is the ideal framework for AI-assisted development. Leverage Laravel Boost's MCP server integration, AI guidelines, and documentation search API to unlock the full potential of your AI coding agents.

## Why Laravel is well-suited to AI development

AI coding agents such as [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Cursor](https://cursor.com), and [GitHub Copilot](https://github.com/features/copilot) dramatically accelerate code generation, debugging, and refactoring. However, to get the most out of an agent, the agent needs to be able to accurately understand your codebase.

Laravel has an edge over other frameworks in this respect. Because of its convention-based design, when you ask "add a controller," the agent already knows where to put it. When you ask "create a migration," it can predict the naming convention and file location. This consistency removes the "ambiguity" that confuses AI tools.

Features such as Eloquent relationships, form requests, and middleware follow patterns that agents can reliably understand and reproduce. As a result, the code they generate is not a patchwork of generic PHP snippets, but idiomatic code that reads as if it were written by an experienced Laravel developer.

## Laravel Boost

[Laravel Boost](https://github.com/laravel/boost) is a package that bridges AI coding agents and your Laravel application. Boost operates as an **MCP (Model Context Protocol) server** and, through more than 15 dedicated tools, gives agents a deep understanding of your application's structure, database, routes, and more.

Boost provides three main capabilities:

<Columns>
  <Card title="MCP tools" icon="wrench">
    More than 15 tools for inspecting and manipulating your application—everything from checking the database schema to running Artisan commands.
  </Card>

  <Card title="AI guidelines" icon="book-open">
    AI guidelines designed for the Laravel ecosystem. They communicate best practices for writing idiomatic code to the agent.
  </Card>

  <Card title="Documentation search API" icon="magnifying-glass">
    Search more than 17,000 Laravel-specific docs. It provides accurate information that matches the versions of the packages you have installed.
  </Card>
</Columns>

### Installation

Boost runs on Laravel 10, 11, 12, and 13 with PHP 8.1 or higher. First, add it as a development dependency.

<Steps>
  <Step title="Install the package">
    ```shell theme={null}
    composer require laravel/boost --dev
    ```
  </Step>

  <Step title="Run the interactive installer">
    ```shell theme={null}
    php artisan boost:install
    ```

    The installer automatically detects your IDE and AI agent. When you choose the integrations you want to use, it generates the necessary configuration files, such as `.mcp.json` for the MCP server and the guideline files.
  </Step>
</Steps>

<Info>
  It's fine to add generated files such as `.mcp.json`, `CLAUDE.md`, and `boost.json` to `.gitignore` if each developer wants to configure their own environment.
</Info>

### Available MCP tools

The tools Boost exposes to the agent include the following:

| Tool                   | Description                                                                                             |
| ---------------------- | ------------------------------------------------------------------------------------------------------- |
| Application inspection | Check PHP and Laravel versions, installed packages, and configuration and environment variables         |
| Database tools         | Inspect schema, run read-only queries, and understand data structures                                   |
| Route inspection       | List all registered routes, including middleware, controllers, and parameters                           |
| Artisan commands       | Explore available Artisan commands and their arguments. The agent can suggest and run the right command |
| Log analysis           | Read and analyze application log files to help with debugging                                           |
| Browser logs           | Access browser console logs and errors when using Laravel's frontend tooling                            |
| Tinker integration     | Execute PHP code within the application context via Laravel Tinker to verify behavior                   |
| Documentation search   | Search Laravel ecosystem documentation matching the versions of installed packages                      |

### AI guidelines

Boost's AI guidelines are a set of coding conventions designed for the Laravel ecosystem. They teach the agent how to write idiomatic Laravel code, framework conventions, and how to avoid common pitfalls. The guidelines are automatically combined based on the versions of packages you have installed.

Examples of supported packages:

* Livewire (2.x, 3.x, 4.x)
* Inertia.js (React, Svelte, Vue variants)
* Tailwind CSS (3.x, 4.x)
* Filament (3.x, 4.x)
* PHPUnit, Pest PHP, Laravel Pint, and more

When you run `boost:install`, it detects the packages you use based on `composer.json` and merges the relevant guidelines into the AI context file.

### Agent Skills

[Agent Skills](https://agentskills.io/home) are lightweight knowledge modules that agents load on demand as needed. Unlike guidelines, which are loaded up front, Skills are activated only when you're working in a specific domain. This prevents context bloat and improves the accuracy of generated code.

Skills are available for popular packages such as Livewire, Inertia, Tailwind CSS, and Pest. When you select the Skills feature during `boost:install`, they are installed automatically based on the contents of `composer.json`.

### Documentation search API

Boost's documentation API lets agents search more than 17,000 Laravel ecosystem docs. Unlike general web search, it is indexed and vectorized according to the versions of packages you have installed.

When the agent wants to look up how a feature works, it can use this API to retrieve accurate, version-specific information. This solves the problem of agents suggesting deprecated methods or syntax from older framework versions.

### Supported agents

Boost supports major IDEs and AI tools that support the Model Context Protocol.

<Columns>
  <Card title="Cursor" icon="arrow-pointer" href="https://cursor.com" />

  <Card title="Claude Code" icon="terminal" href="https://docs.anthropic.com/en/docs/claude-code" />

  <Card title="GitHub Copilot" icon="github" href="https://github.com/features/copilot" />

  <Card title="Gemini CLI" icon="arrow-right" href="https://github.com/google-gemini/gemini-cli" />

  <Card title="Codex" icon="arrow-right" href="https://openai.com/codex" />

  <Card title="Junie" icon="arrow-right" href="https://www.jetbrains.com/junie/" />
</Columns>

For detailed setup instructions for each agent, refer to the [Set Up Your Agents section in the Boost documentation](https://laravel.com/docs/boost#set-up-your-agents).

## Next steps

<Card title="Laravel Boost official documentation" icon="book-open-cover" href="https://laravel.com/docs/boost">
  For detailed integration instructions with each agent, an MCP tools reference, and guideline customization, see the official documentation.
</Card>


## Related topics

- [Laravel AI SDK](/en/ai-sdk.md)
- [Laravel PAO — output optimization for AI agents](/en/blog/pao-introduction.md)
- [Laravel Agent Detector — AI agent detection package](/en/blog/agent-detector-introduction.md)
- [laravel/agent-skills — Laravel's official AI agent skills](/en/blog/agent-skills-introduction.md)
- [Laravel Boost](/en/boost.md)
