A toolkit for developing MCP-compatible components in Laravel.
Install
mkdir -p .claude/skills/mcp-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15879" && unzip -o skill.zip -d .claude/skills/mcp-development && rm skill.zipInstalls to .claude/skills/mcp-development
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use this skill for Laravel MCP development only. Trigger when creating or editing MCP tools, resources, prompts, or servers in Laravel projects. Covers: artisan make:mcp-* generators, mcp:inspector, routes/ai.php, Tool/Resource/Prompt classes, schema validation, shouldRegister(), OAuth setup, URI templates, read-only attributes, and MCP debugging. Do not use for non-Laravel MCP projects or generic AI features without MCP.Key capabilities
- →Create MCP tools, resources, prompts, or servers using Artisan commands.
- →Define tool schemas with validation rules for parameters.
- →Handle requests and return responses for MCP tools and resources.
- →Test MCP primitives directly on their server or interactively with the inspector.
- →Implement features like URI templates and dynamic resources for MCP resources.
- →Configure server registration with web routes, local routes, or OAuth.
How it works
The skill provides Artisan commands to generate boilerplate code for MCP primitives and outlines the structure for implementing their logic, including schema definition and request handling.
Inputs & outputs
When to use mcp-development
- →Create MCP tool
- →Scaffold MCP resource
- →Implement MCP prompt
- →Debug MCP server
About this skill
MCP Development
Documentation First
CRITICAL: Always use search-docs BEFORE writing MCP code. The documentation is version-specific, comprehensive, and always up-to-date.
# Example searches
search-docs(['mcp tools', 'mcp resources', 'mcp validation'])
Quick Reference
Artisan Commands
Create MCP Primitives
php artisan make:mcp-tool ToolName
php artisan make:mcp-resource ResourceName
php artisan make:mcp-prompt PromptName
php artisan make:mcp-server ServerName
Basic Tool Implementation
<!-- Tool Example -->use Illuminate\Contracts\JsonSchema\JsonSchema;
use Laravel\Mcp\Request;
use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Tool;
class MyTool extends Tool
{
protected string $description = 'Tool description for LLM';
public function schema(JsonSchema $schema): array
{
return [
'param' => $schema->string()->required(),
];
}
public function handle(Request $request): Response
{
return Response::text($request->get('param'));
}
}
Basic Resource Implementation
<!-- Resource Example -->use Laravel\Mcp\Response;
use Laravel\Mcp\Server\Resource;
class MyResource extends Resource
{
protected string $description = 'Resource description';
protected string $uri = 'file://path/to/resource';
protected string $mimeType = 'text/markdown';
public function handle(): Response
{
return Response::text($content);
}
}
Response Methods
<!-- Available Responses -->Response::text('Text content');
Response::error('Error message');
Response::structured(['key' => 'value']);
Testing MCP Primitives
Test tools, resources, and prompts directly on their server:
<!-- Test MCP Primitives -->// Test a tool
$response = MyServer::tool(MyTool::class, ['param' => 'value']);
$response->assertOk()->assertSee('Expected text');
// Test as authenticated user
$response = MyServer::actingAs($user)->tool(MyTool::class, [...]);
// Available assertions
$response->assertOk();
$response->assertSee('text');
$response->assertHasErrors();
$response->assertHasNoErrors();
$response->assertName('tool-name');
$response->assertSentNotification('event/type', ['data' => 'value']);
MCP Inspector
Test interactively using the inspector:
<!--Launch MCP Inspector-->php artisan mcp:inspector mcp/my-server # Web server
php artisan mcp:inspector my-server # Local server
Available Features
The following features exist—use search-docs for implementation details:
- Tools:
schema(), validation, annotations (#[IsReadOnly],#[IsDestructive], etc.) - Resources: URI templates (
HasUriTemplate), Dynamic resources - Prompts: Arguments, multi-message responses
- All primitives: Dependency injection,
shouldRegister(), validation - Responses: Text, error, structured, streaming, metadata
- Server registration: Web routes, local routes, OAuth
Critical Imports
<!-- Correct Imports -->use Laravel\Mcp\Request; // NOT Laravel\Mcp\Server\Request
use Laravel\Mcp\Response; // NOT Laravel\Mcp\Server\Response
use Laravel\Mcp\Server\Tool;
use Laravel\Mcp\Server\Resource;
use Laravel\Mcp\Server\Prompt;
use Illuminate\Contracts\JsonSchema\JsonSchema;
Common Pitfalls
- Not using
search-docsbefore implementation - Wrong imports:
Laravel\Mcp\Server\Request(wrong) vsLaravel\Mcp\Request(correct) - Forgetting
schema()method for tools with parameters - Missing required properties:
$description,$uri,$mimeType - Wrong response pattern:
new Response()instead ofResponse::text() - Running
mcp:startcommand locally (hangs waiting for stdin)
When not to use it
- →For non-Laravel MCP projects.
- →For generic AI features without MCP.
- →When the project is not Laravel-based.
Limitations
- →Limited to Laravel MCP development.
- →Does not support non-Laravel MCP projects.
- →Not for generic AI features without MCP.
How it compares
This skill automates the initial setup and provides a structured framework for MCP development, unlike manually creating files and defining classes from scratch.
Compared to similar skills
mcp-development side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| mcp-development (this skill) | 0 | 3mo | Review | Intermediate |
| laravel-specialist | 12 | 3mo | No flags | Intermediate |
| developing-with-turbo-streams | 1 | 5mo | No flags | Intermediate |
| payment-integration | 1 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
laravel-specialist
Jeffallan
Use when building Laravel 10+ applications requiring Eloquent ORM, API resources, or queue systems. Invoke for Laravel models, Livewire components, Sanctum authentication, Horizon queues.
developing-with-turbo-streams
hotwired-laravel
Basics of developing with Turbo Streams in web applications. Activate when working on projects that utilize Turbo Streams for enhancing user experience through real-time updates, dynamic content changes, and partial page updates without full reloads.
payment-integration
mrgoonie
Integrate payments with SePay (VietQR), Polar, Stripe, Paddle (MoR subscriptions), Creem.io (licensing). Checkout, webhooks, subscriptions, QR codes, multi-provider orders.
developing-with-prism
prism-php
Guide for developing with Prism PHP package - a Laravel package for integrating LLMs. Activate or use when working with Prism features including text generation, structured output, embeddings, image generation, audio processing, streaming, tools/function calling, or any LLM provider integration (OpenAI, Anthropic, Gemini, Mistral, Groq, XAI, DeepSeek, OpenRouter, Ollama, VoyageAI, ElevenLabs). Activate for any Prism-related development tasks.
laravel-query-builder
relaticle
Build filtered, sorted, and included API endpoints using spatie/laravel-query-builder. Activates when working with QueryBuilder, AllowedFilter, AllowedSort, AllowedInclude, or when the user mentions query parameters, API filtering, sorting, includes, or spatie/laravel-query-builder.
echo-development
WageFolabessy
Develops real-time broadcasting with Laravel Echo. Activates when setting up broadcasting (Reverb, Pusher, Ably); creating ShouldBroadcast events; defining broadcast channels (public, private, presence, encrypted); authorizing channels; configuring Echo; listening for events; implementing client eve