Back to MCP Servers
Laravel MCP logo
mcp-server578

Laravel MCP

Official Laravel package for rapidly building Model Context Protocol (MCP) servers, enabling seamless AI client interactions with Laravel applications through tools, resources, and prompts.

Overview

Laravel MCP is the official package developed by the Laravel team to enable developers to build Model Context Protocol (MCP) servers directly within Laravel applications. Launched in 2025 as part of Laravel's AI tooling suite, it provides a fluent, Laravel-native interface for defining servers, tools, resources, and prompts that allow any MCP-compatible AI client (Claude, ChatGPT, Cursor, GitHub Copilot, etc.) to interact securely and efficiently with your Laravel app.

By integrating Laravel MCP, applications gain the ability to expose structured capabilities to AI agents without custom APIs, following the open MCP standard originally introduced by Anthropic and now governed under the Linux Foundation.

Key Features

  • Expressive Server Definition: Use attributes and fluent APIs to configure server metadata (name, version, instructions).
  • Tools, Resources & Prompts: Register custom classes for executable tools, readable resources, and reusable prompt templates.
  • Artisan Scaffolding: Generate full MCP server skeletons with php artisan make:mcp-server.
  • Laravel-Native Integration: Leverages Eloquent, caching, queues, Sanctum authentication, and the service container.
  • Streamable HTTP & SSE Support: Built on modern MCP transports for real-time, scalable interactions.
  • Security & Authentication: Easy integration with Laravel Sanctum or Passport for token-based auth.
  • Testing Support: Works seamlessly with Pest/PHPUnit for testing tools and server behavior.

Installation & Quick Start

Install via Composer:

composer require laravel/mcp

Publish routes and configuration (optional):

php artisan vendor:publish --tag=mcp-config
php artisan vendor:publish --tag=mcp-routes

Create your first server:

php artisan make:mcp-server WeatherServer

Example server class:

<?php

namespace App\Mcp\Servers;

use Laravel\Mcp\Server;
use Laravel\Mcp\Server\Attributes\Name;
use Laravel\Mcp\Server\Attributes\Version;
use Laravel\Mcp\Server\Attributes\Instructions;

#[Name('Weather Server')]
#[Version('1.0.0')]
#[Instructions('Provides current weather and forecasts for locations worldwide.')]
class WeatherServer extends Server
{
    protected array $tools = [
        \App\Mcp\Tools\GetCurrentWeather::class,
    ];

    protected array $resources = [
        \App\Mcp\Resources\WeatherGuidelines::class,
    ];
}

Use Cases

  • AI-Powered Development Tools: Expose Laravel-specific context (routes, models, migrations) to coding agents like Claude Code or Cursor.
  • Business Application Integration: Allow AI assistants to query CRM data, manage tasks, or interact with e-commerce features.
  • Local & Remote Servers: Run MCP servers locally for development or deploy remotely for production AI integrations.
  • Multi-Client Compatibility: One server works across all major AI platforms supporting MCP (Anthropic, OpenAI, Google, Microsoft).

Community benchmarks show that Laravel MCP reduces integration time for AI features by 5–8× compared to custom endpoints, with zero vendor lock-in thanks to the open protocol.

Advanced Tips & Common Pitfalls

  • Use Sanctum middleware for production servers to secure tool execution.
  • Implement rate limiting on tool calls to prevent abuse.
  • Leverage resource templates for dynamic data exposure (e.g., Eloquent query results).
  • Pitfall: Forgetting to register routes — always run php artisan route:cache after changes.
  • Advanced: Combine with Laravel Boost (another first-party MCP server) for enhanced local dev experience.

Conclusion & Resources

Laravel MCP represents Laravel's official commitment to the emerging AI agent ecosystem. As MCP adoption grows in 2026, having an MCP server in your Laravel app positions it as AI-native infrastructure.

Start building today:

  • Official Docs: https://laravel.com/docs/12.x/mcp
  • GitHub: https://github.com/laravel/mcp
  • Explore demo app Locket: https://github.com/laravel/locket

Contribute to the package or build your first MCP server — the future of AI-assisted Laravel development is here.

Tags

laravelmcpaiphpservermodel-context-protocoltoolsresourcesprompts

Related Entries

Keep exploring similar tools and resources in this category.

Browse MCP Servers
Crunchbase MCP logo

Crunchbase MCP

MCP Servers

Crunchbase MCP is Crunchbase's official first-party remote MCP server for live company, funding, investor, people, acquisition, and predictive private-market intelligence. Interactive access uses a Crunchbase account with an assigned MCP seat and OAuth 2.1 authentication.

viewmax mcp logo

viewmax mcp

MCP Servers

ViewMax MCP is a hosted Streamable HTTP MCP server for generating AI video, images, music, speech, and sound effects, with tools for model discovery, task polling, and credit checks. Official setup is documented for Claude Web/Desktop, Claude Code, Cursor, Codex, and SDK clients.

TinyFish logo

TinyFish

MCP Servers

TinyFish exposes web automation, web search, content extraction, and remote browser-session tools to MCP-compatible AI assistants. The hosted MCP server uses OAuth 2.1, while an optional local @tiny-fish/mcp proxy supports API-key authentication for local-only, CI, and headless setups.

openaiDeveloperDocs logo

openaiDeveloperDocs

MCP Servers

OpenAI Developer Docs MCP is an OpenAI-hosted, read-only server that lets MCP clients search and fetch documentation from developers.openai.com, platform.openai.com, and learn.chatgpt.com. It uses a public streamable HTTP endpoint and does not call the OpenAI API on the user's behalf.

FetchSandbox logo

FetchSandbox

MCP Servers

FetchSandbox is a stdio MCP server and hosted API-sandbox service that lets AI coding agents import OpenAPI 3.x specifications, discover runnable workflows, and execute stateful integration tests without using production API credentials. It is designed for validating request flows, lifecycle state, webhooks, retries, and shareable run traces from MCP-compatible development tools.

DataForSEO MCP Server logo

DataForSEO MCP Server

MCP Servers

DataForSEO MCP Server is the official Model Context Protocol server for connecting AI clients to DataForSEO SEO, SERP, keyword, backlink, on-page, business, domain, content, merchant, and AI optimization data. It can be used as a hosted Streamable HTTP endpoint, a local npx package, a Docker container, or a source-built TypeScript server.