Model Context Protocol (MCP) server for accessing and searching Laravel 12 documentation. Enables AI assistants and tools to query Laravel docs through a standardized interface.
Project description
Laravel Docs MCP Server
⚠️ BETA SOFTWARE - This project is in early development. Features may not work as expected and breaking changes may occur without notice.
Are you creating or modifying a Laravel app? Hook this MCP up to your AI assistant and immediately get access to:
- The latest Laravel documentation, for all versions from 6.x
- Intelligent Laravel package recommendations based on the context from your codebase, and what you're trying to accomplish.
This is like having a very book-smart and up-to-date Laravel dev sit next to you as you code your application.
Update Frequency
This application is written in a way to maximize the value out of GitHub Actions. Every day, it retrieves the latest Laravel documentation for all versions since 6.x (sometimes the old docs get updated too!). If it finds any updates, a new patch release will automatically be generated here and then distributed to both Pypi and GHCR for your consumption. Mmm, delicious.
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+
uvpackage manager (recommended)
Steps
-
Clone the repository:
git clone https://github.com/brianirish/laravel-docs-mcp.git cd laravel-docs-mcp
-
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
Using with AI Clients
Once installed, the MCP server integrates directly with your AI client (Claude Desktop, Cursor, etc.). The server provides Laravel documentation and package recommendation tools that your AI assistant can use automatically.
Smithery (Recommended)
After installing via Smithery, the server is automatically configured with your AI client:
npx -y @smithery/cli install @brianirish/laravel-docs-mcp --client claude
The server runs automatically when your AI client needs it. No manual startup required.
Docker
The Docker container runs the server immediately:
# Basic usage with default settings
docker run ghcr.io/brianirish/laravel-docs-mcp:latest
# Custom configuration with environment variables
docker run -e LOG_LEVEL=DEBUG -e LARAVEL_VERSION=11.x ghcr.io/brianirish/laravel-docs-mcp:latest
# Network transport for remote access
docker run -p 8000:8000 ghcr.io/brianirish/laravel-docs-mcp:latest --transport websocket --host 0.0.0.0 --port 8000
PyPI / Manual Installation
After installing from PyPI or source, start the server manually:
# Basic server start
laravel-docs-server
# Or if installed from source
python laravel_docs_server.py
The server automatically fetches Laravel documentation on first run and can be stopped with Ctrl+C.
Advanced Configuration
For custom deployments, you can configure various 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: latest available) |
--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 Management
Update documentation independently of the server:
# Update documentation for latest version
python docs_updater.py --target-dir ./docs
# Update specific version
python docs_updater.py --target-dir ./docs --version 11.x
# Update all supported versions
python docs_updater.py --all-versions
# Check if update is needed
python docs_updater.py --check-only
# Force update
python docs_updater.py --force
API Reference
Documentation Tools
list_laravel_docs(version: Optional[str])- List documentation files (all versions or specific version)search_laravel_docs(query: str, version: Optional[str])- Search documentation for specific termsupdate_laravel_docs(version: Optional[str], force: bool)- Update documentationlaravel_docs_info(version: Optional[str])- Get documentation version information
Package Recommendation Tools
get_laravel_package_recommendations(use_case: str)- Get package recommendations for a use caseget_laravel_package_info(package_name: str)- Get details about a specific packageget_laravel_package_categories(category: str)- List packages in a specific categoryget_features_for_laravel_package(package: str)- Get available features for a package
Features and Roadmap
Current Features (v0.2.0)
- ✅ Multi-Version Support: Access documentation for Laravel 6.x through latest version simultaneously
- ✅ Future-Proof Version Detection: Automatically detects and supports new Laravel releases (13.x, 14.x, etc.)
- ✅ 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
Upcoming Features
- 🔧 v0.3.0: Comprehensive testing, performance optimization, enhanced error handling
- 🔍 v0.4.0: Semantic search, code example extraction, cross-version comparison
- 📦 v0.5.0: Extended Laravel ecosystem support, community package integration
- 🎯 v0.6.0: Project analysis, personalized recommendations, migration assistance
- 🚀 v1.0.0: The definitive Laravel documentation companion
For detailed roadmap information, see ROADMAP.md.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laravel_docs_mcp-0.2.4.tar.gz.
File metadata
- Download URL: laravel_docs_mcp-0.2.4.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d975985886e9545f35d11c7201f3e518109ee5c03e7628df57144aaacd885c8f
|
|
| MD5 |
cc8ce69a4139a38c068a641dc322525f
|
|
| BLAKE2b-256 |
5ba7c2cdd29055dc5f191a9d800800d8822b9d3f7a0d59e56e94538795d3565a
|
Provenance
The following attestation bundles were made for laravel_docs_mcp-0.2.4.tar.gz:
Publisher:
release.yaml on brianirish/laravel-docs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laravel_docs_mcp-0.2.4.tar.gz -
Subject digest:
d975985886e9545f35d11c7201f3e518109ee5c03e7628df57144aaacd885c8f - Sigstore transparency entry: 241937876
- Sigstore integration time:
-
Permalink:
brianirish/laravel-docs-mcp@8e454fc04420f7cb98334aa9f1d6a4e2134f0011 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/brianirish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8e454fc04420f7cb98334aa9f1d6a4e2134f0011 -
Trigger Event:
release
-
Statement type:
File details
Details for the file laravel_docs_mcp-0.2.4-py3-none-any.whl.
File metadata
- Download URL: laravel_docs_mcp-0.2.4-py3-none-any.whl
- Upload date:
- Size: 4.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d5f65657de19d6432d6473c7d018a3ee2cd18dd8b2118635a8b86e071bd7d09
|
|
| MD5 |
0726e394fd4a2f2cc8e5e8322ac6b3f3
|
|
| BLAKE2b-256 |
37f5a40143b6e2b3d7c89d4a4eba027fe3e3aedc95ee62d67f191e6615753c5b
|
Provenance
The following attestation bundles were made for laravel_docs_mcp-0.2.4-py3-none-any.whl:
Publisher:
release.yaml on brianirish/laravel-docs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
laravel_docs_mcp-0.2.4-py3-none-any.whl -
Subject digest:
4d5f65657de19d6432d6473c7d018a3ee2cd18dd8b2118635a8b86e071bd7d09 - Sigstore transparency entry: 241937895
- Sigstore integration time:
-
Permalink:
brianirish/laravel-docs-mcp@8e454fc04420f7cb98334aa9f1d6a4e2134f0011 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/brianirish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8e454fc04420f7cb98334aa9f1d6a4e2134f0011 -
Trigger Event:
release
-
Statement type: