
php-mcp/laravel
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Laravel MCP 서버를 구축하는 SDK
개요
이 SDK는 강력한 php-mcp/server 라이브러리를 위한 Laravel 최적화 래퍼를 제공하여, Laravel 애플리케이션의 기능을 표준화된 MCP , , , 뿐만 아니라 Anthropic의 Claude, Cursor IDE, OpenAI의 ChatGPT 등 AI 어시스턴트용으로 노출할 수 있게 합니다. - : Laravel의 서비스 컨테이너, 구성, 캐싱, 로깅, 세션, Artisan 콘솔과의 심층 통합 - : Mcp 외관을 사용해 우아하고 Laravel 스타일의 API로 MCP 요소를 정의 - : PHP 8 속성(#[McpTool], #[McpResource] 등) 사용
개요(AI 번역)
기업용 기능과 Laravel 네이티브 통합을 갖춘 모델 컨텍스트 프로토콜(MCP) 서버 구축을 위한 포괄적인 Laravel SDK.
이 SDK는 강력한 php-mcp/server 라이브러리에 대해 Laravel 최적화된 래퍼를 제공하여, Anthropic의 Claude, 커서 IDE, OpenAI의 ChatGPT 등과 같은 AI 어시스턴트를 위한 표준화된 MCP Tools, Resources, Prompts, Resource Templates로 Laravel 애플리케이션 기능을 노출할 수 있게 합니다.
주요 특징
- Laravel-네이티브 통합: Laravel의 서비스 컨테이너, 구성, 캐싱, 로깅, 세션, Artisan 콘솔과의 깊은 통합
- Fluent Element Definition:
Mcp외관을 사용하여 우아하고 Laravel 스타일의 API로 MCP 요소를 정의합니다. - 속성 기반 발견: PHP 8 속성(
#[McpTool],#[McpResource]등)을 자동 검색 및 캐싱과 함께 사용하세요 - 고급 세션 관리: 자동 가비지 컬렉션이 포함된 Laravel 네이티브 세션 핸들러(파일, 데이터베이스, 캐시, 레디스)
- 유연한 교통 옵션:
- 통합 HTTP: 미들웨어 지원이 포함된 Laravel 경로를 통해 서비스
- 전용 HTTP 서버: 고성능 독립형 ReactPHP 서버
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Laravel MCP Server SDK
A comprehensive Laravel SDK for building Model Context Protocol (MCP) servers with enterprise-grade features and Laravel-native integrations.
This SDK provides a Laravel-optimized wrapper for the powerful php-mcp/server library, enabling you to expose your Laravel application’s functionality as standardized MCP Tools, Resources, Prompts, and Resource Templates for AI assistants like Anthropic’s Claude, Cursor IDE, OpenAI’s ChatGPT, and others.
Key Features
- Laravel-Native Integration: Deep integration with Laravel’s service container, configuration, caching, logging, sessions, and Artisan console
- Fluent Element Definition: Define MCP elements with an elegant, Laravel-style API using the
Mcpfacade - Attribute-Based Discovery: Use PHP 8 attributes (
#[McpTool],#[McpResource], etc.) with automatic discovery and caching - Advanced Session Management: Laravel-native session handlers (file, database, cache, redis) with automatic garbage collection
- Flexible Transport Options:
- Integrated HTTP: Serve through Laravel routes with middleware support
- Dedicated HTTP Server: High-performance standalone ReactPHP server
- STDIO: Command-line interface for direct client integration
- Streamable Transport: Enhanced HTTP transport with resumability and event sourcing
- Artisan Commands: Commands for serving, discovery, and element management
- Full Test Coverage: Comprehensive test suite ensuring reliability
This package supports the 2025-03-26 version of the Model Context Protocol.
Requirements
- PHP >= 8.1
- Laravel >= 10.0
- Extensions:
json,mbstring,pcre(typically enabled by default)
Installation
Install the package via Composer:
composer require php-mcp/laravel:^3.0 -W
Publish the configuration file:
php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-config"
For database session storage, publish the migration:
php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-migrations"
php artisan migrate
Configuration
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"my-laravel-app": {
"command": "php",
"args": [
"/absolute/path/to/your/laravel/project/artisan",
"mcp:serve",
"--transport=stdio"
]
}
}
}