PHP MCP Server for Laravel
@php-mcp
关于 PHP MCP Server for Laravel
An SDK building Laravel MCP servers
基本信息
配置
工具
未检测到工具
工具是从 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
Mcpfacade - 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.
其他 分类下的更多 MCP 服务器
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
评论