Token导航 LogoToken导航

Agent Skill · 待分类

laravel-mcp(Laravel MCP 命令行)

laravel-mcp 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

laravel-mcp 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描有未通过项,按安装量在待分类类的 11,208 个 Skill 里排第 3,918。

总安装 861周安装 37GitHub Stars 31下载 302核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:laravel-mcp(Laravel MCP 命令行)
来源仓库:https://github.com/rawveg/skillsforge-marketplace
仓库路径:skills/laravel-mcp
安装命令:
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-mcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-mcp

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

laravel-mcp 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定仓库安装并使用该技能。

安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/laravel-mcp

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

laravel-mcp 怎么安装?

在终端执行 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-mcp。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

laravel-mcp 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

laravel-mcp 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

laravel-mcp 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

laravel-mcp 用的人多吗?

公开数据是累计安装 861 次,近一周安装 37 次,下载 302 次,GitHub 31 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

laravel-mcp 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
laravel-mcp

Laravel MCP 命令行 · 本页

86131调用外部服务MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Laravel MCP Skill

Comprehensive assistance with Laravel MCP (Model Context Protocol) development. Laravel MCP provides a simple and elegant way for AI clients to interact with your Laravel application through the Model Context Protocol, enabling you to define servers, tools, resources, and prompts for AI-powered interactions.

When to Use This Skill

This skill should be triggered when:

  • Building MCP servers for Laravel applications
  • Creating AI tools that perform actions in Laravel
  • Defining reusable prompts for AI interactions
  • Exposing Laravel resources (data/content) to AI clients
  • Implementing OAuth 2.1 or Sanctum authentication for MCP
  • Registering and configuring MCP routes (web or local)
  • Testing MCP servers and tools
  • Working with Laravel JSON Schema builder for tool inputs
  • Implementing streaming responses or progress notifications
  • Building AI-powered Laravel features using MCP

Key Concepts

Core Components

MCP Server: The central communication point that exposes MCP capabilities. Each server has:

  • name: Server identifier
  • version: Server version
  • instructions: Description of the server's purpose
  • tools: Array of tool classes
  • resources: Array of resource classes
  • prompts: Array of prompt classes

Tools: Enable AI clients to perform actions. Tools can:

  • Define input schemas using Laravel's JSON Schema builder
  • Validate arguments with Laravel validation rules
  • Support dependency injection
  • Return single or multiple responses
  • Stream responses using generators
  • Use annotations like #[IsReadOnly] and #[IsIdempotent]

Prompts: Reusable prompt templates that provide a standardized way to structure common queries with argument definitions and validation.

Resources: Enable your server to expose data and content that AI clients can read, including text and blob responses with customizable MIME types and URIs.

Quick Reference

1. Basic MCP Server Definition

<?php
namespace App\Mcp\Servers;

use Laravel\Mcp\Server;

class WeatherServer extends Server
{
    protected string $name = 'Weather Server';
    protected string $version = '1.0.0';
    protected string $instructions = 'This server provides weather information and forecasts.';

    protected array $tools = [
        // CurrentWeatherTool::class,
    ];

    protected array $resources = [
        // WeatherGuidelinesResource::class,
    ];

    protected array $prompts = [
        // DescribeWeatherPrompt::class,
    ];
}

2. Tool with Input Schema

<?php
namespace App\Mcp\Tools;

use Illuminate\JsonSchema\JsonSchema;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Tool;

class CurrentWeatherTool extends Tool
{
    protected string $description = 'Fetches the current weather forecast for a specified location.';

    public function handle(Request $request): Response
    {
        $location = $request->get('location');
        // Get weather...
        return Response::text('The weather is...');
    }

    public function schema(JsonSchema $schema): array
    {
        return [
            'location' => $schema->string()
                ->description('The location to get the weather for.')
                ->required(),
        ];
    }
}

3. Tool with Validation

