MCP.so
Sign In
Servers

Laravel MCP (Model Context Protocol)

@InnoGE

A package for developing MCP Servers with Laravel.

Overview

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.

More from Other