MCP.so
ログイン

PHP MCP Server for Laravel

@php-mcp

PHP MCP Server for Laravel について

An SDK building Laravel MCP servers

基本情報

カテゴリ

その他

ライセンス

MIT

ランタイム

php

トランスポート

stdio

公開者

php-mcp

設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is PHP MCP Server for Laravel?

It is a comprehensive Laravel SDK for building Model Context Protocol (MCP) servers with enterprise-grade features and Laravel-native integrations. It lets you expose your Laravel application’s functionality as standardized MCP Tools, Resources, Prompts, and Resource Templates for AI assistants like Claude, Cursor IDE, and ChatGPT.

How to use PHP MCP Server for Laravel?

Install via Composer (composer require php-mcp/laravel:^3.0 -W), publish the configuration (php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-config"), then define MCP elements in routes/mcp.php using the Mcp facade or via PHP 8 attributes. Run the server with php artisan mcp:serve --transport=stdio, or use the integrated HTTP or dedicated HTTP transports. All settings are managed through config/mcp.php.

Key features of PHP MCP Server for Laravel

  • Laravel-native integration with service container, caching, logging, and Artisan
  • Fluent element definition using the Mcp facade
  • Attribute-based discovery with automatic caching (e.g., #[McpTool])
  • Advanced session management with multiple storage backends
  • Flexible transport options: STDIO, integrated HTTP, dedicated HTTP server
  • Artisan commands for serving, discovery, and element management

Use cases of PHP MCP Server for Laravel

  • Expose Laravel business logic (e.g., user creation, email sending) as MCP tools for AI assistants
  • Provide dynamic resources and resource templates (e.g., user profiles, file contents) via URI patterns
  • Integrate with Cursor IDE or command-line tools using STDIO transport
  • Build enterprise-grade MCP servers with session persistence and caching

FAQ from PHP MCP Server for Laravel

What are the system requirements?

PHP >= 8.1 and Laravel >= 10.0 are required. Extensions json, mbstring, and pcre must be enabled.

Which transport options are available?

Three transports: STDIO (for direct client execution), Integrated HTTP (served through Laravel routes), and Dedicated HTTP Server (high-performance standalone ReactPHP server).

How do I define MCP elements?

You can use manual registration in routes/mcp.php with the Mcp facade, or use PHP 8 attributes (#[McpTool], #[McpResource], etc.) on classes/methods with automatic discovery.

Does it support caching?

Yes. Discovered elements are cached for performance; caches are automatically invalidated on fresh discovery runs. You can force re-discovery with php artisan mcp:discover --force.

Can I use it with Cursor IDE?

Yes. Cursor IDE can be configured to use STDIO transport with a command pointing to php artisan mcp:serve --transport=stdio.

コメント

「その他」の他のコンテンツ