laravel-mcp
Laravel MCP server development. Use when building MCP servers, tools, prompts, or resources for AI client integration. Triggers on tasks involving laravel/mcp, MCP tools, MCP prompts, MCP resources, or AI client protocols.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o laravel-mcp.zip https://jpskill.com/download/23225.zip && unzip -o laravel-mcp.zip && rm laravel-mcp.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23225.zip -OutFile "$d\laravel-mcp.zip"; Expand-Archive "$d\laravel-mcp.zip" -DestinationPath $d -Force; ri "$d\laravel-mcp.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
laravel-mcp.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
laravel-mcpフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Laravel MCP
Comprehensive guide for building MCP (Model Context Protocol) servers with Laravel. Contains 7 rules across 5 categories for exposing tools, prompts, and resources to AI clients.
When to Apply
Reference these guidelines when:
- Creating MCP servers (web or local)
- Building tools that AI clients can call
- Defining prompts for reusable AI interactions
- Exposing resources for AI context
- Protecting MCP servers with OAuth or Sanctum
- Testing MCP servers, tools, prompts, and resources
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Servers | CRITICAL | server- |
| 2 | Tools | HIGH | tool- |
| 3 | Prompts & Resources | MEDIUM | prompt-, resource- |
| 4 | Authentication | HIGH | auth- |
| 5 | Testing | HIGH | test- |
Quick Reference
1. Servers (CRITICAL)
server-create-register- Create and register web or local MCP servers
2. Tools (HIGH)
tool-create- Create tools with input/output schemas, DI, and annotationstool-responses- Text, error, structured, streaming, and multi-content responses
3. Prompts & Resources (MEDIUM)
prompt-create- Create prompts with arguments, validation, and responsesresource-create- Create resources and resource templates with URI patterns
4. Authentication (HIGH)
auth-protect- Protect servers with OAuth 2.1, Sanctum, or custom auth
5. Testing (HIGH)
test-unit- Test with MCP Inspector and unit tests
Essential Patterns
Creating an MCP Server
<?php
namespace App\Mcp\Servers;
use Laravel\Mcp\Server;
use Laravel\Mcp\Server\Attributes\Instructions;
use Laravel\Mcp\Server\Attributes\Name;
use Laravel\Mcp\Server\Attributes\Version;
#[Name('Weather Server')]
#[Version('1.0.0')]
#[Instructions('This server provides weather information.')]
class WeatherServer extends Server
{
protected array $tools = [
CurrentWeatherTool::class,
];
protected array $resources = [];
protected array $prompts = [];
}
Registering in routes/ai.php
use App\Mcp\Servers\WeatherServer;
use Laravel\Mcp\Facades\Mcp;
Mcp::web('/mcp/weather', WeatherServer::class);
Mcp::local('weather', WeatherServer::class);
Creating a Tool
<?php
namespace App\Mcp\Tools;
use Illuminate\Contracts\JsonSchema\JsonSchema;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Tool;
#[Description('Fetches the current weather for a location.')]
class CurrentWeatherTool extends Tool
{
public function handle(Request $request): Response
{
$location = $request->get('location');
return Response::text("The weather in {$location} is sunny, 72°F.");
}
public function schema(JsonSchema $schema): array
{
return [
'location' => $schema->string()
->description('The location to get the weather for.')
->required(),
];
}
}
How to Use
Read individual rule files for detailed explanations and code examples.
Each rule file contains:
- YAML frontmatter with metadata (title, impact, tags)
- Brief explanation of why it matters
- Bad Example with explanation
- Good Example with explanation
- Laravel 13 and PHP 8.3 specific context and references
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (3,842 bytes)
- 📎 README.md (1,454 bytes)