public function handle(Request $request): Response
{
    $validated = $request->validate([
        'location' => 'required|string|max:100',
        'units' => 'in:celsius,fahrenheit',
    ], [
        'location.required' => 'You must specify a location.',
        'units.in' => 'You must specify either "celsius" or "fahrenheit".',
    ]);
    // Fetch weather data...
}

4. Tool with Dependency Injection

<?php
namespace App\Mcp\Tools;

use App\Repositories\WeatherRepository;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Tool;

class CurrentWeatherTool extends Tool
{
    public function __construct(
        protected WeatherRepository $weather,
    ) {}

    public function handle(Request $request, WeatherRepository $weather): Response
    {
        $location = $request->get('location');
        $forecast = $weather->getForecastFor($location);
        // ...
    }
}

5. Tool with Annotations

<?php
namespace App\Mcp\Tools;

use Laravel\Mcp\Server\Tools\Annotations\IsIdempotent;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
use Laravel\Mcp\Server\Tool;

#[IsIdempotent]
#[IsReadOnly]
class CurrentWeatherTool extends Tool
{
    // ...
}

6. Streaming Tool Response

<?php
namespace App\Mcp\Tools;

use Generator;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Tool;

class CurrentWeatherTool extends Tool
{
    public function handle(Request $request): Generator
    {
        $locations = $request->array('locations');

        foreach ($locations as $index => $location) {
            yield Response::notification('processing/progress', [
                'current' => $index + 1,
                'total' => count($locations),
                'location' => $location,
            ]);
            yield Response::text($this->forecastFor($location));
        }
    }
}

7. Prompt Definition

<?php
namespace App\Mcp\Prompts;

use Laravel\Mcp\Server\Prompt;
use Laravel\Mcp\Server\Prompts\Argument;

class DescribeWeatherPrompt extends Prompt
{
    protected string $description = 'Generates a natural-language explanation of the weather.';

    public function arguments(): array
    {
        return [
            new Argument(
                name: 'tone',
                description: 'The tone to use in the weather description.',
                required: true,
            ),
        ];
    }

    public function handle(Request $request): array
    {
        $tone = $request->string('tone');
        return [
            Response::text("You are a weather assistant. Provide a {$tone} tone.")->asAssistant(),
            Response::text("What is the current weather like in New York City?"),
        ];
    }
}

8. Resource Definition

<?php
namespace App\Mcp\Resources;

use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Resource;

class WeatherGuidelinesResource extends Resource
{
    protected string $description = 'Comprehensive guidelines for using the Weather API.';
    protected string $uri = 'weather://resources/guidelines';
    protected string $mimeType = 'application/pdf';

    public function handle(Request $request): Response
    {
        return Response::text($weatherData);
    }
}

9. Server Registration (Web)

use App\Mcp\Servers\WeatherServer;
use Laravel\Mcp\Facades\Mcp;

Mcp::web('/mcp/weather', WeatherServer::class);

// With middleware
Mcp::web('/mcp/weather', WeatherServer::class)
    ->middleware(['throttle:mcp']);

10. Server Registration (Local)

use App\Mcp\Servers\WeatherServer;
use Laravel\Mcp\Facades\Mcp;

Mcp::local('weather', WeatherServer::class);

11. OAuth 2.1 Authentication Setup

use App\Mcp\Servers\WeatherExample;
use Laravel\Mcp\Facades\Mcp;

Mcp::oauthRoutes();

Mcp::web('/mcp/weather', WeatherExample::class)
    ->middleware('auth:api');

12. Sanctum Authentication

use App\Mcp\Servers\WeatherExample;
use Laravel\Mcp\Facades\Mcp;

Mcp::web('/mcp/demo', WeatherExample::class)
    ->middleware('auth:sanctum');

Reference Files

This skill includes comprehensive documentation in references/:

  • other.md - Complete Laravel MCP documentation from Laravel 12.x official docs, including:

- Installation and setup instructions - Server, tool, resource, and prompt creation - Input schema definition using JSON Schema builder - Validation and dependency injection - Streaming responses and progress notifications - Authentication (OAuth 2.1 and Sanctum) - Registration (web and local routes) - Testing and inspection

