PHPackages                             chaoticingenuity/laravel-mcp-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. chaoticingenuity/laravel-mcp-server

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

chaoticingenuity/laravel-mcp-server
===================================

Model Context Protocol (MCP) server implementation for Laravel

v1.1.1(7mo ago)120MITPHPPHP ^8.1

Since Sep 8Pushed 7mo agoCompare

[ Source](https://github.com/chaoticingenuity/laravel-mcp-server)[ Packagist](https://packagist.org/packages/chaoticingenuity/laravel-mcp-server)[ RSS](/packages/chaoticingenuity-laravel-mcp-server/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (6)Used By (0)

Laravel MCP Server
==================

[](#laravel-mcp-server)

A Laravel package that implements the Model Context Protocol (MCP) server specification, enabling AI models to interact with your Laravel application through a standardized protocol.

Features
--------

[](#features)

- ✅ Full MCP 2024-11-05 protocol implementation
- ✅ Tool and Resource support with JSON-RPC 2.0
- ✅ Fine-grained permission system with field-level access control
- ✅ Template resources with parameter extraction
- ✅ Multiple authentication methods (API keys, Basic Auth, Bearer tokens)
- ✅ Flexible custom authentication system with database integration
- ✅ Comprehensive security middleware stack
- ✅ Rate limiting with per-client controls and burst protection
- ✅ Performance monitoring and detailed logging
- ✅ Extensible architecture for custom tools/resources
- ✅ Laravel 10+, 11+ and 12+ support
- ✅ Comprehensive test suite
- ✅ Auto-discovery of tools and resources
- ✅ **NEW**: Advanced permission resolution system with custom resolvers
- ✅ **NEW**: Enhanced field-level security with data filtering
- ✅ **NEW**: API key audit logging and usage tracking
- ✅ **NEW**: Per-key rate limiting with burst protection
- ✅ **NEW**: Security enhancements (key rotation, scope-based permissions)
- ✅ **NEW**: Performance monitoring and metrics tracking

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require chaoticingenuity/laravel-mcp-server
```

Quick Start
-----------

[](#quick-start)

### 1. Publish Configuration

[](#1-publish-configuration)

```
php artisan vendor:publish --tag=mcp-config
```

### 2. Publish Controllers (Optional)

[](#2-publish-controllers-optional)

```
php artisan vendor:publish --tag=mcp-controllers
```

**Note**: You only need to publish if you want to customize the MCPController. The middleware classes are used directly from the package namespace.

### 3. Laravel Version-Specific Setup

[](#3-laravel-version-specific-setup)

#### Laravel 11+ (including Laravel 12) Setup (Recommended Method)

[](#laravel-11-including-laravel-12-setup-recommended-method)

For Laravel 11+, use the static helper method to register middleware in `bootstrap/app.php`:

```
