Laravel 12 Docs MCP Server

Laravel 12 Docs MCP Server

A Model Context Protocol server that provides AI assistants and language models with access to Laravel 12 documentation, allowing them to list, read, and search through documentation files.

Category
Visit Server

README

Laravel Docs MCP Server

smithery badge

A Model Context Protocol (MCP) server that provides access to Laravel documentation and package recommendations for AI assistants and language models.

Overview

This server enables AI assistants to access Laravel documentation and package recommendations using the Model Context Protocol (MCP). It allows AI tools to:

  • Access and search Laravel documentation
  • Receive package recommendations based on specific use cases
  • Get implementation guidance for popular Laravel packages
  • Automatically update documentation from Laravel's GitHub repository

Installation

Quick Install via Smithery

npx -y @smithery/cli install @brianirish/laravel-docs-mcp --client claude

Manual Installation

Prerequisites

  • Python 3.12+
  • uv package manager (recommended)

Steps

  1. Clone the repository:

    git clone https://github.com/yourusername/laravel-docs-mcp.git
    cd laravel-docs-mcp
    
  2. Set up environment and install dependencies:

    # Create and activate virtual environment
    uv venv
    source .venv/bin/activate  # Linux/macOS
    # or
    .venv\Scripts\activate     # Windows
    
    # Install dependencies
    uv pip install .
    

Usage

Starting the Server

python laravel_docs_server.py

The server automatically fetches Laravel documentation on first run and can be stopped with Ctrl+C.

Command Line Options

Option Description
--docs-path PATH Documentation directory path (default: ./docs)
--server-name NAME Server name (default: LaravelDocs)
--log-level LEVEL Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL (default: INFO)
--transport TYPE Transport method: stdio, websocket, sse (default: stdio)
--host HOST Host to bind to (network transport)
--port PORT Port to listen on (network transport)
--version VERSION Laravel version branch (default: 12.x)
--update-docs Update documentation before starting
--force-update Force documentation update

Example with custom options:

python laravel_docs_server.py --docs-path /path/to/docs --version 11.x --update-docs --transport websocket --host localhost --port 8000

Documentation Updater

You can update the documentation separately:

# Update documentation
python docs_updater.py --target-dir ./docs --version 12.x

# Check if update is needed
python docs_updater.py --check-only

# Force update
python docs_updater.py --force

API Reference

Client Example

import asyncio
from fastmcp import Client

async def main():
    client = Client("path/to/laravel_docs_server.py")
    
    async with client:
        # List documentation
        result = await client.call_tool("list_docs", {})
        print(result)
        
        # Search documentation
        result = await client.call_tool("search_docs", {"query": "routing"})
        print(result)
        
        # Get package recommendations
        result = await client.call_tool("get_package_recommendations", 
                                       {"use_case": "implementing subscription billing"})
        print(result)
        
        # Read documentation
        resource = await client.read_resource("laravel://routing.md")
        print(resource)

if __name__ == "__main__":
    asyncio.run(main())

Available Tools

Documentation Tools

  • list_docs() - List all documentation files
  • search_docs(query: str) - Search documentation for specific terms
  • update_docs(version: Optional[str], force: bool) - Update documentation
  • docs_info() - Get documentation version information

Package Recommendation Tools

  • get_package_recommendations(use_case: str) - Get package recommendations for a use case
  • get_package_info(package_name: str) - Get details about a specific package
  • get_package_categories(category: str) - List packages in a specific category
  • get_features_for_package(package: str) - Get available features for a package

Resource Access

Documentation files can be accessed as resources using:

laravel://{path}

Examples:

  • laravel://routing.md
  • laravel://authentication.md

Features and Roadmap

Current Features:

  • ✅ Dynamic documentation updates from Laravel's GitHub repository
  • ✅ Graceful shutdown handling
  • ✅ Version flexibility through command-line options
  • ✅ Package recommendations based on use cases
  • ✅ Implementation guidance for common Laravel packages
  • ✅ Docker deployment support

Planned Features:

  • Multi-version support (access documentation for multiple Laravel versions simultaneously)
  • User project analysis for tailored recommendations

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Acknowledgements

  • Laravel for their excellent documentation
  • Laravel package authors for their contributions to the ecosystem

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured