Laravel MCP (Model Context Protocol)
@InnoGE
Laravel MCP (Model Context Protocol) について
A package for developing MCP Servers with Laravel.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"laravel-mcp": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"php",
"/path/to/your/app/artisan",
"mcp:serve"
]
}
}
}ツール
1in Example Tools**:
概要
What is Laravel MCP (Model Context Protocol)?
Laravel MCP is a PHP package that implements the Model Context Protocol, allowing Laravel applications to communicate with AI assistants and other systems through a standardized API. It is designed for Laravel developers who want to expose application data and actions to MCP-compatible clients.
How to use Laravel MCP (Model Context Protocol)?
Install via Composer, then create an Artisan command using the ServesMcpServer trait. Define tools and resources in the command, then run php artisan mcp:serve. The server currently uses STDIO transport only; HTTP transport is planned. Test with the MCP Inspector or add the server to Claude Desktop by editing the claude_desktop_config.json file.
Key features of Laravel MCP (Model Context Protocol)
- Exposes Eloquent models and custom data via resource providers
- Defines tools with input schemas for AI assistant interactions
- Built‑in example tools (HelloTool, ClockTool)
- Create custom tools by implementing
ToolInterface - Test with the Modelcontext Protocol Inspector
- Integrates with Claude Desktop via STDIO transport
Use cases of Laravel MCP (Model Context Protocol)
- Allow an AI assistant to query or update database records
- Run Artisan commands through conversational interfaces
- Provide real‑time application data as resources to external tools
- Enable reporting, notifications, and file management via tool calls
- Build a custom assistant that interacts with Laravel business logic
FAQ from Laravel MCP (Model Context Protocol)
What transport does this package support?
Only STDIO transport is currently supported. HTTP transport is planned for a future release.
Is Laravel MCP ready for production?
No. The package is still in development and not yet ready for production use.
How do I test my MCP server?
Run npx @modelcontextprotocol/inspector php /path/to/your/app/artisan mcp:serve to use the Modelcontext Protocol Inspector.
How do I add the server to Claude Desktop?
Edit ~/Library/Application Support/Claude/claude_desktop_config.json and add an entry with "command": "php" and "args": ["/path/to/artisan", "mcp:serve"].
Does Claude Desktop use MCP resources?
No. Claude currently does not use MCP resources; you can access application data by making tool calls instead.
「その他」の他のコンテンツ
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Awesome Mlops
visengerA curated list of references for MLOps
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
コメント