Laravel MCP Companion
Laravel Docs MCP Server
⚠️ Alpha-Software – Dieses Projekt befindet sich in der frühen Entwicklungsphase. Funktionen funktionieren möglicherweise nicht wie erwartet und es können ohne vorherige Ankündigung schwerwiegende Änderungen auftreten.
Ein KI-Assistent für Laravel-Entwickler, der über das Model Context Protocol (MCP) Zugriff auf die neueste Laravel-Dokumentation und intelligente Paketempfehlungen bietet. Dadurch unterstützen KI-Tools Sie beim Erstellen von Laravel-Anwendungen mit aktuellen Informationen und Best Practices.
Überblick
Dieser Server ermöglicht KI-Assistenten den Zugriff auf Laravel-Dokumentation und Paketempfehlungen über das Model Context Protocol (MCP). KI-Tools können damit:
Zugriff auf und Suche in der Laravel-Dokumentation
Erhalten Sie Paketempfehlungen basierend auf bestimmten Anwendungsfällen
Erhalten Sie Implementierungsanleitungen für beliebte Laravel-Pakete
Automatische Aktualisierung der Dokumentation aus dem GitHub-Repository von Laravel
Related MCP server: Apple Doc MCP
Installation
Schnellinstallation über Smithery
npx -y @smithery/cli install @brianirish/laravel-docs-mcp --client claudeVon PyPI installieren
pip install laravel-docs-mcpDocker
# 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.4Manuelle Installation von der Quelle
Voraussetzungen
Python 3.12+
uv-Paketmanager (empfohlen)
Schritte
Klonen Sie das Repository:
git clone https://github.com/brianirish/laravel-docs-mcp.git cd laravel-docs-mcpUmgebung einrichten und Abhängigkeiten installieren:
# Create and activate virtual environment uv venv source .venv/bin/activate # Linux/macOS # or .venv\Scripts\activate # Windows # Install dependencies uv pip install .
Verwendung
Starten des Servers
python laravel_docs_server.pyDer Server ruft beim ersten Start automatisch die Laravel-Dokumentation ab und kann mit Strg+C gestoppt werden.
Befehlszeilenoptionen
Option | Beschreibung |
| Pfad zum Dokumentationsverzeichnis (Standard: ./docs) |
| Servername (Standard: LaravelDocs) |
| Protokollebene: DEBUG, INFO, WARNUNG, FEHLER, KRITISCH (Standard: INFO) |
| Transportmethode: stdio, websocket, sse (Standard: stdio) |
| Host, an den eine Bindung erfolgen soll (Netzwerktransport) |
| Port zum Abhören (Netzwerktransport) |
| Laravel-Versionszweig (Standard: 12.x) |
| Aktualisieren Sie die Dokumentation vor dem Start |
| Aktualisierung der Dokumentation erzwingen |
Beispiel mit benutzerdefinierten Optionen:
python laravel_docs_server.py --docs-path /path/to/docs --version 11.x --update-docs --transport websocket --host localhost --port 8000Dokumentations-Updater
Sie können die Dokumentation separat aktualisieren:
# 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 --forceAPI-Referenz
Client-Beispiel
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())Verfügbare Tools
Dokumentationstools
list_docs()- Listet alle Dokumentationsdateien aufsearch_docs(query: str)– Dokumentation nach bestimmten Begriffen durchsuchenupdate_docs(version: Optional[str], force: bool)– Dokumentation aktualisierendocs_info()- Informationen zur Dokumentationsversion abrufen
Paketempfehlungstools
get_package_recommendations(use_case: str)– Paketempfehlungen für einen Anwendungsfall abrufenget_package_info(package_name: str)– Details zu einem bestimmten Paket abrufenget_package_categories(category: str)– Pakete in einer bestimmten Kategorie auflistenget_features_for_package(package: str)– Verfügbare Features für ein Paket abrufen
Ressourcenzugriff
Auf Dokumentationsdateien kann wie folgt als Ressource zugegriffen werden:
laravel://{path}Beispiele:
laravel://routing.mdlaravel://authentication.md
Automatisierte Workflows
Dieses Projekt umfasst mehrere automatisierte GitHub Actions-Workflows:
Tägliche Dokumentationsaktualisierungen
Auslöser : Jeden Tag um Mitternacht UTC (kann auch manuell ausgelöst werden)
Prozess : Sucht nach Aktualisierungen der Laravel-Dokumentation → Erstellt PR → Automatische Zusammenführung → Erstellt Patch-Versions-Tag
Ergebnis : Automatische Patch-Releases, wenn Laravel-Dokumente aktualisiert werden
Release-Veröffentlichung
Auslöser : Wenn Versions-Tags gepusht werden (z. B.
v0.1.4)Prozess : Erstellt Pakete → Veröffentlicht auf PyPI → Erstellt und überträgt Docker-Images an GHCR
Ergebnis : Synchronisierte Releases über PyPI und Docker Hub
Dynamische Versionierung
Versionsquelle : Automatisch aus Git-Tags mithilfe von
hatch-vcsabgeleitetEntwicklungs-Builds : Erhalten Sie eindeutige Kennungen (z. B.
0.1.3.dev1+g75aec71).Release Builds : Saubere Versionsnummern, die mit den Tags übereinstimmen (z. B.
0.1.4)
Funktionen und Roadmap
Aktuelle Funktionen:
✅ Tägliche Dokumentationsaktualisierungen : Automatische tägliche Synchronisierung mit dem GitHub-Repository von Laravel
✅ Dynamische Versionierung : Automatische Versionsverwaltung basierend auf Git-Tags
✅ Automatisierte Releases : Patch-Releases werden durch Dokumentationsaktualisierungen ausgelöst
✅ Mehrere Bereitstellungsoptionen : PyPI-Paket, Docker-Images und Smithery-Marktplatz
✅ Paketempfehlungen : Intelligente Vorschläge basierend auf spezifischen Anwendungsfällen
✅ Implementierungsanleitung : Detaillierte Informationen zu gängigen Laravel-Paketen
✅ Flexible Konfiguration : Unterstützung für mehrere Laravel-Versionen und Transportmethoden
✅ Ordentliches Herunterfahren : Ordnungsgemäße Bereinigung und Signalverarbeitung
Geplante Funktionen:
🔄 Unterstützung mehrerer Versionen (gleichzeitiger Zugriff auf die Dokumentation für mehrere Laravel-Versionen)
🔍 Benutzerprojektanalyse für maßgeschneiderte Empfehlungen
🚀 Erweiterte Suchfunktionen mit semantischem Matching
📊 Nutzungsanalysen und Einblicke
🔗 Zusätzliche Integrationen des Laravel-Ökosystems
Lizenz
Dieses Projekt ist unter der MIT-Lizenz lizenziert – Einzelheiten finden Sie in der Datei LICENSE.
Beitragen
Beiträge sind willkommen! Richtlinien finden Sie unter CONTRIBUTING.md.
Danksagung
Laravel für die hervorragende Dokumentation
Autoren von Laravel-Paketen für ihre Beiträge zum Ökosystem
Available Tools
4 toolscall_toolA
Call a tool by name with the given arguments.
Use this to execute tools discovered via search_tools.
Inputs: name (required), arguments.
read_laravel_doc_sectionARead-onlyIdempotent
Read one section of a documentation page.
Give it a search result's file (as filename) and section, and it returns that section's markdown and nothing else. This is the cheap way to read: a whole page such as queues.md runs to tens of thousands of tokens, and an answer usually needs one section of it.
section may be an anchor ("dealing-with-failed-jobs"), a heading ("Dealing With Failed Jobs") or a heading written as a slug. If the section is not found, the error lists the sections the page does have.
Inputs: section (required), filename (required), version. Returns: file, corpus, content, heading, +2 more
search_laravel_docsARead-onlyIdempotent
Search Laravel's documentation and get back the sections that answer the question.
Covers every corpus on this server at once: the framework docs for the selected Laravel version, the first-party services (Forge, Vapor, Envoyer, Nova, Cloud, Nightwatch, Herd), fetched package docs (Livewire, Filament, Inertia, Spatie and others) and learning resources. Each result names a file and a section; pass them to read_laravel_doc_section as filename and section to read just that section.
Use it first for any Laravel question. Narrow with sources when you know the corpus, and set version for an older Laravel release. Results are ranked across corpora, and no single source takes the whole page when others match. Nothing found is a normal result with count 0.
Inputs: query (required), limit, sources, version, +1 more. Returns: count, query, scope, results, +2 more
search_toolsA
Search for tools using natural language.
Returns matching tool definitions ranked by relevance, in the same format as list_tools.
Inputs: query (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The core docs tools are clearly distinct: search_laravel_docs finds sections and read_laravel_doc_section reads them. The main ambiguity comes from the meta pair search_tools/call_tool, which creates an alternate path for invoking tools and could be confused with the docs search tool due to the shared 'search' prefix.
All names are snake_case and follow a verb_noun pattern (call_tool, search_laravel_docs, read_laravel_doc_section, search_tools). Minor inconsistencies exist: 'docs' vs 'doc' and 'laravel' is included in the docs tools but not in the generic meta tools.
Four tools is a reasonable size for a documentation retrieval server. The two core domain tools cover the main workflow, while search_tools and call_tool add a dynamic tool-discovery layer that is useful but slightly redundant given the tools are already exposed directly.
The essential docs lifecycle is covered: search across corpora and read a specific section cheaply. Minor gaps include no explicit tool to list available sources, corpora, or Laravel versions, though those can be supplied as search parameters.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that provides organized documentation content for various applications using the Model Context Protocol, enabling AI assistants to access quickstart guides and code examples.MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides AI coding assistants with direct access to Apple's Developer Documentation, enabling seamless lookup of frameworks, symbols, and detailed API references.6375 npm627MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing file search and question tools for AI models. Enables keyword search in files with line numbers and integration with external chat services.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to introspect a Laravel application's routes, models, controllers, migrations, and more through the Model Context Protocol, running locally via php artisan commands and filesystem scanning.8 npmMIT