Laravel AI MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm start
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add laravel-ai -- node "<FULL_PATH_TO_MCP_LARAVEL>/dist/index.js"

Replace <FULL_PATH_TO_MCP_LARAVEL>/dist/index.js with the actual folder you prepared in step 1.

README.md

Provides AI assistants with direct access to Laravel documentation and rules.

Laravel AI - MCP Server

MCP (Model Context Protocol) server for providing Laravel AI documentation to Claude Code and other AI assistants.

šŸš€ Quick Start

1. Install Dependencies

# Clone or navigate to the project directory
cd laravel-ai
npm install

2. Start MCP Server

npm start

Documentation is expected to be in: ./docs (relative to project root)

āš™ļø Claude Code Configuration

Add to your Claude Code settings (~/.config/claude-code/config.json):

{
  "mcpServers": {
    "laravel-ai": {
      "command": "node",
      "args": ["path/to/laravel-ai/index.js"]
    }
  }
}

Alternative: With Custom Docs Path

If your documentation is in a different location:

{
  "mcpServers": {
    "laravel-ai": {
      "command": "node",
      "args": ["path/to/laravel-ai/index.js"],
      "env": {
        "DOCS_PATH": "/path/to/your/docs"
      }
    }
  }
}

šŸ› ļø Available Tools

Tool Description
get_doc_structure Get all documentation files structure
read_doc Read a specific documentation file
search_docs Search across all documentation
get_quick_reference Get all coding rules (quick-reference.md)
get_templates Get CRUD templates (specific or all)
get_checklist Get validation checklist (specific layer or all)
get_domain_examples Get domain-specific examples
get_design_system Get design system documentation

šŸ“ Documentation Structure

laravel-ai/
ā”œā”€ā”€ docs/                          # Documentation folder
│   ā”œā”€ā”€ ai/
│   │   ā”œā”€ā”€ quick-reference.md    # All coding rules
│   │   ā”œā”€ā”€ templates.md           # Implementation templates
│   │   └── checklist.md           # Validation checklist
│   ā”œā”€ā”€ domains/
│   │   ā”œā”€ā”€ ecommerce/             # E-commerce examples
│   │   ā”œā”€ā”€ hr/                    # HR examples
│   │   └── tourism/               # Tourism examples
│   ā”œā”€ā”€ patterns/                  # Pattern documentation
│   └── design-system.md          # Design system (configurable)
ā”œā”€ā”€ index.js                       # MCP server
ā”œā”€ā”€ package.json                   # Dependencies
└── README.md                      # This file

šŸ’” Usage Examples

For AI Assistant

When user says "pelajari docs", AI should:

// 1. Get quick reference
mcp.call_tool('get_quick_reference')

// 2. Get templates
mcp.call_tool('get_templates', { template_type: 'all' })

// 3. Get checklist
mcp.call_tool('get_checklist', { layer: 'all' })

// 4. Confirm ready

Search Documentation

// Search for "transaction"
mcp.call_tool('search_docs', { query: 'transaction' })

Get Domain Examples

// Get e-commerce examples
mcp.call_tool('get_domain_examples', { domain: 'ecommerce' })

// Get all domains overview
mcp.call_tool('get_domain_examples', { domain: 'all' })

šŸ”§ Development

Watch Mode

npm run dev

Testing

Test the MCP server manually:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node index.js

šŸ“ Notes

  • This server uses stdio transport for communication
  • All documentation is read from the file system
  • No caching - always reads latest documentation
  • Supports incremental updates to documentation

šŸ”„ Updates

When documentation is updated, just restart the MCP server:

# Stop current server (Ctrl+C)
npm start

Version: 1.0.0 Last Updated: 2026-02-23

Tools (8)

get_doc_structureGet all documentation files structure
read_docRead a specific documentation file
search_docsSearch across all documentation
get_quick_referenceGet all coding rules (quick-reference.md)
get_templatesGet CRUD templates (specific or all)
get_checklistGet validation checklist (specific layer or all)
get_domain_examplesGet domain-specific examples
get_design_systemGet design system documentation

Environment Variables

DOCS_PATHCustom path to the documentation directory

Configuration

claude_desktop_config.json
{"mcpServers": {"laravel-ai": {"command": "node", "args": ["path/to/laravel-ai/index.js"]}}}

Try it

→Search the documentation for how to handle database transactions.
→Get the coding rules for our project from the quick reference.
→Show me the CRUD templates available for our Laravel project.
→Retrieve the e-commerce domain examples to help with my current feature.
→Get the validation checklist for the service layer.

Frequently Asked Questions

What are the key features of Laravel AI?

Direct access to local Laravel documentation and coding rules. Search functionality across all documentation files. Retrieval of CRUD implementation templates. Access to domain-specific code examples and design system guides. Validation checklist retrieval for specific application layers.

What can I use Laravel AI for?

Onboarding developers to project-specific Laravel coding standards. Quickly retrieving boilerplate code templates for CRUD operations. Ensuring code quality by checking against project-specific validation checklists. Referencing domain-specific architectural patterns during feature development.

How do I install Laravel AI?

Install Laravel AI by running: npm install && npm start

What MCP clients work with Laravel AI?

Laravel AI works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Laravel AI docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare