MCP.so
登录

Laravel MCP Server

@mohamedahmed01

基本信息

分类

开发工具

许可证

MIT

传输方式

stdio

作者

mohamedahmed01

关于 Laravel MCP Server

Laravel Based Implementation for Model Context Protocol

Laravel MCP Server 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

Laravel MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Laravel MCP?

A Laravel package for implementing the Model Context Protocol (MCP) in Laravel applications. It facilitates communication between AI models and Laravel applications through standardized interfaces.

How to use Laravel MCP?

Install via Composer (composer require laravelmcp/mcp), publish the config (php artisan vendor:publish --provider="..." --tag="config"), and set environment variables (e.g., MCP_SERVER_TRANSPORT). Start the server with php artisan mcp:serve [--transport] [--host] [--port]. Register tools, resources, and prompts using FastMCP or the MCP facade.

Key features of Laravel MCP

  • Multiple transport options: HTTP, WebSocket, and Stdio
  • Tool registration, execution, and error handling
  • Resource management with URI-based access and templates
  • Prompt system with templates, arguments, and context management
  • Real-time progress tracking and client notification
  • Structured logging with multiple log levels
  • Model preferences configuration (cost, intelligence, speed priorities)

Use cases of Laravel MCP

  • Building AI assistants that interact with Laravel applications
  • Real-time code review assistants that analyze complexity and suggest improvements
  • Exposing database records or file contents as resources via MCP
  • Integrating CLI tools with AI models using Stdio transport
  • Creating chat applications with prompt history and context management

常见问题

1

What are the system requirements?

PHP 8.1+, Laravel 10.x, Composer 2.x, and several PHP extensions (OpenSSL, PDO, Mbstring, XML, Ctype, JSON). Optional: Redis, Supervisor, ext-pcntl, ext-posix.

2

How do I install Laravel MCP?

Run `composer require laravelmcp/mcp`. The package automatically registers its service provider and facade.

3

What transport options are available?

HTTP (RESTful), WebSocket (real-time), and Stdio (command-line). You can also use a transport factory.

4

How do I register a custom tool?

Use `FastMCP` or the MCP facade. Define parameters and a callback (e.g., `$mcp->tool('calculate', [...]) (function($args) { ... })`). Returns structured responses with error handling.

5

Where is the full documentation?

Comprehensive PHPDoc is in the source code (`src/` directory). Online documentation is available at [mohamedahmed01.github.io/laravel-mcp-sdk](https://mohamedahmed01.github.io/laravel-mcp-sdk).

评论

开发工具 分类下的更多 MCP 服务器