Skip to main content
Glama

Laravel 12 Docs MCP Server

by brianirish

Laravel Docs MCP Server

⚠️ Alpha Software - This project is in early development. Features may not work as expected and breaking changes may occur without notice.

An AI assistant for Laravel developers that provides access to the latest Laravel documentation and intelligent package recommendations through the Model Context Protocol (MCP). This enables AI tools to help you build Laravel applications with up-to-date information and best practices.

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

Install from PyPI

pip install laravel-docs-mcp

Docker

# Pull and run the latest version docker run -p 8000:8000 ghcr.io/brianirish/laravel-docs-mcp:latest # Or run a specific version docker run -p 8000:8000 ghcr.io/brianirish/laravel-docs-mcp:v0.1.4

Manual Installation from Source

Prerequisites
  • Python 3.12+
  • uv package manager (recommended)
Steps
  1. Clone the repository:
    git clone https://github.com/brianirish/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

OptionDescription
--docs-path PATHDocumentation directory path (default: ./docs)
--server-name NAMEServer name (default: LaravelDocs)
--log-level LEVELLog level: DEBUG, INFO, WARNING, ERROR, CRITICAL (default: INFO)
--transport TYPETransport method: stdio, websocket, sse (default: stdio)
--host HOSTHost to bind to (network transport)
--port PORTPort to listen on (network transport)
--version VERSIONLaravel version branch (default: 12.x)
--update-docsUpdate documentation before starting
--force-updateForce 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

Automated Workflows

This project includes several automated GitHub Actions workflows:

Daily Documentation Updates

  • Trigger: Every day at midnight UTC (can also be triggered manually)
  • Process: Checks for Laravel documentation updates → Creates PR → Auto-merges → Creates patch version tag
  • Result: Automatic patch releases when Laravel docs are updated

Release Publishing

  • Trigger: When version tags are pushed (e.g., v0.1.4)
  • Process: Builds packages → Publishes to PyPI → Builds and pushes Docker images to GHCR
  • Result: Synchronized releases across PyPI and Docker Hub

Dynamic Versioning

  • Version Source: Automatically derived from git tags using hatch-vcs
  • Development Builds: Get unique identifiers (e.g., 0.1.3.dev1+g75aec71)
  • Release Builds: Clean version numbers matching tags (e.g., 0.1.4)

Features and Roadmap

Current Features:

  • Daily Documentation Updates: Automatically syncs with Laravel's GitHub repository every day
  • Dynamic Versioning: Automatic version management based on git tags
  • Automated Releases: Patch releases triggered by documentation updates
  • Multiple Deployment Options: PyPI package, Docker images, and Smithery marketplace
  • Package Recommendations: Intelligent suggestions based on specific use cases
  • Implementation Guidance: Detailed information for common Laravel packages
  • Flexible Configuration: Support for multiple Laravel versions and transport methods
  • Graceful Shutdown: Proper cleanup and signal handling

Planned Features:

  • 🔄 Multi-version support (access documentation for multiple Laravel versions simultaneously)
  • 🔍 User project analysis for tailored recommendations
  • 🚀 Enhanced search capabilities with semantic matching
  • 📊 Usage analytics and insights
  • 🔗 Additional Laravel ecosystem integrations

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
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

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.

  1. Overview
    1. Installation
      1. Quick Install via Smithery
      2. Install from PyPI
      3. Docker
      4. Manual Installation from Source
    2. Usage
      1. Starting the Server
      2. Command Line Options
      3. Documentation Updater
    3. API Reference
      1. Client Example
      2. Available Tools
      3. Resource Access
    4. Automated Workflows
      1. Daily Documentation Updates
      2. Release Publishing
      3. Dynamic Versioning
    5. Features and Roadmap
      1. License
        1. Contributing
          1. Acknowledgements

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server utilizing Claude AI for generating intelligent queries and offering documentation assistance based on API documentation analysis.
              Last updated -
              3
              2
              TypeScript
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables AI assistants like Claude to interact with Outline document services, supporting document searching, reading, creation, editing, and comment management.
              Last updated -
              25
              1
              Python
              MIT License
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables AI assistants like Claude to access and search Atlassian Confluence content, allowing integration with your organization's knowledge base.
              Last updated -
              5
              1,071
              7
              TypeScript
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables AI assistants to interact with Confluence content, supporting operations like retrieving, searching, creating, and updating pages and spaces.
              Last updated -
              9
              3
              TypeScript
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/brianirish/laravel-docs-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server