Skip to main content
Glama

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)

Related MCP server: directory-indexer

βš™οΈ 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

Available Tools

8 tools
get_checklistC

Get code validation checklist

Inputs: layer.

get_design_systemC

Get design system documentation

Inputs: no named parameters.

get_doc_structureB

Get the structure of all available documentation files

Inputs: no named parameters.

get_domain_examplesC

Get domain-specific implementation examples

Inputs: domain.

get_quick_referenceB

Get the quick reference documentation (all coding rules)

Inputs: no named parameters.

get_templatesC

Get implementation templates for CRUD operations

Inputs: template_type.

read_docC

Read a specific documentation file

Inputs: file_path (required).

search_docsC

Search for content across all documentation files

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 8 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. The tools target different aspects of documentation retrieval: checklists, design systems, structures, examples, references, templates, specific files, and search. There is no overlap in functionality.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern using snake_case. Each name starts with 'get_' or a similar verb ('read_', 'search_') followed by a descriptive noun, making the set predictable and readable.

    Tool Count5/5

    With 8 tools, the server is well-scoped for its purpose of providing Laravel documentation and resources. Each tool earns its place by covering a specific aspect of documentation retrieval, avoiding bloat or thinness.

    Completeness5/5

    The tool surface is complete for the domain of documentation access, covering all key operations: retrieving specific files, searching, getting structured overviews, examples, templates, and references. There are no obvious gaps that would hinder an agent's workflow.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Provides AI assistants with intelligent access to project documentation and API references through smart search, contextual rules, and Docset integration. Enables AI to understand project-specific conventions, patterns, and official framework documentation without token limits.
      11
      49 npm
      6
      MIT