Use view to read specific reference files when detailed information is needed.

Working with This Skill

For Beginners

Start by understanding the core concepts:

  1. Installation: Install Laravel MCP via composer require laravel/mcp
  2. Setup: Run php artisan vendor:publish --tag=ai-routes to create routes/ai.php
  3. First Server: Generate your first server with php artisan make:mcp-server
  4. Register: Add your server to routes/ai.php using Mcp::web() or Mcp::local()

Begin with simple read-only tools using the #[IsReadOnly] annotation before moving to tools that modify data.

For Intermediate Users

Focus on building robust tools:

  • Use JSON Schema builder for precise input validation
  • Leverage Laravel's validation rules for complex constraints
  • Implement dependency injection for clean, testable code
  • Use prompts to create reusable AI interaction patterns
  • Expose resources to provide context to AI clients

For Advanced Users

Implement production-ready features:

  • Add OAuth 2.1 or Sanctum authentication to secure your MCP servers
  • Use streaming responses for long-running operations with progress notifications
  • Apply middleware for rate limiting and custom authentication
  • Create idempotent tools using #[IsIdempotent] annotation
  • Build complex multi-tool workflows
  • Use the MCP Inspector for debugging and testing

Navigation Tips

  • Quick implementation: Use the Quick Reference section above for common patterns
  • Detailed learning: Read references/other.md for comprehensive documentation
  • Examples: All code examples include proper namespaces and imports
  • Testing: Refer to documentation for MCP Inspector usage and unit testing

Common Patterns

Creating a New MCP Server

# Generate server class
php artisan make:mcp-server WeatherServer

# Edit app/Mcp/Servers/WeatherServer.php
# Add tools, resources, and prompts

# Register in routes/ai.php
Mcp::web('/mcp/weather', WeatherServer::class);

Input Schema Patterns

// Simple required string
'location' => $schema->string()->required()

// Optional with default
'units' => $schema->string()->default('celsius')

// Number with constraints
'temperature' => $schema->number()->minimum(0)->maximum(100)

// Array of items
'cities' => $schema->array()->items($schema->string())

// Object with properties
'forecast' => $schema->object()->properties([
    'temperature' => $schema->number(),
    'humidity' => $schema->number(),
])

Response Patterns

// Text response
return Response::text('The weather is sunny');

// Multiple responses
return [
    Response::text('First message'),
    Response::text('Second message'),
];

// Notification (streaming)
yield Response::notification('processing/progress', ['status' => 'processing']);

Resources

Installation

composer require laravel/mcp
php artisan vendor:publish --tag=ai-routes

Official Documentation

Related Laravel Features

  • JSON Schema Builder: For defining tool input schemas
  • Validation: For validating tool arguments
  • Service Container: For dependency injection in tools and resources
  • OAuth/Sanctum: For authentication

Notes

  • This skill was generated from official Laravel 12.x MCP documentation
  • All code examples use proper PHP 8+ syntax with typed properties
  • Examples demonstrate Laravel's elegant API design
  • Tools support both synchronous and streaming responses
  • Authentication is optional but recommended for production use
  • Both web (HTTP) and local (CLI) server registration are supported

Tips & Best Practices

  1. Start Simple: Begin with read-only tools marked with #[IsReadOnly]
  2. Validate Input: Always define schemas and use validation for user input
  3. Use DI: Leverage dependency injection for repositories and services
  4. Stream Progress: For long operations, use generators to stream progress
  5. Secure Your Servers: Add authentication middleware for production
  6. Test Thoroughly: Use the MCP Inspector and unit tests to validate functionality
  7. Document Well: Write clear descriptions for servers, tools, prompts, and resources
  8. Follow Conventions: Use Laravel's service container patterns and naming conventions

平台分布

Claude Code

29.66%
按下载量换算90

OpenCode

23.73%
按下载量换算72

Antigravity

14.71%
按下载量换算44

Gemini CLI

10.36%
按下载量换算31

windsurf

7.86%
按下载量换算24

Codex

3.59%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills