Laravel MCP Companion
Laravel ドキュメント MCP サーバー
⚠️アルファソフトウェア- このプロジェクトはまだ開発初期段階です。機能が期待どおりに動作しない可能性があり、予告なく変更が行われる可能性があります。
Laravel開発者向けのAIアシスタント。最新のLaravelドキュメントへのアクセスと、Model Context Protocol(MCP)を介したインテリジェントなパッケージレコメンデーションを提供します。これにより、AIツールは最新の情報とベストプラクティスに基づいたLaravelアプリケーションの構築を支援します。
概要
このサーバーにより、AIアシスタントはモデルコンテキストプロトコル(MCP)を使用してLaravelのドキュメントやパッケージの推奨事項にアクセスできるようになります。これにより、AIツールは以下のことが可能になります。
Laravelドキュメントにアクセスして検索する
特定のユースケースに基づいてパッケージの推奨事項を受け取る
人気のLaravelパッケージの実装ガイドを入手
Laravel の GitHub リポジトリからドキュメントを自動的に更新する
Related MCP server: Apple Doc MCP
インストール
Smithery経由のクイックインストール
npx -y @smithery/cli install @brianirish/laravel-docs-mcp --client claudePyPIからインストール
pip install laravel-docs-mcpドッカー
# 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ソースからの手動インストール
前提条件
Python 3.12以上
uvパッケージ マネージャー (推奨)
手順
リポジトリをクローンします。
git clone https://github.com/brianirish/laravel-docs-mcp.git cd laravel-docs-mcp環境をセットアップし、依存関係をインストールします。
# Create and activate virtual environment uv venv source .venv/bin/activate # Linux/macOS # or .venv\Scripts\activate # Windows # Install dependencies uv pip install .
使用法
サーバーの起動
python laravel_docs_server.pyサーバーは最初の実行時に Laravel ドキュメントを自動的に取得し、Ctrl+C で停止できます。
コマンドラインオプション
オプション | 説明 |
| ドキュメントディレクトリのパス(デフォルト: ./docs) |
| サーバー名(デフォルト:LaravelDocs) |
| ログレベル: DEBUG、INFO、WARNING、ERROR、CRITICAL (デフォルト: INFO) |
| トランスポート方法: stdio、websocket、sse (デフォルト: stdio) |
| バインドするホスト(ネットワークトランスポート) |
| リッスンするポート(ネットワークトランスポート) |
| Laravel バージョン ブランチ (デフォルト: 12.x) |
| 開始前にドキュメントを更新する |
| フォースドキュメントの更新 |
カスタム オプションの例:
python laravel_docs_server.py --docs-path /path/to/docs --version 11.x --update-docs --transport websocket --host localhost --port 8000ドキュメントアップデータ
ドキュメントを個別に更新することもできます。
# 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リファレンス
クライアントの例
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())利用可能なツール
ドキュメントツール
list_docs()- すべてのドキュメントファイルを一覧表示するsearch_docs(query: str)- 特定の用語でドキュメントを検索するupdate_docs(version: Optional[str], force: bool)- ドキュメントを更新するdocs_info()- ドキュメントのバージョン情報を取得する
パッケージ推奨ツール
get_package_recommendations(use_case: str)- ユースケースのパッケージ推奨事項を取得するget_package_info(package_name: str)- 特定のパッケージの詳細を取得するget_package_categories(category: str)- 特定のカテゴリ内のパッケージを一覧表示するget_features_for_package(package: str)- パッケージで利用可能な機能を取得する
リソースアクセス
ドキュメント ファイルには、次の方法でリソースとしてアクセスできます。
laravel://{path}例:
laravel://routing.mdlaravel://authentication.md
自動化されたワークフロー
このプロジェクトには、自動化された GitHub Actions ワークフローがいくつか含まれています。
毎日のドキュメント更新
トリガー: 毎日午前0時UTC(手動でトリガーすることもできます)
プロセス: Laravel ドキュメントの更新をチェック → PR を作成 → 自動マージ → パッチ バージョン タグを作成
結果: Laravelドキュメントが更新されると自動的にパッチがリリースされる
リリースパブリッシング
トリガー: バージョンタグがプッシュされたとき (例:
v0.1.4)プロセス: パッケージをビルド → PyPI に公開 → Docker イメージをビルドして GHCR にプッシュ
結果: PyPIとDocker Hub間でリリースが同期されました
動的バージョン管理
バージョンソース:
hatch-vcsを使用して git タグから自動的に導出されます開発ビルド: 一意の識別子を取得します (例:
0.1.3.dev1+g75aec71)リリースビルド: タグに一致するクリーンなバージョン番号 (例:
0.1.4)
機能とロードマップ
現在の機能:
✅毎日のドキュメント更新: Laravel の GitHub リポジトリと毎日自動的に同期します
✅動的バージョン管理: Git タグに基づく自動バージョン管理
✅自動リリース: ドキュメントの更新によってトリガーされるパッチリリース
✅複数のデプロイメントオプション: PyPI パッケージ、Docker イメージ、Smithery マーケットプレイス
✅パッケージの推奨事項: 特定のユースケースに基づいたインテリジェントな提案
✅実装ガイダンス: 一般的な Laravel パッケージの詳細情報
✅柔軟な構成: 複数の Laravel バージョンとトランスポート方法をサポート
✅正常なシャットダウン:適切なクリーンアップとシグナル処理
計画されている機能:
🔄 マルチバージョンサポート(複数の Laravel バージョンのドキュメントに同時にアクセス)
🔍 ユーザープロジェクト分析によるカスタマイズされた推奨事項
🚀 セマンティックマッチングによる検索機能の強化
📊 使用状況分析と洞察
🔗 Laravelエコシステムの追加統合
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
貢献
貢献を歓迎します!ガイドラインについてはCONTRIBUTING.mdをご覧ください。
謝辞
優れたドキュメントを提供するLaravel
エコシステムへの貢献に対して Laravel パッケージの作者に感謝
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